Select Page

Month: October 2017

Steps to Restore XtraBackup to AWS Aurora

Till the end of this topic you will come to know who to restore your percona 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. Take the Backup: xtrabackup –backup –user=root –password=xxxx–target-dir=/tmp/xtrabackup Here we didn’t compress anything. Upload the backup folder to S3 aws s3 sync /tmp/xtrabackup s3://****/xtrabackup ·         Go to RDS console and click on Restore Aurora DB Cluster from S3. ·         Specify Source Backup Details.   ·         In Source Engine Version you can mention the Major version, (ie...

Read More

Fastest method for taking MySQL Backup and Restore

Mydumper and Myloader are utility which allows you to perform extremely fast and reliable multi-threaded MySQL backup and restore. These tools are written in the C programming language. Mydumper is a a tool for fast reliable logical backups. It is an alternative to mysqldump and has many advantages over mysqldump some of which are listed below: ·  Multi-threaded backup tool which makes it a lot faster than mysqldump, as mysqldump is single threaded. It will be more advantage if you have very fast storage such as SSDs which can be much better utilized with multiple threads. ·  The tool produces separate files for separate tables instead of one big monolithic file, making it easy to restore single tables. You can even break/chunk the table into multiple files which is super useful for cases where you have very large tables. ·  The tool allows for multi-threaded restores, making restores an order of magnitude faster in comparison to restoring from mysqldump produced backups. This is especially true for large datasets. ·  The Mydumper tool provides in-built compression, so that the backup files are written in compressed form. When it comes to backing up and restoring MySQL database, most people usually use the very popular mysqldump. You know that mysqldump is very easy to use for a smaller database, it doesn’t work well with larger databases. It’s very slow for huge databases and very error prone...

Read More