데이터 가져오기 및 내보내기 취소
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
MySQL
| PostgreSQL
| SQL Server
이 페이지에서는 Cloud SQL 인스턴스로 데이터 가져오기 및 내보내기를 취소하는 방법을 설명합니다. 이 데이터는 SQL 덤프 파일 또는 CSV 파일에 포함되어 있습니다.
시작하기 전에
가져오기 또는 내보내기 작업 취소
gcloud
또는 REST API 명령어를 사용하여 가져오기 또는 내보내기 작업을 취소할 수 있습니다.
gcloud
gcloud sql operations cancel
명령어를 사용하여 작업을 취소합니다.
gcloud sql operations cancel operation-ID
operation-ID 변수를 작업 ID로 바꿉니다. 자세한 내용은 시작하기 전에를 참조하세요.
REST v1
요청 데이터를 사용하기 전에 다음을 바꿉니다.
- project-ID: 프로젝트 ID입니다.
- operation-ID: 가져오기 또는 내보내기 작업의 ID입니다. 자세한 내용은 시작하기 전에를 참조하세요.
HTTP 메서드 및 URL:
POST https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID/cancel
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID/cancel"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID/cancel" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
이 REST API 호출은 응답을 반환하지 않습니다. 가져오기 또는 내보내기 작업의 취소 상태 확인에 대한 자세한 내용은 취소된 상태 확인을 참조하세요.
REST v1beta4
요청 데이터를 사용하기 전에 다음을 바꿉니다.
- project-ID: 프로젝트 ID입니다.
- operation-ID: 가져오기 또는 내보내기 작업의 ID입니다. 자세한 내용은 시작하기 전에를 참조하세요.
HTTP 메서드 및 URL:
POST https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID/cancel
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID/cancel"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID/cancel" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
이 REST API 호출은 응답을 반환하지 않습니다. 가져오기 또는 내보내기 작업의 취소 상태 확인에 대한 자세한 내용은 취소된 상태 확인을 참조하세요.
취소된 상태 확인
gcloud
또는 REST API 명령어를 사용하여 취소된 가져오기 또는 내보내기 작업의 상태를 확인할 수 있습니다.
REST v1
요청 데이터를 사용하기 전에 다음을 바꿉니다.
- project-ID: 프로젝트 ID입니다.
- operation-ID: 가져오기 또는 내보내기 작업의 ID입니다. 자세한 내용은 시작하기 전에를 참조하세요.
HTTP 메서드 및 URL:
GET https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"kind": "sql#operation",
"targetLink": "https://sqladmin.googleapis.com/v1/projects/project-ID",
"status": "DONE",
"user": "user@example.com",
"insertTime": "2022-11-08T22:12:58.199Z",
"startTime": "2022-11-08T22:13:04.798Z",
"endTime": "2022-11-08T22:13:45.862Z",
"error": {
"kind": "sql#operationErrors",
"errors": [
{
"kind": "sql#operationError",
"code": "CANCEL_SUCCESSFUL",
"message": "Operation successfully cancelled"
}
]
},
"operationType": "EXPORT",
"exportContext": {
"uri": "gs://replica-bucket/source-database.sql",
"kind": "sql#exportContext",
"sqlExportOptions": {
"schemaOnly": false,
"mysqlExportOptions": {
"masterData": 0
}
},
"fileType": "SQL"
},
"name": "operation-ID",
"targetId": "cloud-sql-instance-display-name",
"selfLink": "https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID",
"targetProject": "project-ID",
"instanceUid": "cloud-sql-instance-ID"
}
REST v1beta4
요청 데이터를 사용하기 전에 다음을 바꿉니다.
- project-ID: 프로젝트 ID입니다.
- operation-ID: 가져오기 또는 내보내기 작업의 ID입니다. 자세한 내용은 시작하기 전에를 참조하세요.
HTTP 메서드 및 URL:
GET https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID
요청을 보내려면 다음 옵션 중 하나를 펼칩니다.
cURL(Linux, macOS, Cloud Shell)
다음 명령어를 실행합니다.
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID"
PowerShell(Windows)
다음 명령어를 실행합니다.
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID" | Select-Object -Expand Content
다음과 비슷한 JSON 응답이 표시됩니다.
응답
{
"kind": "sql#operation",
"targetLink": "https://sqladmin.googleapis.com/v1beta4/projects/project-ID",
"status": "DONE",
"user": "user@example.com",
"insertTime": "2022-11-08T22:12:58.199Z",
"startTime": "2022-11-08T22:13:04.798Z",
"endTime": "2022-11-08T22:13:45.862Z",
"error": {
"kind": "sql#operationErrors",
"errors": [
{
"kind": "sql#operationError",
"code": "CANCEL_SUCCESSFUL",
"message": "Operation successfully cancelled"
}
]
},
"operationType": "EXPORT",
"exportContext": {
"uri": "gs://replica-bucket/source-database.sql",
"kind": "sql#exportContext",
"sqlExportOptions": {
"schemaOnly": false,
"mysqlExportOptions": {
"masterData": 0
}
},
"fileType": "SQL"
},
"name": "operation-ID",
"targetId": "cloud-sql-instance-display-name",
"selfLink": "https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID",
"targetProject": "project-ID",
"instanceUid": "cloud-sql-instance-ID"
}
문제 해결
문제 |
문제 해결 |
오류 메시지: You can't cancel operation [operation-ID] because
this operation isn't in progress. |
완료되었거나 실패했거나 취소된 가져오기 또는 내보내기 작업을 취소하려고 합니다. 작업이 실행 중인 경우 취소할 수 있습니다.
|
오류 메시지: You can't cancel operation [operation-ID] because
Cloud SQL doesn't support the cancellation of an [operation-type]
operation. |
Cloud SQL에는 IMPORT 또는 EXPORT 이외의 작업 유형이 있으므로 Cloud SQL에서는 작업 취소를 지원하지 않습니다.
|
오류 메시지: The [operation-type] operation isn't cancelled. Wait
and retry in a few seconds. |
Cloud SQL에서 현재 가져오기 또는 내보내기 작업을 취소할 수 없습니다.
잠시 후 다시 시도하세요. 문제가 계속되면 Google Cloud 지원팀에 문의하세요.
|
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-02-14(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-02-14(UTC)"],[],[]]