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.
- 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
- 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
- Copy the existing data to a temporary folder:
cp /var/lib/mysql /var/lib/mysql_backup -r
- Navigate to the Acronis Cloud Backup portal at https://eu2-cloud.acronis.com
- Click on Recover next to the server where you want to recover the data from.
- Click on Recover next to the data point you want to restore and click on Files/folders.
- Click on the hard drive.
- Navigate to the parent folder of the backup location. If the location is /var/lib/mysql, navigate to /var/lib.
- Select the checkbox next to the folder. In this case, mysql.
- Click on Recover.
- Make sure that Original location is selected.
- Click on Start Recovery.
- 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.