> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RESUME JOB

The `RESUME JOB` [statement](/docs/stable/sql-statements.md) lets you resume the following types of jobs:

* [`IMPORT`](/docs/stable/import-into) jobs
* [`BACKUP`](/docs/stable/backup) and [`RESTORE`](/docs/stable/restore) jobs
* [User-created table statistics](/docs/stable/create-statistics.md) jobs
* [Automatic table statistics](/docs/stable/cost-based-optimizer.md#table-statistics) jobs
* [Changefeeds](/docs/stable/create-changefeed.md)
* [Schema change](/docs/stable/online-schema-changes.md) jobs
* [Scheduled backup](/docs/stable/manage-a-backup-schedule.md) jobs

## Required privileges

To resume a job, the user must be a member of the `admin` role or must have the [`CONTROLJOB`](/docs/stable/create-user#create-a-user-that-can-pause-resume-and-cancel-non-admin-jobs) [role option](/docs/stable/security-reference/authorization.md) set. Non-admin users cannot resume admin users' jobs.

For changefeeds, users with the [`CHANGEFEED`](/docs/stable/create-changefeed#required-privileges) privilege on a set of tables can resume changefeed jobs running on those tables.

## Synopsis

![resume\_job syntax diagram](https://mintcdn.com/cockroachlabs/UZNSFbmU2EwEm6G5/images/sql-diagrams/common/resume_job.svg?fit=max\&auto=format\&n=UZNSFbmU2EwEm6G5\&q=85\&s=f3e04285967da7b556e876e020dfe0e1)

### Resume all jobs by type

![resume\_all\_jobs syntax diagram](https://mintcdn.com/cockroachlabs/O8LdfYQ-dz7oGPVh/images/sql-diagrams/v24.2/resume_all_jobs.svg?fit=max\&auto=format\&n=O8LdfYQ-dz7oGPVh\&q=85\&s=79712fb7f401c41df10a658038bdce61)

## Parameters

| Parameter | Description |
| - | - |
| `job_id` | The ID of the job you want to resume, which can be found with [`SHOW JOBS`](/docs/stable/show-jobs). |
| `select_stmt` | A [selection query](/docs/stable/selection-queries.md) that returns `job_id`(s) to resume. |
| `for_schedules_clause` | The schedule you want to resume jobs for. You can resume jobs for a specific schedule (`FOR SCHEDULE id`) or resume jobs for multiple schedules by nesting a [`SELECT` clause](/docs/stable/select-clause) in the statement (`FOR SCHEDULES <select_clause>`). See the [examples](#resume-jobs-for-a-schedule) below. |
| `BACKUP`, `CHANGEFEED`, `RESTORE`, `IMPORT` | The job type to resume. |

## Examples

### Pause a job

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW JOBS;
```

```
      job_id     |  job_type |               description                      |...
-----------------+-----------+------------------------------------------------+...
  27536791415282 |  RESTORE  | RESTORE db.* FROM 'azure-blob://backup/db/tbl' |...
```

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> PAUSE JOB 27536791415282;
```

### Resume a single job

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> RESUME JOB 27536791415282;
```

### Resume multiple jobs

To resume multiple jobs, nest a [`SELECT` clause](/docs/stable/select-clause) that retrieves `job_id`(s) inside the `RESUME JOBS` statement:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> RESUME JOBS (WITH x AS (SHOW JOBS) SELECT job_id FROM x
      WHERE user_name = 'maxroach');
```

All jobs created by `maxroach` will be resumed.

### Resume by job type

To resume all jobs by the type of job, use the `RESUME ALL {job} JOBS` statement. You can resume all `BACKUP`, `RESTORE`, `CHANGEFEED`, `IMPORT` jobs using this statement, for example:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
RESUME ALL BACKUP JOBS;
```

### Resume jobs for a schedule

To resume jobs for a specific [backup schedule](/docs/stable/create-schedule-for-backup.md), use the schedule's `id`:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> RESUME JOBS FOR SCHEDULE 590204387299262465;
```

```
RESUME JOBS FOR SCHEDULES 1
```

You can also resume multiple schedules by nesting a [`SELECT` clause](/docs/stable/select-clause) that retrieves `id`(s) inside the `PAUSE JOBS` statement:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> RESUME JOBS FOR SCHEDULES WITH x AS (SHOW SCHEDULES) SELECT id FROM x WHERE label = 'test_schedule';
```

```
RESUME JOBS FOR SCHEDULES 2
```

## See also

* [`PAUSE JOB`](/docs/stable/pause-job)
* [`SHOW JOBS`](/docs/stable/show-jobs)
* [`CANCEL JOB`](/docs/stable/cancel-job)
* [`BACKUP`](/docs/stable/backup)
* [`RESTORE`](/docs/stable/restore)
* [`IMPORT INTO`](/docs/stable/import-into)
* [`CREATE CHANGEFEED`](/docs/stable/create-changefeed)
