Here’s a very handy script to mirror a site via ftp with lftp:
1 2 3 |
#!/bin/bash lftp -c 'open -e "set ftp:list-options -a; mirror -a --parallel=10 -v fromdir/ ./todir" -u user,pass host' |
And here’s a mirror in the opposite direction:
1 2 3 |
#!/bin/bash lftp -c 'open -e "set ftp:passive-mode false; set ftp:list-options -a; mirror -a --parallel=1 --reverse -v fromdir/ ./todir" -u user,pass host' |