Advanced Restore - SQL Server iDataAgent

Table of Contents

Restoring a Database

Recovering a Database

Recover a Database in the Offline State

Recover a Database in the Standby State

Recover one or more Databases in the Online State

Restoring System Databases

Restoring Files or Filegroups

Restore One or More Files or Filegroups

Restore a Database using File/Filegroup Level

Performing Partial Restore of a Database

Restoring SQL Server Transaction Logs (Step Restore)

Applying Log Backups

Restoring SQL Databases to a Point in Time

Restoring Only the Logs

Restoring SQL Server Databases to a Transaction Mark

Restoring a Database With Restricted Access

Preserving Replication Settings

Keeping Change Data Capture (For SQL Server 2008 and Above)

Increasing the VDI Timeout

Performing an Out-of-Place Restore

Copying a Database to a Different Location

Copying a Database to a Different SQL Server Instance

Moving a Database

Moving a Database Back to the Original Location After a Move

Scheduling a Restore

Setting Up Pre-Post Processes

Setting Up a Pre/Post Process to Run After Each Attempt

Managing Restore Jobs

Restarting Jobs

Controlling Jobs

Additional Restore Options

Command Line Restores

Log on to the CommServe

Perform the Restore

Generate the Command Line Script from the CommCell Console

Restoring a Database

By default, a database is restored in the same location from where it was backed up and the existing database files are overwritten. This restore leaves the database in an online state. Follow the steps given below to restore a database:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a non-system database you want to restore and click Recover All Selected.
  2. Click Unconditionally overwrite existing database or files.
  3. Click OK to start the restore.

Recovering a Database

By default, a database is left in the online state after a restore. However, you might need to change the state of the database depending on your needs (e.g., if you want to make the database inaccessible to the users). By recovering a database, you can select the state in which the database is to be left. Follow the steps given below to recover a database:

Recover a Database in the Offline State

If you want the database to be offline after the restore, follow the steps given below:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select the database to be recovered and click Recover All Selected.
  2. Click Norecovery.
  3. Click Unconditionally overwrite existing database or files.
  4. Click OK.

Recover a Database in the Standby State

If you want the database to be in a read-only state after the restore, follow the steps given below:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select the database to be recovered and click Recover All Selected.
  2. Click Stand by.

    Specify the path to the undo file or click Browse to locate the file.

  3. Click Unconditionally overwrite existing database or files.
  4. Click OK.

Recover one or more Databases in the Online State

If you have a database in the offline or standby state and you want to bring the database back to the online state, follow the steps given below:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select the databases you want to recover and click Recover All Selected.
  2. Click Recover Only.
  3. Click OK.

Restoring System Databases

System databases are essential for the operation of the SQL server instance. If you need to restore the SQL Server in the event of a system failure, the system databases (master, msdb and model) must be backed up. The tempdb does not get backed up as it is re-created by the SQL Server every time the server is started.

By default, system databases are restored in the same location from where they were backed up and their data files are overwritten. Follow the steps given below to restore the system databases:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the instance, point to All Tasks, and then click Browse Backup Data.
  3. Click OK.
  4. In the left pane of the Browse window, navigate to the instance node.
  5. Select the system databases (master, msdb, and model) in the right pane and click Recover All Selected.
    If you choose to restore the system databases individually, it is recommended to follow this order: master, msdb, model.
  6. Click Unconditionally overwrite existing database or files.
  7. Click OK to start the restore.
  8. Click Yes. The system stops and restarts the SQL Server service in single-user mode.

Restoring Files or FileGroups

By default, files or filegroups are restored in the same location from where they were backed up. File/Filegroup restores give you the ability to bring back the files that have been damaged in the event of a failure. You can restore specific files and filegroups from both:

During a File/Filegroup restore job, the system restores the latest full and differential backups and then uses the transaction log backups up to the specified restore time. Hence, transaction logs are needed to successfully restore files or filegroups as it determines the end time of the restore. For more information, see Transaction Log Backups.

File/Filegroup restores are commonly used for situations in which individual data files on a database are damaged.

Restore One or More Files or filegroups

For a single data file, the file/file group restore chain consists of the most recent full backup, the most recent differential (if any), and all subsequent transaction log backups that occurred prior to the restore time. However, for multiple files or file groups, the same rules apply for each data file, and the log backups to be restored will be determined by the file requiring the oldest log.

Follow the steps below to restore one or more files or filegroups from a database:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click File/File Group and then click OK.
  1. In the left pane of the Browse window, navigate to the database that contains the files or filegroups you want to restore.
  2. Select the files or filegroups you want to restore in the right pane and click Recover All Selected.
  3. Click Unconditionally overwrite existing database or files.
  4. Click OK to start the restore.

 

Restore a Database using File/filegroup Level

You can restore a database in its entirety by restoring all the filegroups within the database. Follow the steps below to restore the entire database at the File/filegroup level:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click File/File Group and then click OK.
  1. In the right pane of the Browse window, select the database you want to restore.
    Multiple databases cannot be restored at the filegroup level.
  2. Click Recover All Selected.
  3. Click Unconditionally overwrite existing database or files.
  4. Click OK to start the restore.

 

Performing Partial (Piecemeal) Restore of a Database

If the size of a filegroup in a database is large, the restore operation may take considerable time. In such case, you can restore the database in stages.

Partial restores also known as Piecemeal Restore in SQL Server versions 2005 and later allows you to restore a database in stages.

Follow the steps given below to restore a database in stages at filegroup level:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click File/File Group and then click OK.
  1. In the left pane of the Browse window, navigate to the database that contains the filegroups you want to restore.
  2. Select the filegroups you want to restore in the right pane and click Recover All Selected.
  3. Select the Partial Restore check box.
  4. Click OK to start the restore.
  5. Perform the partial restore of all remaining filegroups one by one to restore the entire database.

After performing a partial (piecemeal) restore job, the next backup job for that database is automatically converted to a full backup.

Restoring SQL Server Transaction Logs (Step Restore)

When you want to restore an event in the database but do not know the exact time of the event, you can first restore the database in the standby state and apply transaction logs to the database. The Step Restore enables you to append the logs to such a database. (Both Incremental or Transaction Log backups can be applied.) Use the following procedure to apply the log backups one by one to scan through the changes that have been committed between each log backup. This way you can avoid performing multiple full restores when you are not sure of the point of restore required.
Step Restores can be performed on individual databases.

Follow the steps given below to apply the logs to a database in the standby state:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select the database that is already restored in the standby state and click Recover All Selected.
  2. Select the Destination Server. The destination Server must be different than source server.
  3. Select Step Restore.
  4. Select a Log backup from the Restore Time list.
  5. Select the Unconditionally overwrite existing database or files check box.
  6. Click OK to start the log restore.

If required, you can apply logs from other Log backups by selecting a different Log backup from the Restore Time list.

Applying Log Backups

This option enables you to apply all the latest transaction logs to a hot standby sever. The hot standby server is the server where you can restore a latest backup data periodically. Follow the steps given below to restore only the logs that are backed on a specific time:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database that is already restored in the standby state and click Recover All Selected.
  2. Select the Destination Server. Select the hot standby server.
  3. Select the Latest Backup Data check box.
  4. Select the Apply Log backups only check box.
  5. Select the time and a Log backup from the Restore Time list.
  6. Click OK to start the log restore.

The Transaction Logs, backed up on the selected time will be restored and applied to the database.

Restoring SQL Databases to a Point in Time

If any undesired transaction occurs in the database, you can revert the database to a state just before the transaction. The point in time option enables you to restore the database to a specific point-in-time. This option is useful in the following scenarios:

 Before performing the point-in-time restore of a database, ensure that transaction logs for the database are backed up. Follow the steps given below to restore a database(s) to a point in time:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select one or more databases and click Recover All Selected.
  2. Select the Point-in-Time check box.
  3. From the Restore Time lists, select the date and the time.
  4. Select the Unconditionally overwrite existing database or files check box.
  5. Click OK to start the restore.

The database(s) will be restored to the selected date and time.

When you perform a point-in-time restore for a database, the next scheduled backup for that database will automatically convert to a Full backup.

Restoring Only the Logs

If you are using any third-party software to backup and restore the databases, you can use SQL Server iDataAgent to restore only the logs. The database for which you are restoring logs must be in the standby state. Follow the steps given below to restore logs for a database:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database that is already restored in the standby state and click Recover All Selected.
  2. Select the Destination Server. Select the server and instance in which the restored database resides in the standby state.
  3. Select the Point-in-Time check box.
  4. Select the Skip FULL Backup check box.
  5. Specify the Restore Time.
  6. Click OK to start the log restore.

The most recent log backup before the Restore Time will be restored and applied to the database.

Restoring SQL Server Databases to a Transaction Mark

You can restore directly to the marked transaction or a point before the transaction if the Transaction logs of the database has transaction marks.

This can be useful in situations where a transaction has caused undesirable results on a database and you need to go back to the point before that occurred.

Before performing the restore, ensure that transaction logs are backed up for the database that you want to restore to a transaction mark.

Follow the steps given below to restore a database(s) to a transaction mark:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database that is already restored in the standby state.

    You can select multiple databases. However, the transaction marks must be common to all the selected databases.

  2. Click Recover All Selected.
  3. Select the Transaction Marks check box.
  4. Select the transaction mark from the Restore Time list.
  5. Select Stop at Mark or Stop Before Mark.

    If you select Stop at Mark the database will be restored to the selected transaction mark. If you select Stop Before Mark, the database will be recovered to a previous transaction mark.

  6. Click OK to start the restore.

After performing a transaction mark restore job, the next backup job for that database is automatically converted to a full backup.

Restoring a Database with Restricted Access

This option is used to restore the database in a state where only the owner of the database can access the database.

Follow the steps given below to restore the database for the Database Owner (DBO_ONLY state):

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database and click Recover All Selected.
  2. Select the Leave Database in DBO use only state check box.
  3. Select the Unconditionally overwrite existing database or files check box.
  4. Click OK to start the restore.

After the database is restored, only the owner of the database can access the database.

Preserving Replication Settings

You can preserve all the replication settings of a published database when you perform an out-of-place restore of a database. This options is used to restore backups of replicated databases. Only full backups are supported with this option, so make sure that you have performed at least one Full backup before restoring the database with replication settings. Follow the steps given below to preserve the replication settings:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database and click Recover All Selected.
  2. Select a SQL Server and instance from the Destination Server list.
  3. Ensure that Recovery option is selected from the Recovery Types.
  4. Select the Preserve Replication Settings check box.
    Selection of Preserve Replication Settings option is not available in Microsoft SQL Server 2005.
  5. Click Advanced and select the Options tab.
    • Change the path of the database and log files under the Physical Path column.
    • Click OK.
  6. Click OK to start the restore.

After the restore has completed, all the replication settings of the database are available on the destination server.

If the publication database is restored, ensure that the replication settings of the master and msdb databases on the Distributor and Subscriber servers are consistent with the publication database. For more information, see Backing Up and Restoring Replication Databases.

Keeping Change Data Capture (for SQL Server 2008 and above)

The SQL Server 2008 has an option to capture the changed data. If you have enabled this option, the changed data (insert, update, and delete) is captured and applied to SQL tables. The details of the changes are available in an easily applicable relational format. You can restore the captured changes and apply them to the restored database. You cannot restore the captured changes if you are using VSS enabled backup for restore.

Follow the steps given below to restore the captured data:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database and click Recover All Selected.
  2. Select the Keep Change Data Capture check box.
  3. Click OK to start the restore.

After the restore has completed, all the data changes are available and applied to the restored database.

Increasing the VDI Timeout

The VDI (Virtual Device Interface) is an API used to communicate with the SQL Server during all backup and restore operation. When restoring a database, the VDI timeout represents the time the system must wait for the SQL server to become ready to accept data into the database. If any databases are dropped from the SQL Server after the backup, the database file(s) do not exist on the sever. Before starting the restore operation, these files will be created automatically on the SQL Server. The time required to create the file(s) will be the same as when you first created the database or altered the database and added the file(s).

By default, the system will wait 50 minutes (10 retries of five minutes each) for the SQL server to respond to a VDI command before giving up. If the SQL server takes longer then this timeout value, the system assumes that the command failed, and it aborts the restore operation.

Follow the steps given below to increase the VDI Timeout for a SQL Server instance.

  1. From the CommCell Browser, navigate to Client Computers | <Client> |SQL Server
  2. Right-click the <Instance> and then click Properties.
  3. Enter the VDT Timeout.
  4. Click OK.

 

Performing an Out-of-Place Restore

Use one of the methods below to restore a SQL database to a different location.

Copying a Database to a Different Location

Follow the steps below to restore a database to a different location on the same destination server:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select the databases you want to restore and click Recover All Selected.
  2. Click Advanced.
  3. Click the Options tab.
  4. Rename the database under the Database column and change the path of the database and log files under the Physical Path column.
    • If there are many files, use the Find & Replace option to enter the new destination path for all of them at once.
    • If the database file path is changed without changing the database name, the existing database will be overwritten and will point to the new location.
  5. Click OK.
  6. Click OK to start the restore.

Copying a Database to a Different SQL Server Instance

By default, when restoring to a different SQL Server instance, a database is restored to the same location in the destination server. Follow the steps below to restore a database to a different destination server.

System databases cannot be restored to a different server as they would overwrite the existing system databases in the destination server.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select the databases you want to restore and click Recover All Selected.
  2. Select the Destination Server.
    If the same path cannot be used for any reason (e.g., the destination server does not have the corresponding path), click Advanced. From the Options tab, rename the database and change the path of the data files.
  3. Click OK to start the restore.

 

Moving a Database

You can restore the database to a different location without changing its name. You cannot move a system database to a different location.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database and click Recover All Selected.
  2. Click Advanced.
  3. Select the Options tab.
  4. Change the path of the database and log files under the Physical Path column.
  5. Click OK.
  6. Click OK to start the restore.

Moving a Database Back To the Original Location After a Move

If you perform a restore operation to move the database back to its original location, the database files will not be moved back as the database already exists on the server. The restore job will only check the database name and will restore the database on top of the same database regardless of its location. To move the database files back to the original location, use one of the following workarounds:

Command Line Restores

You can perform restores of one of more databases from the command line interface.

Command line restores enable you to perform restore operations on multiple clients at the same time. It also allows you to reuse the command line scripts for additional restores.

When performing command line restores, note that backups taken from the CommCell Console can be restored using Command Line and vice versa. However, backups taken from a previous version of the CommCell Console can be restored only from the Command Line.

In order to run the restores from command line, you need an input xml file which contains the parameters for configuring the restore options. This input xml file can be obtained using one of the following ways:

Log on to the Commserve

To run command line operations you must first login to the CommServe as follows:

Perform the Restore

  1. Download the restore_template.xml file and save it on the computer from where the command will be executed.
  2. Execute the saved xml script using qoperation execute command.

    qoperation execute -af restore_template.xml -clientName xxxxx -instanceName xxxxx -toTimeValue yyyy-mm-dd hh:mm:ss -restoreSource xxxxx -database xxxxx

  1. Verify the status of the job using the following command:

    qlist job –j JOBID

  2. Once the job completes, logout from the CommServe using the qlogout command.

    qlogout [-cs commserver] [-all] [-tf tokenfile] [-tk token] [-h]

Out-of-Place Restore On the Same SQL Server

  1. Download the out_of_Place_restore_template.xml file and save it on the computer from where the command will be executed.
  2. In the template locate the following section and edit it as per your setup:

    <device>|DB1|#12!DB1_rename|#12!DB1|#12!E:\RestoreLocation\DB1.mdf|#12!C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DB1.mdf</device>

    <device>|DB1|#12!DB1_rename|#12!DB1_log|#12!E:\RestoreLocation\DB1_log.ldf|#12!C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DB1_log.ldf</device>

    Where:
  3. Execute the saved xml script using qoperation execute command.

    qoperation execute –af out_of_Place_restore_template.xml -clientName xxxxx -instanceName xxxxx -restoreSource xxxxx -database xxxxx -toTimeValue yyyy-mm-dd hh:mm:ss

  4. Verify the status of the job using the following command:

    qlist job –j JOBID

  5. Once the job completes, logout from the CommServe using the qlogout command.

    qlogout [-cs commserver] [-all] [-tf tokenfile] [-tk token] [-h]

Out-of-Place Restore On a Different SQL Server

  1. Download the out_of_Place_restore_template.xml file and save it on the computer from where the command will be executed.
  2. In the template locate the following section and edit it as per your setup:

    <device>|DB1|#12!DB1_rename|#12!DB1|#12!E:\RestoreLocation\DB1.mdf|#12!C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DB1.mdf</device>

    <device>|DB1|#12!DB1_rename|#12!DB1_log|#12!E:\RestoreLocation\DB1_log.ldf|#12!C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DB1_log.ldf</device>

    Where:
  3. Execute the saved xml script using qoperation execute command, for example:

    qoperation execute -af out_of_Place_restore_template.xml -clientName client1 -instanceName client1\instance1 -restoreSource DB1 -database DB1 -toTimeValue yyyy-mm-dd hh:mm:ss -destClient/clientName client2 -destinationInstance/clientName client2 -destinationInstance/instanceName client2\instance2

  4. Verify the status of the job using the following command:

    qlist job –j JOBID

  5. Once the job completes, logout from the CommServe using the qlogout command.

    qlogout [-cs commserver] [-all] [-tf tokenfile] [-tk token] [-h]

Examples

Restoring from a Current Backup

qoperation execute -af restore_template.xml -clientName client1 -instanceName client1\instance1 -restoreSource DB1 -database DB2 –toTimeValue 2011-11-28 15:40:00

Restoring Databases to a Point in Time (date and time)

qoperation execute -af pit_restore_template.xml -clientName client1 -instanceName client1\instance1 -restoreSource DB1 -database DB2 –toTimeValue 2011-11-28 15:40:00

Restoring Database In Place in Standby Mode qoperation execute -af standby_inplace_restore_template.xml -clientName client1 -instanceName client1\instance1 -restoreSource DB1 -database DB2 -toTimeValue 2011-11-28 15:40:00 -sqlRecoveryType STATE_STANDBY -renameFilesSuffix C:\UndoPath

Generate the Command Line Script From the CommCell Console

In addition to the parameters provided in the template xml file, if you want to include additional options for the restore, you can do so by selecting the required options from the CommCell Console and generate the command line xml script for the restore operation.

Follow the steps given below to generate a script which you can use to perform a restore from the command line interface:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select the data that you want to restore and click Recover All Selected.
  2. Select the required restore options which you want to execute using the script.
  3. Click Save as Script.
  1. Enter the location where you want to save the script or click Browse and navigate to the location.

    The script will be saved as a .xml file and a .bat file is created.

    If a file with the same name already exists in the specified location, the .xml file will be created with a timestamp. However, the .bat file will overwrite the existing file.

  2. Enter the username and password for the user account which you want to use to perform the restore.

    By default, the user account which you have used to login to CommCell console is used for performing the restore. However, if the user account does not have access to application and database, click Use a different account.

  3. Click OK.

Scheduling A restore

Follow the steps given below to schedule a restore job:

1.
  • From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  • Right-click the instance and then click All Tasks | Browse Backup Data.
  • Click OK.
2.
  • Select a database to restore.
  • Click Recover All Selected.
3. Select the required restore options.

Click OK.

 

4.
  • Click Job Initiation tab and click Schedule.
  • Click Configure.
5. Select the appropriate scheduling options.  For example:
  • Click Weekly.
  • Check the days you want the run the restore job.
  • Change the Start Time to 9:00 PM
  • Click OK to close the Schedule Details dialog
  • Click OK to close the Restore Options dialog

The restore job will execute as per the schedule.

See Scheduling for a comprehensive information on scheduling jobs.

setting up pre-post processes

You can run batch files or shell scripts before and/or after restore jobs. Follow the steps given below to setup a process before or after the restore job:
  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database and click Recover All Selected.
  1. Click Advanced and then click the Pre/Post tab.
  2. If you want perform a process before the restore job, enter the path for the batch file in the Pre Recovery Command box or click Browse to select the batch file.
  3. If you want perform a process after the restore job, enter the path for the batch file in the Post Recovery Command box or click Browse to select the batch file.
  4. Select one of the following options:
    • Use Local Accounts  - Select this option if the local account has permissions to execute the processes on the destination client.
    • Impersonate User  - Select this option and enter the username and password, that has the permissions to execute the processes on the destination client.
  5. Click OK.
  6. Click OK to start the restore.

Setting up a Pre/Post Process to run after each attempt

By default, a specified post process command is executed only on successful completion of the restore operation.
Use the following steps to run a post process even if the restore operation did not complete successfully. For example, this may be useful to bring a database online or release a snapshot.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. Click OK.
  1. In the right pane of the Browse window, select a database and click Recover All Selected.
  1. Click Advanced and then click the Pre/Post tab.
  2. Enter the path for the batch file in the Post Recovery Command box or click Browse to select the batch file.
  3. Select the Run Post Process for all attempts check box.
  4. Click OK.
  5. Click OK to start the restore.

Managing Restore Jobs

Once you initiate the restore operation, a restore job is generated in the Job Controller. Jobs can be managed in a number of ways. See Job Management for a comprehensive information on managing jobs.

The following sections provide information on the different job management options available:

Restarting Jobs

Jobs that fail to complete successfully are automatically restarted based on the job restartability configuration set in the Control Panel. Keep in mind that changes made to this configuration will affect all jobs in the entire CommCell.

To Configure the job restartability for a specific job, you can modify the retry settings for the job. This will override the setting in the Control Panel. It is also possible to override the default CommServe configuration for individual jobs by configuring retry settings when initiating the job. This configuration, however, will apply only to the specific job.

Configure Job Restartability at the CommServe Level

  1. From the CommCell Browser, click Control Panel icon.
  2. Select Job Management.
  3. Click Job Restarts tab and select a Job Type.
    • Select Restartable to make the job restartable.
    • Change the value for Max Restarts to change the maximum number of times the Job Manager will try to restart a job.
    • Change the value for Restart Interval (Mins) to change the time interval between attempts for the Job Manager to restart the job.
  4. Click OK.

Controlling Jobs

The following controls are available for running jobs in the Job Controller window:

Suspend

Temporarily stops a job. A suspended job is not terminated; it can be restarted at a later time.

Resume

Resumes a job and returns the status to Waiting, Pending, Queued, or Running. The status depends on the availability of resources, the state of the Operation Windows, or the Activity Control setting.

Kill

Terminates a job.

Suspending a Job

  1. From the Job Controller of the CommCell Console, right-click the job and select Suspend.
  2. The job status may change to Suspend Pending for a few moments while the operation completes. The job status then changes to Suspended.

Resuming a Job

  1. From the Job Controller of the CommCell Console, right-click the job and select Resume.
  2. As the Job Manager attempts to restart the job, the job status changes to Waiting, Pending, or Running.

Killing a Job

  1. From the Job Controller of the CommCell Console, right-click the job and select Kill.
  2. Click Yes when the confirmation prompt appears if you are sure you want to kill the job. The job status may change to Kill Pending for a few moments while the operation completes. Once completed, the job status will change to Killed and it will be removed from the Job Controller window after five minutes.

Additional Restore Options

Several additional options are available to further refine your restore operations. The following table describes these options, as well as the steps to implement them.

Be sure to read the overview material referenced for each feature prior to using them.

Option Description related topic
Use hardware revert capability if available This option allow you to revert the data to the time when the snapshot was created. Selecting this option brings back the entire LUN to the point when the snapshot was created, overwriting all modifications to the data since the snapshot creation. This option is only available if the storage array used for SnapProtect Backup supports the revert operation.
  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. In the Browse Options dialog box, click OK.
  4. In the Client Browse window, select the database you want to restore and click Recover All Selected.
  5. In the SQL Restore Options dialog box, click Advanced.
  1. Select Use hardware revert capability if available.
  2. Click OK.
 
Startup Options

The Startup Options are used by the Job Manager to set priority for resource allocation. This is useful to give higher priority to certain jobs. You can set the priority as follows:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. In the Browse Options dialog box, click OK.
  4. In the Client Browse window, select the database you want to restore and click Recover All Selected.
  5. In the SQL Restore Options dialog box, click Advanced.
  1. In the Advanced Restore Options dialog box, click Startup.
  2. On the Startup tab, select Change Priority.
  3. Enter a priority number - 0 is the highest priority and 999 is the lowest priority.
  4. Select the Start up in suspended State check box to start the job in a suspended state.
  5. Click OK.
Refer to Job Priority and Priority Precedence.
Copy Precedence By default, the system retrieves data from the storage policy copy with the lowest copy precedence. If the data was pruned from the primary copy, the system automatically retrieves data from the other copies of the storage policy in the lowest copy precedence to highest copy precedence order. Once the data is found, it is  retrieved, and no further copies are checked.

You can retrieve data from a specific storage policy copy (Synchronous Copy or Selective Copy). If data does not exist in the specified copy, the data retrieve operation fails even if the data exists in another copy of the same storage policy. Follow the steps given below to retrieve the data from a a specific storage policy copy:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. In the Browse Options dialog box, click OK.
  4. In the Client Browse window, select the database you want to restore and click Recover All Selected.
  5. In the SQL Restore Options dialog box, click Advanced.
  1. In the Advanced Restore Options dialog box, click Copy Precedence.
  2. On the Copy Precedence tab, select the Restore from copy precedence check box.
  3. Enter the copy precedence number.
  4. Click OK.
Refer to Recovering Data From Copies.
Data Path Options

The data recovery operations use a default Library, MediaAgent, Drive Pool, and Drive as the Data Path. You can use this option to change the data path if the default data path is not available. Follow the steps given below to change the default data path:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. In the Browse Options dialog box, click OK.
  4. In the Client Browse window, select the database you want to restore and click Recover All Selected.
  5. In the SQL Restore Options dialog box, click Advanced.
  1. In the Advanced Restore Options dialog box, click Data Path.
  2. On the Data Path tab, select the MediaAgent and Library.
  3. Select the Drive Pool and Drive for optical and tape libraries.
  4. Select the name of the Proxy server if you wish to restore using a proxy server.

    You can select the Proxy server only when you are restoring from a snapshot. This option is not available for a regular restore.

  5. Click OK.
Refer to Change Data Path.
Encryption

If the client's data is encrypted with a pass phrase, you must enter the pass-phrase to start the data recovery operation. Follow the steps given below to enter the pass-phrase:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. In the Browse Options dialog box, click OK.
  4. In the Client Browse window, select the database you want to restore and click Recover All Selected.
  5. In the SQL Restore Options dialog box, click Advanced.
  1. In the Advanced Restore Options dialog box, click Encryption.
  2. Enter the Pass Phrase.
  3. Click OK.
Refer to Data Encryption.
Alerts

This option enables users or user groups to get automatic notification on the status of the data recovery job. Follow the steps given below to set up the criteria to raise notifications/alerts:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SQL Server.
  2. Right-click the <Instance> and then click All Tasks | Browse Backup Data.
  3. In the Browse Options dialog box, click OK.
  4. In the Client Browse window, select the database you want to restore and click Recover All Selected.
  5. In the SQL Restore Options dialog box, click Advanced.
  1. In the Advanced Restore Options dialog box, click Alerts.
  2. Click Add Alert.
  3. From the Add Alert Wizard dialog box, select the required threshold and notification criteria and click Next.
  4. Select the required notification types and click Next.
  5. Select the recipients and click Next.
  6. Click Finish.
  7. Click OK.
Refer to Alert.
Command Line Restores Command Line Interface enables you to perform backups or restore from the command line. The commands can be executed from the command line or can be integrated into scripts.

You can also generate command line scripts for specific operations from the CommCell Browser using the Save As Script option.

Refer to Command Line Interface.
CommCell Readiness Report The CommCell Readiness Report provides you with vital information, such as connectivity and readiness of the Client, MediaAgent and CommServe. It is useful to run this report before performing the data protection or recovery job. Follow the steps given below to generate the report:
  1. From the Tools menu in the CommCell Console, click Reports.
  2. Navigate to Reports | CommServe | CommCell Readiness.
  3. Click the Client tab and click the Modify button.
  4. In the Select Computers dialog box, clear the Include All Client Computers and All Client Groups check box.
  5. Select the client from the Exclude list.
  6. Click the Include > button.
  7. Click OK.
  8. Click the MediaAgent tab.
  9. Clear the Include All MediaAgents checkbox.
  10. Select the MediaAgent from the Exclude list.
  11. Click Include >.
  12. Click Run.

    The generated report is displayed.

Refer to CommCell Readiness Report.
Restore Job Summary Report

The Restore Job Summary Report provides you with information about all the data recovery jobs that are run in last 24 hours for a specific client and agent. You can get information such as failure reason, failed objects, job options etc. It is useful to run this report after performing the restore. Follow the steps given below to generate the report:

  1. From the Tools menu in the CommCell Console, click Reports.
  2. Navigate to Reports | Jobs | Job Summary.
  3. Click Data Recovery on the General tab in the right pane.
  4. On the Computers tab, select the client and the agent for which you want to run the report.
  5. Click Run.
Refer to Restore Job Summary Report.