This page describes how to cancel the import and export of data into Cloud SQL
instances. This data is contained in either SQL dump files or CSV files.
Before you begin
Cancel the import or export operation
You can use gcloud or REST API commands to cancel an import or
export operation.
gcloud
Use the gcloud sql operations cancel command to cancel the operation.
gcloudsqloperationscanceloperation-ID
Replace the operation-ID variable with the ID of the
operation. For more information, see Before you begin.
REST v1
Before using any of the request data,
make the following replacements:
project-ID: The project ID.
operation-ID: The ID of the import or export operation. For more information,
see Before
you begin.
HTTP method and URL:
POST https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID/cancel
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
Response
{}
This REST API call doesn't return any response. For more information about checking the cancellation status of the import or
export operation, see Check the cancelled status.
REST v1beta4
Before using any of the request data,
make the following replacements:
project-ID: The project ID.
operation-ID: The ID of the import or export operation. For more information,
see Before
you begin.
HTTP method and URL:
POST https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID/cancel
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
Response
{}
This REST API call doesn't return any response. For more information about checking
the cancellation status of the import or export operation, see
Check the cancelled status.
Check the cancelled status
You can use gcloud or REST API commands to check the status of a
cancelled import or export operation.
Error message: You can't cancel operation [operation-ID] because
this operation isn't in progress.
You're trying to cancel an import or export operation that's completed,
failed, or cancelled. If the operation is running, you can cancel it.
Error message: You can't cancel operation [operation-ID] because
Cloud SQL doesn't support the cancellation of an [operation-type]
operation.
Cloud SQL
doesn't support the cancellation of the operation because it has an operation type other than IMPORT
or EXPORT.
Error message: The [operation-type] operation isn't cancelled. Wait
and retry in a few seconds.
Cloud SQL can't cancel the import or export operation at this time.
Try again in a few seconds. If the problem persists, contact
Trusted Cloud by S3NS Support.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[],[]]