Skip to content

Instantly share code, notes, and snippets.

@markbao
Created February 16, 2009 18:52
Show Gist options
  • Save markbao/65302 to your computer and use it in GitHub Desktop.
Save markbao/65302 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# backup stuff
#
newfile=$(date +%Y-%m-%d_%H-%m-%S)$1
touch $newfile.sql
mysqldump -h DATABASE_LOCATION -u USERNAME -pPASSWORD DATABASE_NAME > /backup/$newfile.sql
s3cmd put $newfile.sql s3://ramamia-backup/$newfile.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment