Skip to content

Instantly share code, notes, and snippets.

@yuikns
Last active August 29, 2015 13:56
Show Gist options
  • Save yuikns/9287130 to your computer and use it in GitHub Desktop.
Save yuikns/9287130 to your computer and use it in GitHub Desktop.
backup & rsync a remote project
#!/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 hang@10.1.1.111:xdatacenter_load/ proj/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment