Created
April 1, 2011 12:38
-
-
Save bamthomas/898085 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_DIR=/dir/to/backup | |
SQL_FILE=backup.sql | |
mysqldump --skip-extended-insert --skip-dump-date \ | |
-uuser -ppwd database | | |
grep -v 'INSERT INTO `wp_statpress`' > $BACKUP_DIR/$SQL_FILE | |
rsync -ax /dir/to/wordpress/wp-content/themes/twentyten \ | |
$BACKUP_DIR/twentyten | |
git --git-dir=$BACKUP_DIR/.git --work-tree=$BACKUP_DIR commit \ | |
-m "auto backup" $SQL_FILE twentyten |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment