On this page
Warning:
As of April 12, 2019, CockroachDB v1.1 is no longer supported. 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 enterprise BACKUP
and RESTORE
tasks.
Limitations
- This feature currently only works with enterprise features. However, in the future, we plan to let you cancel any job, including schema changes.
- 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;