View Source

Server Backup Manager provides the ability to take a snapshot of a Microsoft SQL Server database. Since Server Backup uses the VSS SQL writer, data integrity and consistency during the backup operation are ensured.

Follow the instructions below to restore an MS SQL database that was previously backed up by Server Backup.


h3. Step 1: Restoring Database Data and Log Files

To restore a database, follow the instructions below in your Backup Manager.

1. In the Main Menu, click *Protected Machines*. On the _Protected Machines_ screen, click the _Actions_ icon for a corresponding protected machine and select *Open Recovery Points*.

!Protected Machines - Open Recovery Points.png|border=1!

The _Recovery Points_ window displays.

2. In the _Recovery Points_ window, select the recovery point from which you want to restore. You can restore the files from any available recovery point. Click the corresponding _Actions_ icon and select *Browse*. !Recovery Points window - Browse.png|border=1!
Note that if you configured the encryption during [Disk Safe creation|ServerBackupManager:Create Disk Safes], you will be asked to enter the encryption passphrase when you select _Browse_, _Bare Metal Restore_, _Browse Databases_, or _Exchange_ in the _Actions_ menu.

!Enter Encryption Passphrase window.png|border=1!

Select the *Remember passphrase until logout* check box to remember your passphrase when you select one of the options in the _Actions_ menu listed above.

3. The "Browse Recovery Point" window opens. Browse to locate the location of the SQL data and log files ({{.mdf}} and {{.ldf}}).  See also: [Browse recovery points].

!Browse Recovery Point window_Path_English.png!

4. Check the database {{.mdf}} data files and {{.ldf}} log files you want to restore.

!Browse Recovery Point window_Files selected_English.png!

5. When you are finished selecting the files and directories, click the "Restore Selected" button.

!Browse Recovery Point window_Restore Selected button_English.png!

6. In the "Restore Files" window, define the restore options.

First, select an existing Server to restore to or define a new Server name/IP and its port number.

!Restore Files window_Restore To Agent option_Alternate_English.png!

Second, if the database already exists and you want to restore the {{.mdf}} and {{.ldf}} files to an alternate location, check the option for this and specify the path where the files will be restored. Optionally, check the "Overwrite Existing Files" option.

!Restore Files window_Restore To Folder option_Alternate_English.png!

Third, define the Advanced options (if needed):
* *Use Compression*
* *Estimate Restore Size*
* *Restore Discretionary ACLs (File Permissions)*
* *Restore System ACLs (Audit Rules)*

!Restore Files window_Advanced Options_Alternate_English.png!

7. Click on "Restore".

!Restore Files window_Restore button_English.png!

8. The task will start immediately. The "Details for Restore Files" screen displays the progress of the task.

!Details for Restore Files_SQL restoring_English.png!

h3. Step 2: Attaching the Database Data and Log Files

Follow the instructions below to attach the database data and log file.

1. From the SQL Server Management Studio, right-click the "Databases" item and select the "Attach..." command in the menu.


2. Browse to the restore location.
{info:title=Note}If you restore to an alternate location, the path will include the new location, in addition to the old hierarchy of the file location.

3. In the "Attach As" column, change the database name if the original database is still online.


4. Click "OK." The database is now attached.


{excerpt:hidden=true}Instructions on how to restore an MS SQL database previously backed up by Server Backup Manager.{excerpt}