Link Search Menu Expand Document

SqlBak-CLI documentation

Restore Job Specification

Restore job, what is it?

A restore job is a task that the application performs. As part of this job, a database’s backup that has been created via the backup-job command is restored.

SqlBak-CLI runs a restore job via the following steps:

  1. Downloads a backup from a storage
  2. Uncompresses backup
  3. Restores backup

The information needed to complete these steps is described in a special JSON file that must be passed as a parameter to the --job-settings argument of the run-restore command:

sqlbak-cli run-restore --job-settings="~/backup/job.json"

Top-level elements

{
  "type": "restore",
  "target": {
        <target settings>
  },
  "storage": {
        <destination settings>
  }
}

Mandatory

target

Data to connect to a database, that should be restored. The fields for connection are completely identical to the source section in the backup settings, with the exception of the restore_items field, this field lists the items that must be restored.

More details

storage locations

The list of storage locations where backups are stored is specified here. Multiple storage locations can be used. Data to set a connection to storage where backups are stored. The fields are completely similar to the destinations section in a backup job, with the exception of the keep_settings field, it is not needed for a restore process.

More details

Optional

job_name

The name of the restore job. Displayed in the log.

temp_folder

Path to a temporary directory. If this path is not specified, the paths specified in the sqlbak-cli-path.json file in the application’s installation directory are used.

Examples

See examples section.


Table of contents