Use SANAD Backup

Restore a database

Restore a SQL Server database from its backup chain to the latest state or a point in time, under a new name or on another instance.

The Restore page (in the sidebar for administrators) restores a database from the native backups a job took. SANAD Backup works out which full, differential and log backups are needed, checks that every one of them can be read, and only then starts restoring.

Before you restore

  • What can be restored: native full, differential and transaction-log backups. Script exports do not appear on the Restore page.
  • Where: SQL Server reads the backup files from SANAD Backup's staging folder on this computer, so the target SQL Server instance must run on the same computer as SANAD Backup.
  • Encrypted backups: the job's stored encryption password is used automatically. Backups made before the job's password was changed need the old password (see Encrypted backups).
  • Try it first: practise by restoring under a new database name. The original database is not touched.

Restore step by step

  1. In the sidebar, choose Restore.
  2. In Backup job, choose the job. Jobs that were deleted but still have backups are listed with "(deleted job)".
  3. In Backup chain, choose the database's current chain or an earlier one (see Choosing a backup chain). The page shows the chain's timeline: each backup's type, its size and the time SANAD Backup recorded it (UTC), which is not the time the backup was taken.
  4. Under Restore point, choose Latest (most recent recoverable state) or Point in time.
  5. In Restore to server, choose the target connection.
  6. In Restore as database name, keep the suggested name (the database name followed by _restored) or type another.
  7. If needed, fill in Decryption password and File relocation.
  8. Check Review database restore: source, restore point, target server and database name. An existing target database with that name will be overwritten. Choose Restore, read the confirmation and choose Restore again.

Keep the page open until the result appears. Restore inputs are locked while an operation runs. A progress bar shows each database restore step. When it is done, the page says the database is ready, with a note if SANAD Backup had to finish the restore itself (see After the restore).

Choosing a backup chain

Each database has its own chains. Each full backup starts a new chain; the differential and log backups that follow belong to it. The current chain is the one new backups extend. Pick the database's current chain, labelled with the database name and "current chain", or an earlier one. For a job with several databases, the first database's current chain is selected by default.

Earlier chains stay restorable while their files remain on the job's destinations. The list shows the 20 most recent earlier chains, labelled with the time of their full backup; Show all earlier chains lists the rest. Chains that SANAD Backup has marked broken are not offered for restore.

Latest state or a point in time

  • Latest restores the full backup, the latest differential and every log backup after it.
  • Point in time asks for a Target time (UTC), to the second, within the chain's Recoverable range shown under the field. Everything that happened after that moment is discarded. A time outside the range is refused before anything is restored; to go further back, pick an earlier chain.

Restoring under another name or to another instance

  • A new name restores alongside the original without changing it. Leave File relocation empty and SANAD Backup places the data and log files in the target instance's default folders, named after the new database.
  • The same name overwrites the existing database on the target instance. The confirmation says so.
  • Another instance on this computer: choose its connection in Restore to server.
  • File relocation lists each logical file of the backup with a box for a New physical path. Fill it in only to choose your own locations, and then give a path for every file. If the backup's file list cannot be read (for example, it was encrypted with an earlier password), the File relocation table is not shown; SANAD Backup still places the files in the default folders.

Checks before the first restore step

Before SANAD Backup sends the first RESTORE command, it finds every backup the restore needs on the job's destinations — including destinations removed from the job since — downloads it, decrypts it and decompresses it.

  • If a file is missing, for example because retention removed it, the restore is refused, the target is not touched, and the message names what is missing and the latest point the remaining files can reach.
  • If a file cannot be read — a wrong password or a damaged archive — the restore fails the same way, before the target is touched.
  • SANAD Backup never quietly restores to an earlier point than you asked for. The one exception: when the newest differential is lost but an earlier differential plus the log backups reach the same point, it uses those.

After the restore

SANAD Backup checks the database's state on the target instance:

  • Online: the restore is complete.
  • Still restoring: SANAD Backup recovers the database and reports success with a note. If the time you asked for was after the end of the last log backup, the database is recovered at the end of that log — the closest point before the one requested — and the note says so.
  • Any other state (for example SUSPECT): the restore is reported as failed.
  • State unknown: the restore succeeds with a note asking you to check the database on the server.

After success, connect to the restored database, compare expected tables and row counts, and run application checks before switching to it. A completed restore is not a substitute for verifying the recovered data.

Encrypted backups

The job's stored password opens its backups. If the job's encryption password was changed, backups made before the change still need the old password: type it in Decryption password (if different from the job's current password). It is used for this restore only and is not saved.

From the command line

Sanad.CLI restore preview and Sanad.CLI restore run restore by chain ID; see Command line. The Restore page is the easier way.

Restore files and folders

For a Files & Folders job, use Restore files on the same page. Choose the job and backup, then enter a full path to a new or empty folder on the computer running SANAD Backup. The account running SANAD Backup needs permission to create folders in its parent folder. If the backup used an earlier encryption password, enter that password before confirming Restore files.

Check Review file restore before confirming. The page reports the current phase: locating, downloading, preparing, extracting, then publishing the restored files. These phases do not represent a percentage complete. After success, open important documents and compare file counts and contents with the expected backup.

Existing files are never overwritten. If another process fills the target while the restore is running, the restore stops and asks for another empty folder. A successful restore reports the number of files recovered; Restore another copy clears the target so you can choose a different folder.

When a file job has several source folders, their final folder names must differ. For example, use separate jobs for C:\Accounts\Reports and D:\Archive\Reports. Older archives containing conflicting file paths are refused before restoration; recover their conflicting entries separately with an archive tool.