58136: Acronis Cyber Protect, Acronis Cyber Backup: Backing Up MySQL

Last update: 18-04-2022

Starting from version C21.12, Acronis Cyber Protect Cloud has a dedicated Agent for backing up MySQL/MariaDB. Please see the following pages for more information: Installing Cyber Protection agents in Linux and Protecting MySQL and MariaDB data. Advanced Backup quota is required for backing up MySQL/MariaDB.

For Acronis Cyber Protect 15 and earlier versions of the on-premises product, follow the instructions below to back up MySQL databases on a machine in consistent state:

  1. Windows: Make sure MySQL Tools folder is in Windows `%PATH%` on the machine where backup is performed. Instructions for adding [MySQL binaries to `%PATH%`]. Make sure local connection is allowed for MySQL client without explicitly passing credentials on the machine where backup is performed. 
  2. Download and unpack scripts that should be executed before and after snapshot creation:
    Scripts for Linux 
    Scripts for Windows
    The scripts lock tables with “FLUSH TABLES WITH READ LOCK;” command and unlock them after Acronis software takes the snapshot.
  3. Place config.sh to the working directory of the scripts.
  4. Apply the scripts:
    • when backing up a VMware virtual machine at hypervisor level (agent-less backup), place the scripts on a VMware virtual machine to specific directories listed in this article. The scripts will be executed inside the VM upon quiesced snapshot creation automatically. There is no need to add these scripts into backup options when configuring a backup task in the Cyber Protection console.
    • when backing up a physical machine, specify these scripts in the Pre-post data capture commands section of your backup plan options:

  5. Use either Entire Machine or Disk/Volumes backup method for backing up machine with MySQL: these methods create a snapshot during backup which ensures that the database will be backed up in consistent state. File/folder backup method is not recommended for backing up relational databases such as MySQL, as capturing Pre-post data commands may not be effective. 

Additional information

Backups of MySQL versions below 8.0 are not officially supported with these scripts.