Skip to content

Instantly share code, notes, and snippets.

@paxperscientiam
Created October 18, 2016 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paxperscientiam/37ce0969eb7d08e4ec4b60fbea1de599 to your computer and use it in GitHub Desktop.
Save paxperscientiam/37ce0969eb7d08e4ec4b60fbea1de599 to your computer and use it in GitHub Desktop.
Archive web projects
#!/opt/local/bin/bash
# you should be sure to alter the above path to match the bash you want to use.
# adjust source and target to match your needs.
# adjust exclusions to match your needs.
# recommendation: use in conjunction with cron.
#
# As part of a multipronged strategy, I use rsync for archiving my work on Dropbox.
# As always, use this code at your own peril.
source='/opt/local/apache2/htdocs/www'
target='/Users/user/The Cloud/Dropbox/webbackup/'
#
rsync -avL --stats --human-readable --progress --delete-excluded --exclude={"openseadragon","cache","vendor","node_modules","composer","bower_components"} "${source}" "${target}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment