Restore job settings

In a restore job, you can specify the following:

When to Start the Job

  • No Autostart – the job runs only when started manually.
  • By Scheduler – the job runs on a recurring schedule. By default, the restore runs every 24 hours. The Estimated restore plan list shows the upcoming runs.
Restore job scheduler

Click Advanced options to set the interval in hours and minutes, the time of the first restore start, and to limit runs to certain days of the week, a time range, or certain days of the month. For complex schedules, click Use Cron Editor. The schedule uses the server time zone. Scheduler settings are similar to scheduler settings in backup jobs. For more information, see Scheduler.

Advanced restore schedule

Restore Destination

The destination specifies where restored data is placed:

  • Select DBMS Connection – restore databases into a SQL Server, MySQL, or PostgreSQL connection configured on the server.
  • Add Restore Folder – place the backup files into a folder. A folder connection must first be added in the SqlBak Application on the backup agent; otherwise, the list of folders is empty.
Select Restore Folder window

Click Options next to a DBMS connection to set the Restore folder – a temporary folder for downloaded and extracted backups. These options apply to all databases restored to this connection. Leave the field empty to use the default folder.

Destination source options

To change the destination, click Remove and select another one.

Objects to Restore

Click Select Objects to Restore to choose the databases to restore. The tree shows servers, DBMS connections, and databases that have backups. For each database, you can see the storage where its backups are located and the time of the last backup.

Each selected database is shown as a mapping from the Source database to the destination database. Enter a destination name, or leave the field empty (Auto) to restore under the original name.

Restore destination and objects mapping

Notification

Turn on Notification and click Add Notification to receive messages about the job result. You can add success, failure, and too long notifications. Notification settings are similar to notification settings in backup jobs. For more information, see Notifications.

Scripts

Turn on Scripts and click Add script to run your own commands during the restore. For example, you can change user permissions or clean up data after a production database is restored to a test server. Two types of scripts are supported:

  • SQL scripts – executed directly in the database. Can be executed Before restore started or After restore finished. You can set a Timeout in seconds. For more details about SQL scripts, see SQL Scripts.
  • Batch scripts – executed as system commands on the server. Can be executed After Job started, Before restore started, After restore finished, or Before Job finished. For more details, see CMD Scripts.

Select Continue on error to continue the restore job even if the script fails. Predefined SqlBak variables can be used in both script types.

Restore job scripts and options New SQL script for a restore job New Batch script for a restore job

For security reasons, script execution is disabled by default for scripts configured on the SqlBak website. To enable it, see Script Execution Restrictions.

Options

  • Temporary folder – path for storing files during restore. Make sure the folder has enough free space for the downloaded and extracted backups. If not specified, the system default temporary folder is used.
  • Hidden Job (visible for admins only) – hides the job from users who are not administrators. This checkbox is located above the job settings.