Skip to content

Instantly share code, notes, and snippets.

@MacoTasu MacoTasu/mysqldump2s3

Last active Mar 31, 2016
What would you like to do?
mysqldump -h $MYSQL_HOST -u$MYSQL_USER_NAME -p$MYSQL_PASSWORD --single-transaction --master-data=2 $DB_NAME | gzip > mysqldump.sql.gz
date_str=`date +"%Y%m%d%I%M"`
aws s3 mv mysqldump.sql.gz s3://****-mysqldump/"${date_str}".sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.