AWS RDSDatabase

Steps to Restore XtraBackup to AWS Aurora

Till the end of this topic, you will come to know Steps to Restore XtraBackup to AWS Aurora.

One of our customers is using Percona Xtrabackup to backup their on-prem/EC2 Mysql databases.
We were in a situation to restore their on-prem/Ec2 database to Aurora. The size of the database is around 1.6TB. Option infront of us was to take mysqldump and restore but this option is more time consuming but this possible from this below step.

So we decided to restore the existing Percona’s backup. AWS already documented this process here. In this documentation, they used innobackupex script to backup, but we can use xtrabackup instead.

What is Xtrabackup?
It is an open-source utility for MySQL. It is used for taking hot backup MySQL based servers which will not lock our database during the backup.

It can back up data from InnoDB, XtraDB, and MyISAM tables on MySQL 5.1 [1], 5.5, 5.6 and 5.7 servers, as well as Percona Server with XtraDB. Percona XtraBackup is designed in such a way that it make backups without disrupting the performance of the server in a production/devlopment/stagging environment.
Command to take Backup from xtrabackup :

Steps to Restore XtraBackup to AWS Aurora
Here we didn’t compress anything.

Upload the backup folder to S3

·         Go to RDS console and click on Restore Aurora DB Cluster from S3.
Steps to Restore XtraBackup to AWS Aurora
·         Specify Source Backup Details.
Steps to Restore XtraBackup to AWS Aurora
·         In Source Engine Version you can mention the Major version, (ie 5.6.2 as 5.6).
Create an IAM role which will have read permission for the file from S3, you can create the Role in the same page or create role in IAM with the below mentioned policy and select in RDS console.
·         In Specify DB Details page looks like the following.
Steps to Restore XtraBackup to AWS Aurora
·         Click Next to create an Instance. And configure below settings:
    • Advanced settings
    • Database Options
    • Failover
    • Backup
    • Monitoring
    • Maintenance
·         Now click Launch DB instance.
Steps to Restore XtraBackup to AWS Aurora
Steps to Restore XtraBackup to AWS Aurora
·         If you want to see how much data is migrated to Aurora then click to Cluster tab as per following:
Steps to Restore XtraBackup to AWS Aurora
·         Once it is migrated, then it’ll take few minutes to create an instance.
Its restored.
In this process, we didn’t compress anything, but it supports gz, tar, .xbstream formats. If you want to compress your backup file, please use the below command in the backup script. 

Dont compress the backup directory after the backup, it won’t work.

NOTE: Each compressed files must be < 5TB.


Related Articles


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Adblock Detected

Please consider supporting us by disabling your ad blocker
%d bloggers like this: