How to restore a MySQL backup - all databases

Modified on Sun, 17 Oct, 2021 at 4:56 PM

When you have installed the MySQL backup script for Acronis Cloud Backup, you can use this article to restore MySQL databases.

When Acronis made the backup, MySQL is temporarily frozen to prevent data loss when creating the backup.

Requirements

  • You have access to the target server using SSH.
  • You have either MySQL or MariaDB running.
  • You know the MySQL data location (usually /var/lib/mysql).

Recovery all MySQL databases

  1. Stop MySQL on your server.
    systemctl stop mysql
    Note: it is possible that your MySQL service has a different name. Make sure that no cron service tries to start MySQL. To be safe, you can run the following:
    systemctl stop crond
  2. Copy the existing data to a temporary folder:
    cp /var/lib/mysql /var/lib/mysql_backup -r
  3. Navigate to the Acronis Cloud Backup portal at https://eu2-cloud.acronis.com
  4. Authenticate
  5. Click on Recover next to the server where you want to recover the data from.
  6. Click on Recover next to the data point you want to restore and click on Files/folders.
  7. Click on the hard drive.
  8. Navigate to the parent folder of the backup location. If the location is /var/lib/mysql, navigate to /var/lib.
  9. Select the checkbox next to the folder. In this case, mysql.
  10. Click on Recover.
  11. Make sure that Original location is selected.
  12. Click on Start Recovery.
  13. Once done, you can start MySQL.
    systemctl start mysql
    systemctl start crond

If everything went well, you can delete the folder /var/lib/mysql_backup.

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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article