Restoring MySQL Tables to the Same Host

By default, the software restores a database table to the same location from where it was backed up. You can also restore database tables to a different MySQL instance.

You can perform a point-in-time restore, which is useful when you recover the changes made to a database object up to a given point in time. You can select and restore the database object to a state that it had previous to that point.

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 the Same Host.

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 the 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. Optional: To restore the selected tables to a different instance on the same client, from the Destination Server list, select the name of the destination instance.

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

  9. Verify that the tables that 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.

      Note

      • 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 stored procedures, views, triggers and functions from the MySQL Server, and then type the following command to manually apply the dump files present at the staging location to the restored database:

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

Loading...