Skip to content

Instantly share code, notes, and snippets.

@Hagith
Created April 5, 2013 07:54
Show Gist options
  • Save Hagith/5317413 to your computer and use it in GitHub Desktop.
Save Hagith/5317413 to your computer and use it in GitHub Desktop.
Sync files over network
## 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