Skip to content

Instantly share code, notes, and snippets.

@Sulcalibur
Forked from vasilisvg/more.md
Created October 4, 2013 08:37
Show Gist options
  • Save Sulcalibur/6822822 to your computer and use it in GitHub Desktop.
Save Sulcalibur/6822822 to your computer and use it in GitHub Desktop.

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 can exclude folders if you want to. You probably want to exclude giant cache folders.

You should have a similar script.

rsync --exclude="w3tc/" -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