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, and pay careful attention to the requirements and restrictions discussed there.
You can facilitate a server upgrade or downgrade by using MySQL Enterprise Backup to make a backup of your data from a source server, restore it to a new target server, and, after some preparations, start a different version of MySQL Server on the restored data (see In-Place Upgrade for details and limitaions). Here are a number of things that users should pay attention to when restoring a backup with a database server upgrade or downgrade:
Restoring a database server with a server downgrade should only be performed when the MySQL servers on the source and the target servers are in the same release series. Downgrading to a lower series (for example, from 8.2 to 8.0) might cause server crashes or data corruption.
Back up the data on the source server.
Using the same version of MySQL Enterprise Backup with which the backup was taken, restore the data to the target server by running a
copy-back-and-apply-logoperation on the backup.
Install on the target server the same version of MySQL Server that was running on the source server when your backup was created.
Start the MySQL Server you just installed. Your restored data go through an abbreviated crash recovery process in preparation for a server upgrade.
Perform a slow shutdown of the MySQL Server you just started in the last step by issuing the
SET GLOBAL innodb_fast_shutdown=0statement and then shutting the server down. This ensures that all dirty pages are flushed, and hence there will be no redo log processing later for the upgraded server.
Install the newer MySQL Server version on the target server.
Start the newer MySQL Server version you just installed on the data directory you have restored and prepared in the earlier steps.
Perform any other additional upgrade steps that might be required for your platform or distribution as documented in the MySQL reference manual.
After performing these steps, check your data to make sure that your restore has been successful.