SnapProtect – Advanced Restore – MySQL iDataAgent

Table of Contents

Restoring and Recovering an Entire Server

Before performing the restore of an entire serve, the server should be shutdown (if it is online). The data part of the backup is then restored to the data directory of the server. Then, as part of the Transaction Log restore, the server is brought online and the logs are applied.

Before attempting a restore, we recommend you to save the data present on the destination server to a removable media. Then, clean up the data directories of the server and shut down the server. If you do not clean up, the existing data and the restored data together might make the destination server inconsistent.

Whenever the MySQL database is corrupt or lost, you can restore and recover it from the latest full backup.

Partial database restores are currently not supported. We only support entire server restore.

To the Same Instance on the Source Client

By default, the data is restored to 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.

Before you start the restore, make sure that the MySQL server is offline. If you attempt to restore while the server is running, the software will notify you to shutdown the server and then resume with the restore:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.
  2. Right-click <Instance> on the source client.
  3. Click All Tasks, and then click Restore MySql Server.
  4. Select Data and Log.
  5. Select Recover.
  6. In the Staging Location box, enter the staging location where the logs will be restored.
  7. Click OK.

To a Different Instance on the Source Client

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.
  2. Right-click <Instance> on the source client.
  3. Click All Tasks, and then click Restore MySql Server.
  4. In the dialog box that appears, from the Destination Server list, select the name of the instance where you want to restore.
  5. Select Data and Log.
  6. Select Recover.
  7. In the Staging Location box, enter the staging location where the logs will be restored.
  8. Click OK.

To a Different Destination Server (Cross-Machine Restore)

You can restore a server to the same instance on a different client (also called a cross-machine restore). When a server is restored to another client, the restored data inherits the permissions from the parent directory.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.
  2. Right-click <Instance> on the source client.
  3. Click All Tasks, and then click Restore MySql Server.
  4. In the dialog box that appears, from the Destination Server list, select the name of the destination client computer where you want to restore.
  5. Select Data and Log.
  6. Select Recover.
  7. In the Staging Location box, enter the staging location where the logs will be stored.
  8. Click OK.

To a Point-in-Time

The point-in-time database restore is useful in the following scenarios:

  • If any unwanted transaction occurs in the database, you can revert the database to a state just before the transaction.
  • If a database fails, you can restore to the state just before the point of failure.

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

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.
  2. Right-click <Instance>, click All Tasks, and then click Restore MySql Server.
  3. In the Staging Location box, enter the location where the server will be restored.
  4. Select Point-in-time, and then set the restore date, time, and time zone to the appropriate values.
  5. Click OK.

Restoring and Recovering Individual Databases

Whenever the MySQL databases are corrupt or lost, you can restore and recover them individually. MySQL database should be running when you perform the restore operation.

Following are the two different scenarios to restore the databases individually.

To the Source Server

This is a cross-machine restore involving a source server and a destination server. You can restore the databases from the destination server to the source server.

Before You Begin

  • Similar configuration files must be present at the destination server and the source server.
  • Username and password present in the Instance Properties dialog box should be same at the destination server and the source server.
  • Create an instance at the destination server. For step-by-step instructions, see SnapProtect - Configuration - MySQL iDataAgent.

Follow these steps to restore individual databases to the source server.

  1. On the source server, perform a restore operation using a snap subclient. For step-by-step instructions, see SnapProtect - Restore - MySQL iDataAgent.

    In the MySQL Restore dialog box, select the instance created at the destination server from the Destination Server box.

  2. On the destination server, create a subclient (using the instance created earlier) and assign it the databases you wish to restore. For step-by-step instructions, see Creating User-Defined Subclients.
  3. On the destination server, run a non-snap backup of all the selected databases. For step-by-step instructions, see Backup - MySQL iDataAgent.
  4. On the destination server, perform a restore operation using the newly created subclient.

    In the MySQL Restore dialog box, select the instance present at the source server from the Source Server box.

To the Same Instance

Data is restored to the same location from where it was backed up, and the existing database files are overwritten.

Follow these steps to restore individual databases to the same instance.

  1. Perform a restore operation on the server using a snap subclient. For step-by-step instructions, see SnapProtect - Restore - MySQL iDataAgent.

    In the MySQL Restore dialog box, select the Do not Recover option and provide a temporary empty folder path in the Destination Folder box.

    The data directory gets restored to the temporary folder.

  2. Start a new temporary MySQL server having the same set of data directory as present in the temporary folder. For starting the temporary sever, you will need to create a temporary MySQL configuration file.
  3. From the CommCell Console, create an instance at the temporary server. For step-by-step instructions, see SnapProtect - Configuration - MySQL iDataAgent.
  4. On the temporary server, create a subclient and assign it the databases you wish to restore. For step-by-step instructions, see Creating User-Defined Subclients.
  5. On the temporary server, run a non-snap backup of all the selected databases. For step-by-step instructions, see Backup - MySQL iDataAgent.
  6. On the temporary server, perform a restore operation using the newly created subclient.

    In the MySQL Restore dialog box, select the instance present at the source server from the Source Server box.

To the Same Instance Using MySQL Native Commands

Data is restored to the same location from where it was backed up, and the existing database files are overwritten.

Follow these steps to restore individual databases to the same instance using native mysqldump command.

  1. Perform a restore operation on the server using a snap subclient. For step-by-step instructions, see SnapProtect - Restore - MySQL iDataAgent.

    In the MySQL Restore dialog box, select the Do not Recover option and provide a temporary empty folder path in the Destination Folder box.

    The data directory gets restored to the temporary folder.

  2. Start a new temporary MySQL server having the same set of data directory as present in the temporary folder. For starting the temporary sever, you will need to create a temporary MySQL configuration file.
  3. Back up the required databases from the temporary server following this example command.

    mysqldump -databases 'testdb1' -u<username> -p<password> /tmp/testdb1.sql

  4. Restore the required databases to the source server following this example command.

    mysql –u<username> -p<password> /tmp/testdb1.sql

Restoring Data from a Backup Copy

You can perform a restore from the backup copy by setting the appropriate copy precedence number.

Before you start the restore, make sure that the MySQL server is offline. If you attempt to restore while the server is running, the software will notify you to shutdown the server and then resume with the restore:

Use the following steps to restore the data from backup copy :

  1. From the CommCell Browser navigate to the Client Computers | <Client> | MySQL.
  1. Right-click the subclient that contains the snapshots you want to restore, and point to All Tasks | Browse and Restore.
  2. Click View Content.
  3. From the Browse window, select the data you want to restore in the right pane and click Recover All Selected.
  4. From the MySQL Restore dialog box, click Advanced.
  5. Click the Copy Precedence tab and select the Restore from Copy Precedence checkbox.
  6. In the Copy Precedence box, type the copy precedence number for the backup copy.
  1. Click OK.
  2. Click OK in the MySQL Restore dialog box.

Restoring Data and Transaction Logs without Recovery

By default, the databases and logs are recovered along with the restore. However, if the MySQL Server is offline, you can restore the data and the logs to a destination folder. Later, you can recover the MySQL Server.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.
  2. Right-click <Instance>, click All Tasks, and then click Browse and Restore.
  3. In the dialog box that appears, click View Content.
  4. Select the appropriate database, and then click Recover All Selected.
  5. In the dialog box that appears, select Data and Log, if necessary.
  6. Select Do not Recover.
  7. In the Destination Folder box, enter the location where the database and the transaction logs will be restored.
  8. Click OK.

Restoring both Dump and Snap Backups from multiple subclients

Use the following steps to restore both the dump and snap backups from multiple subclients:

  • To restore from dump backups only, perform an instance level restore. For step-by-step instructions, see Perform a Restore.

    You can restore from snap backups only at subclient level. This cannot be done from instance level.

  • To restore from snap backups, perform a subclient level restore. You can also restore dump backups from the subclient level.

Reverting an Entire Database to the Same Host

You can use the revert operation to bring the MySQL database back to the point in time when the SnapProtect backup was taken.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.
  2. Right-click the <Instance>, point to All Tasks and then click Browse and Restore.
  3. Click View Content.
  4. In the right pane of the window, select one or more databases that you wish to restore and click Recover All Selected.
  1. Click Advanced.
  2. Select the Use hardware revert capability if available checkbox.
  3. Click Yes in the confirmation box to shutdown the MySQL server. The server will be shutdown (if it is running) before the revert operation is performed.
  4. Click OK to confirm the revert operation.

Scheduling a Restore

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.
  2. Right-click the <Instance>, click All Tasks, and then click Browse and Restore.
  3. Click View Content.
  1. In the right pane of the Browse window, select a database to restore and click Recover All Selected.
  2. Select the required restore settings.
  3. Click the Job Initiation tab and click Schedule.
  4. Click Configure.
  5. From the Schedule Details dialog box, select the appropriate scheduling options and click OK.
  6. Click OK.

The restore job will start as per the schedule set.

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. The following sections provide information on the different job management options available:

Restarting Jobs

Jobs that fail to complete successfully are restarted automatically based on the job restartability configuration set in the Control Panel. Changes made to this configuration 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 overrides the setting in the Control Panel. In addition, you can override the default CommServe configuration for individual jobs by configuring retry settings when you initiate the job. This configuration, however, applies only to the specific job.

Configure Job Restartability at the CommServe Level

  1. From the CommCell Console toolbar, click Control Panel.
  2. Under the System section, click Job Management.
  3. Click Job Restarts tab and select a Job Type.
    • Select Restartable to make the job restartable.
    • You can change the value for Max Restarts to change the maximum number of times the Job Manager will try to restart a job.
    • You can 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.

Control 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. Only preemptible jobs can be suspended.
Resume Resumes a job and returns the status to Waiting, Pending, Queued, or Running depending on the availability of resources or the state of the operation windows and activity control settings.

Restore jobs for this Agent are resumed from the beginning.

Kill Terminates a job.

These controls can be applied to:

  • All jobs in the Job Controller.
  • All selected jobs in the Job Controller providing you have the correct security associations at the proper level for each job selected.
  • All data protection operations running for a particular client or client/agent.
  • All data protection operations running for a particular MediaAgent.

Control a Job

  1. From the Job Controller of the CommCell Console, right-click the job and select Kill, Suspend, or Resume as desired.
    • When killing a job:

      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.

    • When suspending a job:

      The job status may change to Suspend Pending for a few moments while the operation completes. The job status then changes to Suspended.

    • When resuming a job:

      As the Job Manager attempts to restart the job, the job status changes to Waiting, Pending, or Running.

Resubmitting Jobs

If a restore job fails to complete successfully, you can resubmit the job without the need to reconfigure the original job's restore options using the Resubmit Job feature. When a job is resubmitted, all the original options, restore destinations, and other settings configured for the job remain in tact.

Resubmit a Restore Job

  1. From the CommCell Browser, right-click a client computer whose data recovery history you want to view, click View, then click to view a job history.
  2. From the Job History Filter dialog box, select Restore.
    • If you want to view more advanced options for restores, from the Job History Filter, select Restore, then click Advanced.
    • From the Data Recovery History Advanced Filter select the destination client computer of the restores you would like to view, then click OK.
  3. The system displays the results of the options you selected in the Data Recovery Job History window.
  4. Right-click on any job, and select Resubmit.
  5. Select the job options.
  6. Click OK.

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
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> | MySQL.
  2. Right-click the <Instance>, and then click All Tasks | Browse and Restore.
  3. In the Browse Restore Options dialog box, click View Content.
  4. In the right pane of the Browse window, select a database to restore, and then click Recover All Selected.
  5. In the MySql Restore dialog box, click Advanced.
  6. In the Advanced Restore Options dialog box, select the Startup tab.
  7. Select Change Priority.
  8. Enter a priority number where 0 is the highest priority and 999 is the lowest priority.
  9. Select the Start up in suspended State to start the job in a suspended state.
  10. 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 specific storage policy copy:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.
  2. Right-click the <Instance>, and then click All Tasks | Browse and Restore.
  3. In the Browse Restore Options dialog box, click View Content.
  4. In the right pane of the Browse window, select a database to restore, and then click Recover All Selected.
  5. In the MySql Restore 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

Data Recovery operations use a specific data path (Library, MediaAgent, Drive Pool, and Drive) to perform the restore operations as configured in the CommCell. By default, the system automatically identifies the data path for the restore operations. You can change the data path at the restore level by selecting a specific MediaAgent, library, drive pool or drive in the Advanced Restore Options dialog.

The following are some of the important situations where you may need to change the data path:

  • To free heavily loaded resources such as MediaAgents and libraries.
  • A library suffers severe hardware damage and you need to move its media to a different library in order to access data secured by data protection operations.
  • A drive pool within a library is being used much more frequently than another, and a storage policy copy from the more active drive pool can be assigned to the less active one.
  1. From the CommCell Browser, click Client Computers | <agent> | <instance name>. The default and other subclients (if available) are displayed on the right-hand windowpane.
  2. From the CommCell Browser, right-click the instance that contains the data you want to restore. Click All Tasks and then click Browse Backup Data.
  3. From the Browse Options window, click OK.
  4. From the browse window, select the data to be restored and click Recover all Selected.
  5. From the Restore Options for All Selected Items dialog box, click Advanced.
  6. From the Advanced Restore Options (General) tab, select the MediaAgent and Library that you wish to perform the restore.
  7. Select the Drive Pool and Drive for tape library.
  8. 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> | MySQL.
  2. Right-click the <Instance>, and then click All Tasks | Browse and Restore.
  3. In the Browse Restore Options dialog box, click View Content.
  4. In the right pane of the Browse window, select a database to restore, and then click Recover All Selected.
  5. In the MySql Restore 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 The Alert option is used for setting up the criteria to raise notifications/alerts for job statuses such as failure, success, or any other conditions triggered by the restore job. Adding alerts helps the user or the user group to get the notification automatically about the status of the restore job.
  1. From the CommCell Browser, click Client Computers | <agent> | <instance name>. The default and other subclients (if available) are displayed on the right-hand windowpane.
  2. From the CommCell Browser, right-click the instance that contains the data you want to restore. Click All Tasks and then click Browse Backup Data.
  3. From the Browse Options window, click OK.
  4. From the browse window, select the data to be restored and click Recover all Selected.
  5. From the Restore Options for All Selected Items dialog box, click Advanced.
  6. From the Advanced Restore Options (General) tab, click Add Alert.
  7. From the Add Alert Wizard window, select the Threshold and Notification Criteria. Click  Next.
  8. Select the Notification Types. Click  Next.
  9. Select the Users and User Groups. Click  Next.
  10. Verify the Summary.
  11. Click Finish.
Refer to Alerts and Notifications.
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 a backup or a recovery operation. Follow the steps given below to generate the report:
  1. On the CommCell Console menu bar, select the Reports tab.
  2. Click Readiness.

    The Report Selection dialog box appears.

  3. If necessary, select Reports | CommServe | CommCell Readiness in the left pane.
  4. Select the Computers tab, and then click Modify below the Computers list.
  5. In the dialog box that appears, clear Include All Client Computers and All Client Groups.
  6. Select the appropriate client from the Exclude list, and then click Include >.
  7. Click OK.
  8. Select the MediaAgent tab, and then clear Include All MediaAgents.
  9. Select the appropriate MediaAgent from the Exclude list, and then click Include >.
  10. Click Run.

    The report appears in your default Web browser.

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, and so on. It is useful to run this report after performing the restore. Follow the steps given below to generate the report:

  1. On the CommCell Console menu bar, select the Reports tab.
  2. Click Summary.

    The Report Selection dialog box appears.

  3. If necessary, select Reports | Jobs | Job Summary in the left pane.
  4. On the General tab, select Data Recovery Jobs.
  5. Select the Computers tab.
  6. Select the appropriate client and the appropriate agent.
  7. Click Run.

    The report appears in your default Web browser.

Refer to Restore Job Summary Report.