On this page
Warning:
CockroachDB v2.0 is no longer supported as of October 4, 2019. For more details, refer to the Release Support Policy.
New in v1.1: The CANCEL JOB
statement lets you stop long-running jobs, which include IMPORT
jobs and enterprise BACKUP
and RESTORE
tasks.
Limitations
When an enterprise RESTORE
is canceled, partially restored data is properly cleaned up. This can have a minor, temporary impact on cluster performance.
Required Privileges
By default, only the root
user can cancel a job.
Synopsis
Parameters
Parameter | Description |
---|---|
job_id |
The ID of the job you want to cancel, which can be found with SHOW JOBS . |
Examples
Cancel a Restore
> SHOW JOBS;
+----------------+---------+-------------------------------------------+...
| id | type | description |...
+----------------+---------+-------------------------------------------+...
| 27536791415282 | RESTORE | RESTORE db.* FROM 'azure://backup/db/tbl' |...
+----------------+---------+-------------------------------------------+...
> CANCEL JOB 27536791415282;