Skip to content

Instantly share code, notes, and snippets.

@ultim8k
Forked from vasilisvg/more.md
Created April 21, 2012 01:17
Show Gist options
  • Save ultim8k/2433086 to your computer and use it in GitHub Desktop.
Save ultim8k/2433086 to your computer and use it in GitHub Desktop.
This is my backup script which syncs my server to my dropbox every day.

The script below is triggered every day from my Mac. I use Hazel to move the tar.gz to an external hard disk once it's finished. This happens every day without me noticing.

You should have a similar script.

rsync -a --del -e ssh user@example.com:~/webdirectory/ ~/myname/Dropbox/Backups/webapps
cd ~/myname/Dropbox/Backups/webapps
dt=$(date +%y%j)
tar czf webapps$dt.tar.gz webapps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment