Created
November 6, 2015 19:33
-
-
Save nwgat/93f99b269fa24c2301e9 to your computer and use it in GitHub Desktop.
mirrorscript
This file contains 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
### 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