Link Search Menu Expand Document

SqlBak-CLI documentation

run-restore command

The command starts the restore process for the backups that were created via the run-backup command. The information needed for a restore process is described in the --job-settings option. All the information about the restore process is displayed in a backup job’s log. If everything that is described in the file cannot be performed, then the application returns a non-zero exitcode.

The process can be interrupted at any time by pressing Ctrl+C (SIGINT).

Invocation Syntax

Arguments must be specified after the run-restore command:

sqlbak-cli run-restore [ARG...]

Required arguments:


In this parameter, the full path to the JSON file with the description of a restore job should be specified. More information about the specification of the JSON file and the job’s description can be found here.

Optional arguments:


Specifies whether forcibly active user sessions should be terminated before a database restore.


true – Before a restore, the application forcibly tries to terminate all existing connections to a database.

false – The restore will not be performed if there exist other active connections to a database (default).


This argument allows you to test the integrity of the backup without restoring it.


true – The application downloads a backup, uncompressed it, checks the integrity of the backup file using the DBMS.

false – Normal backup restore. (Default).


During backup execution, the application displays a job’s log. This parameter is used to specify how detailed a log should be.


error – Only error messages are displayed.

warning – Only error messages or warnings about potential issues in a backup job are displayed.

information – Displays basic messages about the stages of a backup job. (Default).

debug – Displays all messages, including debug messages.


Run a restore job on Windows:

sqlbak-cli run-restore --job-settings=”с:\BackupSettings\restore.json”

Run a restore job in a test mode on Linux:

sqlbak-cli run-restore --job-settings=”~/backup-settings/restore.json” --verify-only