How do I restore the data from S3 aws cloud storage to MySQL server (on ec2 instance rhel 7.3) using mysqlbackup utility

I want to restore a MySQL backup taken by mysqlbackup from S3 aws cloud storage to MySQL server hosted on linux ec2 instance.

like0

Answers

You can use the below command to restore your backup from S3 to ec2 using mysqlbackup (Only if the backup was taken using mysqlbackup utility)

mysqlbackup\
--defaults-file=/bkups/backupdir/backupmy.cnf \
--cloud-service=s3 --cloud-aws-region=<aws region> \
--cloud-access-key-id=<aws access key id> --cloud-secret-access-key=< aws secret access key> \
--cloud-bucket=<s3 bucket name> --cloud-object-key=<aws object key> \
--backup-dir=/home/user/dba/s3backuptmpdir \
--datadir=/home/user/dba/datadir \
--backup-image=- \
copy-back-and-apply-log

Tags: 

0 points
up
down