Skip to content

Instantly share code, notes, and snippets.

@bretthoerner
Created April 30, 2012 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bretthoerner/2558746 to your computer and use it in GitHub Desktop.
Save bretthoerner/2558746 to your computer and use it in GitHub Desktop.
#!/bin/bash
date=`date "+%Y%m%d"`
file="/tmp/mysql-${date}.dump.gz"
mysqldump -h"host" -u"user" -p"pass" tr_production | gzip > $file
s3cmd put $file s3://bucket/mysqlbackups/ 2> /dev/null
rm -f $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment