Skip to main content

 

Druva Documentation

Restore SQL Server databases using snapshots

Snapshots

To restore your databases, you select a snapshot or a restore point. When you trigger a restore job, you can see that snapshots are categorized as:

  • Hot snapshots
  • Warm snapshots
  • Cold snapshots

Hot snapshot restore

A restore of hot snapshots is an on-demand restore of server data that resides on Phoenix CloudCache. Hot snapshots are point-in-time images of backup data stored on Phoenix CloudCache. Such a restore operation continues till your server data is restored to the location that you specified.

To locate hot snapshots, expand Hot on the Restore Data window. 

Warm snapshot restore

Warm snapshots restores are restores of point-in-time images of backup data dating back to 90 days in time or the duration you specify under keep all snapshots setting (whichever is greater). Restores of warm snapshots continue till the server data is restored to the location that you specified. 

To locate warm snapshots, expand Warm on the Restore Data window. 

Cold snapshot restore

Restores of cold snapshots are on-request restores of server data dating back to more than 90 days in time or the duration you specify under keep all snapshots setting (whichever is greater). Such data, known as cold snapshots, is stored in cold storage. In the event of loss or corruption of this data, you can perform a restore by using the cold snapshots. To start a restore of cold snapshots, you must first initiate a defreeze operation, during which Phoenix retrieves your data from cold storage. This retrieved data is considered as thawed and is available for restore. After the defreeze operation completes, Phoenix sends an email informing you about the availability of your data, and the duration for which your data remains available.

To locate cold snapshots, expand Cold on the Restore Data window.

To locate thawed snapshots, expand Thawed on the Restore Data window. 

(Cold snapshots) To defreeze your data

Note: To start a cold snapshot restore, initiate a defreeze operation of your cold snapshots. 

  1. Log on to Phoenix Management Console
  2. On the menu bar, click Servers.
  3. Under the Configured tab, select the server you want to restore.  
  4. On the Server page, click Restore > Snapshot Restore
  5. In the left pane, expand Cold, and click the snapshot that you want to defreeze. Under Home , click Defreeze.

The defreeze operation is completed in 4 hours. After completion, Phoenix sends an email informing you that your data is thawed. This data stays thawed for the duration specified in the email. You must perform a restore of your thawed data within this duration following instructions in the server. 

To restore the master database

  1. Log on to Phoenix Management Console
  2. On the menu bar, click Servers. 
  3. Under the Configured tab, select the MS-SQL server that you want to restore. 
  4. Click Restore > Snapshot Restore.
    (Hot snapshots) In the left pane, expand Hot, and click the snapshot that you want to restore. 
    (Warm snapshots) In the left pane, expand Warm, and click the snapshot that you want to restore. 
    (Thawed snapshots)  In the left pane, expand Thawed, and click the snapshot that you want to restore.

    Note: The timestamps of the snapshots are displayed according to the server time zone. For example, the timestamps for servers located in New York and London are displayed according to EST and UTC time zones, respectively.

  5. Under Home , click an instance, select the master database, and click Restore

  6. In the Select server list, click the MS-SQL server to which you want to restore the master database.

    Note: Servers that you configured as MS-SQL servers, along with the original server, appear in this list.

  7. In the Specify location box, type or select the absolute path to the restore location, and then click OK
    SQL_Restore_Specify_location.PNG

    Note: Symbolic links and mounted folders do not appear in the folder structure. If the server is not connected to Phoenix Cloud, Phoenix cannot fetch the folder structure data. To initiate a restore, you must type the absolute path to the restore destination. The restore operation remains in a pending state, and starts only after the server connects to Phoenix Cloud.

  8. Use the database_files.txt file to determine the database mapping. 
  9. Stop the instance to which you want to attach the master database.
  10. Attach the restored master database files to a database within the instance. For a full set of instructions, see Moving the master database in Move System Databases
  11. Start the instance again. 

To restore user databases and other system databases

Restore the database files

  1. Log on to Phoenix Management Console
  2. On the menu bar, click Servers. 
  3. Under the Configured tab, select the MS-SQL server that you want to restore. 
  4. Click Restore.  
  5. In the left pane, expand Hot, and click the snapshot that you want to restore. 
    Note: The timestamps of the snapshots are displayed according to the server time zone. For example, the timestamps for servers located in New York and London are displayed according to EST and UTC time zones, respectively.
  6. Under Home, click an instance, and from the list of databases, select the user or the system databases, and then click Restore
  7. Select Restore database files
  8. In the Select server list, click the server to which you want to restore the databases.
    Note: Servers that you configured as MS-SQL servers, along with the original server, appear in this list. 
  9. In the Specify location box, type or select the absolute path to the restore location, and then click Done.

Note: Symbolic links and mounted folders do not appear in the folder structure. If the server is not connected to Phoenix Cloud, Phoenix cannot fetch the folder structure data. To initiate a restore, you must type the absolute path to the restore destination. The restore operation remains in a pending state, and starts only after the server connects to Phoenix Cloud.

  1. Copy the system database files to: C:\Program Files\Microsoft SQL Server\<Instance Name>\MSSQL\DATA
  2. Use the database_files.txt file to determine the database mapping. Attach the restored databases to an instance. For a full set of instructions, see this article in the Microsoft library.

Restore the databases to the original instance

  1. Log on to Phoenix Management Console
  2. On the menu bar, click Servers. 
  3. Under the Configured tab,  select the MS-SQL server that you want to restore. 
  4. Click Restore
  5. Click the MS-SQL server that you want to restore, and then click Restore
    Hot snapshots) In the left pane, expand Hot, and click the snapshot that you want to restore. 
    (Warm snapshots) In the left pane, expand Warm, and click the snapshot that you want to restore. 
    (Thawed snapshots) In the left pane, expand Thawed, and click the snapshot that you want to restore. 
    Note: The timestamps of the snapshots are displayed according to the server time zone. For example, the timestamps for servers located in New York and London are displayed according to EST and UTC time zones, respectively. 
  6. Under Home, click an instance, and from the list of databases, select the user or the system databases, and then click Restore.  
  7. Select Restore to original SQL server instance
  8. In the Specify location box, type or select the absolute path to the restore location, and then click Done.
Note: Symbolic links and mounted folders do not appear in the folder structure. If the server is not connected to Phoenix Cloud, Phoenix cannot fetch the folder structure data. To initiate a restore, you must type the absolute path to the restore destination. The restore operation remains in a pending state, and starts only after the server connects to Phoenix Cloud.

Restore the database to an alternate MS-SQL server instance

  1. Log on to Phoenix Management Console
  2. On the menu bar, click Servers. 
  3. Under the Configured tab,  select the MS-SQL server that you want to restore . 
  4. Click Restore
  5. Click the MS-SQL server that you want to restore, and then click Restore
    Hot snapshots) In the left pane, expand Hot, and click the snapshot that you want to restore. 
    (Warm snapshots) In the left pane, expand Warm, and click the snapshot that you want to restore. 
    (Thawed snapshots) In the left pane, expand Thawed, and click the snapshot that you want to restore. 
    Note: The timestamps of the snapshots are displayed according to the server time zone. For example, the timestamps for servers located in New York and London are displayed according to EST and UTC time zones, respectively.
  6. Under Home, click an instance, and from the list of databases, select the user or the system databases, and then click Restore.  
  7. Select Restore to alternate MS-SQL server instance
  8. Provide the server, instance, and location of restore and click Done

MS-SQL server database snapshot restore workflow 

Following steps describe the restore job when you trigger a snapshot restore of your databases.

Step Operation

1

You or another administrator initiates a restore. 

2

Phoenix checks if Phoenix agent is running. 

  • If the agent is running, Phoenix executes the restore operation.
  • If the agent is not running, Phoenix queues the restore request. The request is executed after Phoenix agent on the MS-SQL server starts running.
3 Phoenix validates the restore destination (original instance or another MS-SQL server). 

4

Phoenix validates if the restore destination is not a drive. For example, a restore to D:\ fails. 

Note: Set a restore location to a subfolder, and not the drive, for example, D:\ThisFolder.  

5 Phoenix validates if the instance to which restore is initiated is available. 
6 Phoenix validates if the databases for restore are available. 
7 Phoenix checks the free space available at the restore destination. 

8

Phoenix starts the restore operation by identifying filesets for restore. Phoenix sequentially downloads filesets to the restore destination. Within a fileset (which might contain data belonging to more than one database), Phoenix performs a simultaneous download of files belonging to different databases. After the download of a fileset completes, Phoenix downloads the next fileset (which might also contain data belonging to one or more databases) to the restore destination.

9

Phoenix uses the following syntax for the restore: <destination path>\<snapshot>\<Request ID>\<Fileset>\<Actual file>. The <Request ID> folder uniquely identifies each restore request.

10

Additionally, Phoenix also creates the database_files.txt file at D:\restore\<snapshot>\<Request ID>. This file contains details of how the database files are mapped to the database, and how the database is mapped to its instance in a Unicode format. 

11

At the location that you specified, Phoenix restores the databases as rst_<Database Name>. However, if Phoenix finds that rst_<Database Name> is already present at the location, it appends an incremental counter to the database name. For example, at the time of restoring database DB, if Phoenix finds rst_DB from a previous restore operation, the database DB is restored as rst_DB_1. The counter increments by 1 for every occurrence of an existing restore dataset.

12

After the restore completes, the database becomes active under the instance that you specified. 

Note: During restore, the database appears as "Restoring". The database becomes available only after the restore completes.