Created
October 18, 2016 15:38
-
-
Save paxperscientiam/37ce0969eb7d08e4ec4b60fbea1de599 to your computer and use it in GitHub Desktop.
Archive web projects
This file contains 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
#!/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