Backup MySQL using Acronis Cloud Backup

Modified on Sun, 17 Oct 2021 at 04:51 PM

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

  1. Clone the git repository to install the backup scripts using the following command:
    cd /var/lib/Acronis/
    git clone git@github.com:Yourwebhostereu/acronis-mysql.git mysql
  2. 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"

  3. Acces the Cloud portal for Acronis on https://eu2-cloud.acronis.com.
  4. Click on the backup cog next to the server you want to configure and click on Backup.
  5. Click on the cog next to the backup plan you have created earlier and click on Backup options.
  6. Click on Pre-post data capture commands.
  7. Mark Execute a command before the data capture as yes.
  8. Enter in Command or batch file path on the machine with an agent the following:
              /var/lib/Acronis/mysql/pre-freeze-script.sh
  9. Make sure that Fail the backup if the command execution fails is enabled.
  10. Mark Execute a command after the data capture as yes.
  11. Enter in Command or batch file path on the machine with an agent the following:
              /var/lib/Acronis/mysql/post-thaw-script.sh
  12. Click on Done.
  13. Click on Save Changes.
  14. Click on RUN NOW to capture the databases. Any previous backup may not contain valid of databases.


How does this work?

  1. When Acronis starts creating a backup, the tables are flushed to the disk and write locks are set.
  2. A data capture point is made.
  3. 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.

Reference article.

For more information regarding Acronis Cloud Backup you can use the official Acronis Cloud backup documentation.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article