Last active
August 29, 2015 13:56
-
-
Save yuikns/9287130 to your computer and use it in GitHub Desktop.
backup & rsync a remote project
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
#!/bin/sh | |
DIR_LIST=`cat filelist` | |
EXC_PATTERN=`cat exclude` | |
tar -czvf .bak.src.`date "+%Y%m%d%H%M%S"`.tar.gz $DIR_LIST | |
rsync -avh --progress --exclude=$EXC_PATTERN [email protected]:xdatacenter_load/ proj/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment