Created
January 16, 2014 17:42
-
-
Save DarrylDias/8459669 to your computer and use it in GitHub Desktop.
Sync folder using Lftp. you need to install Lftp to use this script on you system
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
#!/bin/bash | |
HOST='yourwebsite.com' | |
USER='your_username_here' | |
PASS='your_password_here' | |
TARGETFOLDER='/remote_folder' | |
SOURCEFOLDER='/home/myuser/local_folder' | |
lftp -f " | |
open $HOST | |
user $USER $PASS | |
lcd $SOURCEFOLDER | |
mirror --reverse --delete --verbose $SOURCEFOLDER $TARGETFOLDER | |
bye | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment