Skip to content

Instantly share code, notes, and snippets.

@jordan8037310
Last active August 29, 2015 14:18
Show Gist options
  • Save jordan8037310/583e8944dec730544d20 to your computer and use it in GitHub Desktop.
Save jordan8037310/583e8944dec730544d20 to your computer and use it in GitHub Desktop.
mysqldump -u sqluser -ppassword database | gzip > /root/sqlbackups/databasename_`date '+%m-%d-%Y'`.sql.gz
# Crontab Settings to manage this export
# Yes, not sophisticated at all
##############
# crontab -e #
##############
# 30 2 * * * /root/awsmysqldump.sh 2>&1>> /root/awsmysqldump.log
# 00 3 * * * s3cmd put /root/sqlbackups/* s3://mybackupsbucket/serverfolder/sqlbackups/ > /dev/null
# 30 3 * * * rm -rf /root/sqlbackups/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment