With Acronis Cloud Backup, you can backup your MySQL databases by installing the correct backup scripts. Using these scripts, your Acronis installation will make sure that MySQL safely stores all data on your hard drive and locks the table before creating a data capture point.
How to install Acronis backup for MySQL
- Clone the git repository to install the backup scripts using the following command:
cd /var/lib/Acronis/ git clone [email protected]:Yourwebhostereu/acronis-mysql.git mysql
- If you are not using DirectAdmin, make sure that the .my.cnf contains your login data for MySQL. DirectAdmin configurations are auto detected.
[client] user=root password="replace_with_your_password"
- Acces the Cloud portal for Acronis on https://eu2-cloud.acronis.com.
- Click on the backup cog next to the server you want to configure and click on Backup.
- Click on the cog next to the backup plan you have created earlier and click on Backup options.
- Click on Pre-post data capture commands.
- Mark Execute a command before the data capture as yes.
- Enter in Command or batch file path on the machine with an agent the following:
/var/lib/Acronis/mysql/pre-freeze-script.sh - Make sure that Fail the backup if the command execution fails is enabled.
- Mark Execute a command after the data capture as yes.
- Enter in Command or batch file path on the machine with an agent the following:
/var/lib/Acronis/mysql/post-thaw-script.sh - Click on Done.
- Click on Save Changes.
- Click on RUN NOW to capture the databases. Any previous backup may not contain valid of databases.
How does this work?
- When Acronis starts creating a backup, the tables are flushed to the disk and write locks are set.
- A data capture point is made.
- Acronis releases the lock on the tables.
Acronis registers all changes made to the disk. When a data capture point is made, the actual data is not backup yet. Instead, the moment is captured and transferred afterwards to the backup servers. This prevents that a lock persists during the creation of the backup.
Learn here how to restore a MySQL backup from Acronis.
For more information regarding Acronis Cloud Backup you can use the official Acronis Cloud backup documentation.