RESUME JOB

Warning:
Cockroach Labs will stop providing Assistance Support for this version on November 12, 2021. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, see the Release Support Policy.

The RESUME JOB statement lets you resume paused IMPORT jobs, enterprise BACKUP and RESTORE jobs, changefeeds, and schema change jobs.

Required privileges

By default, only the root user can control a job.

Synopsis

RESUME JOB job_id JOBS select_stmt

Parameters

Parameter Description
job_id The ID of the job you want to resume, which can be found with SHOW JOBS.
select_stmt A selection query that returns job_id(s) to resume.

Examples

Pause a job

icon/buttons/copy
> SHOW JOBS;
+----------------+---------+-------------------------------------------+...
|       id       |  type   |               description                 |...
+----------------+---------+-------------------------------------------+...
| 27536791415282 | RESTORE | RESTORE db.* FROM 'azure://backup/db/tbl' |...
+----------------+---------+-------------------------------------------+...
icon/buttons/copy
> PAUSE JOB 27536791415282;

Resume a single job

icon/buttons/copy
> RESUME JOB 27536791415282;

Resume multiple jobs

To resume multiple jobs, nest a SELECT clause that retrieves job_id(s) inside the RESUME JOBS statement:

icon/buttons/copy
> RESUME JOBS (SELECT job_id FROM [SHOW JOBS]
      WHERE user_name = 'maxroach');

All jobs created by maxroach will be resumed.

See also

YesYes NoNo