Created
April 27, 2011 17:37
-
-
Save markcaudill/944756 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
TMPFILE=/tmp/`hostname`.databases.`date '+%Y-%m-%d'`.sql | |
TMPGZFILE=$TMPFILE.gz | |
mysqldump -u root --password='PASSWORD' \ | |
--all-databases --add-drop-database \ | |
> $TMPFILE | |
gzip $TMPFILE #This will make a file with the $TMPGZFILE filename. | |
s3cmd put $TMPGZFILE s3://YOURBUCKET/ | |
rm -f $TMPFILE $TMPGZFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment