How to migrate data via backup/restore

Charmed MySQL is able to restore backups stored on S3-compatible storage.

The same restore approach is applicable to restore external backups made by a different Charmed MySQL installation, or even another MySQL charm. (Note that, in this case, the backup must be created manually using Percona XtraBackup)

See also

For data stored in legacy charms, see Migrate database data via mysqldump

Prepare

Before migrating data:

Migrate via backup/restore

The approach described below is a general recommendation, but we cannot guarantee restoration results. Contact us if you have any doubts about data migration/restoration.

And, as always, try it out in a test environment before migrating in production!

  • Retrieve root/admin level credentials from legacy charm.

  • Install Percona XtraBackup inside the old charm OR remotely.

  • Configure storage for database backup

  • Create a first full logical backup during the off-peak

  • Restore the external backup to a Charmed MySQL installation in a test environment

    • See {ref}`migrate-a-cluster

  • Test your application to make sure it accepted the new database

  • Schedule and perform the final production migration

Do you have questions? Contact us if you are interested in such a data migration!