Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
mirrorscript
### Batch use (old)
mirror from server
<p>bash.exe ./lftp.exe sftp://user:password@site:port -e "set sftp:connect-program './ssh.exe'; mirror --verbose --use-pget-n=8 -c /remote/path /cygdrive/driveletter/folder; quit"</p>
mirror to server
<p> bash.exe ./lftp.exe sftp://user:password@site:port -e "set sftp:connect-program './ssh.exe'; mirror -R --verbose --use-pget-n=8 -c /cygdrive/driveletter/folder /remote/path; quit" </p>
### Nwgat LFTP Mirror Script (only SFTP for now)
*Dont work with 4.6.2 or later atm
i also created a easy script that features both mirror and reverse mirror, lget (a small and basic download utily much like wget) and standard lftp console
and it looks like this
Nwgat LFTP Mirror Script
http://nwgat.net / contact@nwgat.net
1) mirrorfrom
2) mirrorto
3) lftp
4) lget
5) Quit
Please enter your choice:
Script can be found at
https://github.com/nwgat/lftp
####Install:
Windows
Download LFTP
Download https://github.com/nwgat/lftp/archive/master.zip
drag and drop lftpmirror-win.sh and lftpmirror-win.bat in bin folder
Run lftpmirror.bat
Linux
wget https://raw.githubusercontent.com/nwgat/lftp/master/lftpmirror.sh
chmod +x ./lftpmirror.sh
./lftpmirror.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.