Restoring MySQL Tables to a Different Host (Cross-Machine Restore)

You can restore objects to a different database on the destination client (cross-machine). A cross-machine restore is one in which the restore destination is a different client from the client where the backup was taken.

Note

Do not use this method to restore a MySQL Server. For instructions to perform a full instance restore, see Restoring a MySQL Instance to a Different Host (Cross-Machine Restore).

Before You Begin

Check whether you meet the following requirements:

  • The source and destination clients have the same version of MySQL Server.

  • The destination client meets the MySQL system requirements for block-level backup.

  • MySQL Agent and MediaAgent are installed on the destination client.

Procedure

  1. From the CommCell Browser, expand Client Computers > Client > MySQL > Instance.

  2. Right-click the subclient, and then select Browse and Restore.

  3. On the Browse and Restore Options dialog box, identify the data that you want to restore.

    For more information, see Browse and Restore Data.

  4. Select Table View and click View Content.

  5. From the Browse window, select tables to restore. Optionally, right-click a table, and select whether to include or exclude dependent or referenced tables.

    Restriction: The following database objects do not appear in the Browse window and you cannot restore them:

    • mysql

    • information_schema

    • performance_schema

  6. Click Recover All Selected.

    The MySql Restore dialog box is displayed.

  7. From the Destination Server list, select the name of the destination client where you want to restore the tables.

  8. Ensure that the status of the destination server is On-Line. If required, click Refresh to update the status.

  9. Verify that the tables you selected for restore appear in the Database List.

  10. Under Options, select the following options to further configure your restore operation:

    • To include stored procedures, triggers, views, and user-defined functions in the restore, select the Restore as dump for Stored Procedures, Views, Triggers and Functions check box.

      Dump files are not restored along with the database. The dump files are present at the staging location. After the restore is complete, you have to manually apply the dump files to the restored database.

      For more information, see What to Do Next at the bottom of this page.

    • To delete the existing databases or tables prior to restore, select the Drop Database or Table if exists check box.

      If you do not select this option, and the database or the table that you are trying to restore already exists, the restore operation will fail. See troubleshooting Article ID: MSQL0001.

    • To specify target database names for the databases that you want to restore, select the Define auxiliary database names for Table Restores check box. Click the Target Database column next to the database and enter the target database name.

      Note

      If you select the Do not Recover option, do not specify the target database names.

  11. Choose how to restore or recover the database tables:

    • To restore and recover table objects, select Recover, and in the Staging Location box, enter the location where the table objects will be restored.

    • To restore table objects without recovery, select Do not Recover, and in the Destination Folder box, enter the location where you want to export the table objects.

      Notes

      • The file permissions for the staging directory must be set to 777.

      • Do not use root directory as a staging location.

  12. Select Point-in-time, and then set the restore date, time, and time zone to the appropriate values.

    Note

    The latest backup cycle is selected by default. To perform a point-in-time restore from an earlier cycle, browse from the respective cycle.

  13. In the MySql Restore dialog box, click OK.

What to Do Next

After the restore is complete, manually drop the dump of stored procedures, views, triggers and functions present at the staging location, and then type the following command to manually apply the dump files to the restored database:

mysql -u <username> -p <database name> < <dump file>

Loading...