Documentation Home
MySQL Enterprise Backup 4.0 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.2Mb
PDF (A4) - 1.2Mb

MySQL Enterprise Backup 4.0 User's Guide  /  ...  /  Restoring a Backup with a Database Upgrade or Downgrade

5.3 Restoring a Backup with a Database Upgrade or Downgrade

You can facilitate a server upgrade or downgrade by using MySQL Enterprise Backup to make a backup of your server data, restore it to a data directory, and start a different version of MySQL server on the old data. However, you may encounter technical challenges during a server upgrade or downgrade, and it is beyond the function of MySQL Enterprise Backup, as a backup tool, to ensure a successful server upgrade or downgrade. Users interested in the topic are advised to consult the MySQL server manual, especially the Upgrading MySQL and Downgrading MySQL sections.

Here are a number of things that users should pay attention to when restoring a backup with a database upgrade or downgrade:

  • Restoring a database to an older MySQL version (i.e., server downgrading) should only be performed when the original and the final server versions are in the same release series (for example, going from 5.5.30 to 5.5.29). Downgrading to a lower series (for example, from 5.6.33 to 5.5.33) might cause server crashes or data corruption.

  • Restoring a database to a newer MySQL version (i.e. server upgrading) requires the following steps, the skipping of which might crash the target server:

    • Back up the data on the older server.

    • Restore the data to the directory you plan to use as the newer server's data directory by running a copy-back-and-apply-log operation on the backup.

    • Restart the older server, using the intended data directory for the newer server as its own data directory. With this step, the older server prepares the data for an upgrade by performing some clean-up steps on the data, similar to what the server would do during a crash recovery.

    • Perform a slow shutdown for the older server by, issuing the SET GLOBAL innodb_fast_shutdown=0 statement and then shutting the server down. This will ensure that all dirty pages are flushed, and hence there will be no redo log processing for the newer server.

    • Install the newer server.

    • Start the newer server.

    • Run upgrade steps as documented in the MySQL reference manual on the restored data. Make sure the mysql_upgrade that comes with your newer server is applied.

    After performing these steps, check your data to make sure that your restore is successful.