Created
April 5, 2013 07:54
-
-
Save Hagith/5317413 to your computer and use it in GitHub Desktop.
Sync files over network
This file contains hidden or 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
## LFTP | |
lftp -c "set ftp:list-options -a; | |
open ftp://${FTP_USER}:${FTP_PASSWD}@${FTP_HOST}; | |
lcd ${SOURCE_PATH}; | |
cd ${DEST_PATH}; | |
mirror --reverse \ | |
--delete \ | |
--verbose \ | |
--ignore-time \ | |
--exclude-glob public/shared/*" | |
# RSYNC | |
BASEDIR=`dirname $(cd ${0%/*} && echo $PWD/${1##*/})` | |
rsync -avz --delete $BASEDIR/assets/ host:/home/user/assets/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment