Replication for MySQL

Replication Using Warm Database Restore

This type of restore is also called Hot Server Restore. You can keep up-to-date copies of the production databases on alternate servers, thus minimizing down time in cases where the production database server has failed.

The advantages of Warm Database Restore over a traditional restore scenario is that the database is always kept in a near ready state. In the case of disaster, users do not need to wait for the time it would take to restore the database in its entirety. Only the latest backup may need to be applied to the target database before turning the application over to use it.

Prerequisites

Review the following requirements before performing a Warm Database Restore:

  • The primary MySQL server and hot standby server must be clients of the same CommServe and have the MySQL iDataAgent installed on each computer.

  • The primary MySQL server must be able to communicate with the hot standby server with one of the following network configurations:

    • Local Area Network (LAN) in the same domain

    • Local Area Network (LAN) in a different domain

    • Wide Area Network (WAN)

  • Two licenses for MySQL iDataAgent is required.

Back Up All the Subclients on the Primary Server

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL| <Instance>.

  2. Right-click the <subclient> and select Backup.

    The Backup Options for Subclient dialog box appears.

  3. Click OK.

Restore the MySQL Server on the Standby Server

Once you have taken a full backup of the Primary Server, perform a restore from the latest full backup on the Standby Server.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.

  2. Right-click the <Instance>, point to All Tasks, and select Restore MySql Server.

  3. Select the Recurring Restore check box.

  4. In the Staging Location box, type the location where the logs will be recovered. Alternatively, click Browse to select the staging location.

  5. Click OK.

standby_dr_02

Schedule Incremental Backups on the Primary Server

In order to bring up the Standby Server, you need to schedule regular incremental backups of the MySQL databases on the primary server.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL| <Instance>.

  2. Right-click the <subclient> and select Backup.

    The Backup Options for Subclient dialog box appears.

  3. Click Incremental.

  4. Click Schedule, and then click Configure.

    The Schedule Details dialog box appears.

  5. In the Schedule name box, type a schedule name.

  6. Select the backup scheduling options, as needed. For example: click Weekly. In the Start Time box, select the schedule time.

  7. Click OK.

  8. Click OK to close the Backup Options for Subclient dialog box.

Schedule Log Restores on the Standby Server

  1. From the CommCell Browser, navigate to Client Computers | <Client> | MySQL.

  2. Right-click the <Instance>, point to All Tasks, and select Restore MySql Server.

  3. Clear the Data check box.

  4. Select the Recurring Restore check box.

  5. In the Staging Location box, type the location where the logs will be recovered and applied. Alternatively, click Browse to select the staging location.

  6. Click OK.

    standby_dr_04

  7. Click the Job Initiation tab.

  8. Click Schedule to schedule the restore for a specific time.

  9. Click Configure.

  10. In the Schedule Name box, type a schedule name.

  11. Select the appropriate scheduling options. For example: Click Weekly.

  12. In the Select date and time of one job box, set the date and time for the restore job.

  13. Click OK.

standby_dr_05

Perform Disaster Recovery Operations for the Primary Server Database

In case if your entire primary server is lost or corrupted, you can directly use the standby server until the primary server is online. When using the standby server, perform regular backups of the database, and use those backups to perform a full system restore on the primary server.

Note

Once the full system restore has completed, you will need to set up the hot standby server again by repeating the steps outlined in this procedure.

Loading...