-
-
Save anonymous/7061449508acaf18c8eb2461b1d62074 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/sh | |
BACKUP_FILENAME="MYSITE_sql_$(date +%F_%H%M%S).gz" | |
OBJECT_NAME="$(date +%Y)/$(date +%m)/$BACKUP_FILENAME" | |
mysqldump -u root -pPASSWORD database_name | gzip -9 > /var/backups/$BACKUP_FILENAME | |
/usr/local/bin/swift upload --object-name $OBJECT_NAME backups-mysite /var/backups/$BACKUP_FILENAME | |
shred -u /var/backups/$BACKUP_FILENAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment