Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

DB data migration using ‘backup/restore’

:information_source: Tip: use ‘mysqldump’ manual to migrate legacy charms data.

This Charmed MySQL operator is able to restore it’s own backups stored on S3-compatible storage. The same restore approach is applicable to restore foreign backups made by different Charmed MySQL installation or even another MySQL charms. The backup have to be created manually using Percona XtraBackup!

Canonical Data team describes here the general approach and does NOT support nor guaranties the restoration results. Always test migration in LAB before performing it in Production!

Before the data migration check all limitations of the modern Charmed MySQL charm! Please check your application compatibility with Charmed MySQL before migrating production data from legacy charm!

The approach:

  • retrieve root/admin level credentials from legacy charm. See examples here.
  • install Percona XtraBackup for MySQL inside the old charm OR remotely. Ensure version is compatible with xtrabackup in Charmed MySQL revision you are going to deploy! See examples. BTW, you can use charmed-mysql SNAP/ROCK directly (more details here).
  • configure storage for database backup (local or remote, S3-based is recommended).
  • create a first full logical backup during the off-peak, example of backup command.
  • restore the foreign backup to Charmed MySQL Lab installation.
  • perform all the necessary tests to make sure your application accepted new DB.
  • schedule and perform the final production migration re-using the last steps above.

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

Last updated 1 year, 2 months ago. Help improve this document in the forum.