Skip to content

Instantly share code, notes, and snippets.

@lstoll
Created February 17, 2009 23:11
Show Gist options
  • Save lstoll/66058 to your computer and use it in GitHub Desktop.
Save lstoll/66058 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd ~/backup.git
TIMESTAMP=`date +%Y-%m-%d.%H:%M:%SUTC`
mysqldump -u drupal_dev -p'ga$f*sbb' -h 127.0.0.1 drupal_dev > ~/backup.git/db/drupal_dev.sql
sudo rsync -a --delete ~drupal-dev/site_data/files/ ~/backup.git/content/drupal_dev
sudo git add *
sudo git commit -a -m "$TIMESTAMP"
sudo git gc
sudo git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment