Backup jobs
Endpoints for the backup jobs of the team. A job backs up files or databases of one server to a storage destination on a schedule. The agent on the server runs it, so changes and runs take effect when the agent next checks in.
List backup jobs
List the team's backup jobs by name. The query matches the name, the backed-up path and the names of the server and storage destination.
query Parameters
querySearch results by name.
per_pageNumber of results per page.
pagePage number to return.
statusOnly return jobs in this state: attention for jobs with a problem to look at, or a job status.
serverOnly return the jobs of this server.
List backup jobs › Responses
Paginated set of BackupJob
Create a backup job
Create a backup job on an enrolled server. Test the source first with the source inspections endpoint and pass the ID of the successful test as source_inspection; it must test exactly this source and be at most 10 minutes old. The job starts as pending while Backup Chief sets up its repository. It only starts running after its recovery document is saved and confirmed in the Backup Chief app.
Create a backup job › Request Body
nameDisplay name of the backup job.
serverFormatted ID of the enrolled server that runs the job. It cannot be changed later.
storage_destinationFormatted ID of the storage destination that keeps the main copy. It cannot be changed later.
typeWhat the job backs up. It cannot be changed later.
What to back up. The fields depend on the type, see the description of each field. Fields left out keep their value on an existing job.
source_inspectionFormatted ID of a completed, successful source test of exactly this source, at most 10 minutes old. Required when creating a job and when changing the source of a job.
When the job runs. A new job runs every day at the next full hour when it is left out; fields left out keep the schedule of an existing job.
How many backups to keep. Tiers left out keep their value, or the default for the schedule on a new job. Tiers the schedule makes redundant are folded into last.
attempt_idULID that identifies this creation attempt. Retrying with the same ID and the same job returns the job created the first time instead of a second job.
Create a backup job › Responses
The backup job was created.
Get a backup job
Get one of the team's backup jobs with its source, schedule, retention and storage state. Passwords are never returned.
path Parameters
jobGet a backup job › Responses
BackupJob
Update a backup job
Change the name, source, schedule or retention of a backup job. Fields left out keep their value, including a stored database password. A changed source must pass a new source test first: pass the ID of a successful test of the changed source, made with the job argument, as source_inspection. The server, storage destination and type cannot be changed.
path Parameters
jobUpdate a backup job › Request Body
nameDisplay name of the backup job.
serverFormatted ID of the enrolled server that runs the job. It cannot be changed later.
storage_destinationFormatted ID of the storage destination that keeps the main copy. It cannot be changed later.
typeWhat the job backs up. It cannot be changed later.
What to back up. The fields depend on the type, see the description of each field. Fields left out keep their value on an existing job.
source_inspectionFormatted ID of a completed, successful source test of exactly this source, at most 10 minutes old. Required when creating a job and when changing the source of a job.
When the job runs. A new job runs every day at the next full hour when it is left out; fields left out keep the schedule of an existing job.
How many backups to keep. Tiers left out keep their value, or the default for the schedule on a new job. Tiers the schedule makes redundant are folded into last.
attempt_idULID that identifies this creation attempt. Retrying with the same ID and the same job returns the job created the first time instead of a second job.
Update a backup job › Responses
BackupJob
Delete a backup job
Delete a paused backup job once its agent dropped it from its configuration and no run is pending or running. Without delete_repository only the job and its history are deleted and its backups stay in storage, where restic can still restore them with the recovery document. With delete_repository the job turns deleting and its repositories are deleted from storage in the background before the job is removed.
path Parameters
jobquery Parameters
delete_repositoryAlso delete the job's repositories and every backup in them from storage. Without it only the job and its history are deleted from Backup Chief and the backups stay in storage.
Delete a backup job › Responses
The backups are being deleted, the job is removed once they are.
Pause a backup job
Stop running an active backup job on its schedule. Its backups and history are kept. Queued runs are cancelled, a running backup may still finish, and the schedule stops once the agent checks in. A job must be paused before it can be deleted.
path Parameters
jobPause a backup job › Responses
BackupJob
Resume a backup job
Run a paused backup job on its schedule again once the agent checks in.
path Parameters
jobResume a backup job › Responses
BackupJob
Run a backup now
Queue a backup of an active job outside its schedule. The agent starts it the next time it checks in; follow it in the job's runs.
path Parameters
jobRun a backup now › Responses
The backup was queued.
Run maintenance now
Queue a maintenance operation of an active job outside its schedule: remove the backups the keep policy no longer needs, free the storage space they used, or recheck which backups are still stored. The agent starts it the next time it checks in.
path Parameters
jobRun maintenance now › Request Body
operationforget removes the backups the keep policy no longer needs, prune frees the storage they used at every storage destination, snapshot_inventory rechecks which backups are still stored.
Run maintenance now › Responses
The maintenance was queued.
Retry the storage setup
Continue setting up the storage of a pending job from the last safe step, after its setup stopped with provisioning_error_code. Fix the cause first, such as the storage credentials.
path Parameters
jobRetry the storage setup › Responses
BackupJob
List the repositories of a backup job
List the restic repositories of a backup job: the main repository first, then its extra copies at other storage destinations. Extra copies are added and managed in the Backup Chief app, because they need the job's recovery password.
path Parameters
jobList the repositories of a backup job › Responses
Array of BackupRepository