I'd like to run lftp in the background to create a backup of a rather large remote system. Due to a not-so-fast internet connection this will take over a week. Since nobody will be able to monitor the progress etc. during this time and the internet connection could have an outage, I wonder if there are some settings in lftp that will make it retry forever if something fails (most programs just retry a few times and if they still cannot (re-)connect terminate).

link|improve this question

73% accept rate
Someone with enough rep please re-tag with lftp. – ThiefMaster Jan 25 at 16:46
feedback

1 Answer

Without more information on the backup process... I can honestly only give you some bits of things to try.

If the "backup" is one megalithic file, you're going to have a harder time. Many FTP clients can "resume" a broken download automatically, and with the help of the -c parameter, lftp can indeed resume uploads & downloads. Additionally, there is a command to repeat the command until OK... i.e.:

lftp repeat --until-ok put -c /some/dir/the-backup ftp://username@host
link|improve this answer
Actually... I'm not 100% sure that will work... I believe that repeat only works as long as the connection is active. You may try scripting it... put it in a bash-script and loop until the exit code is 0. – TheCompWiz Jan 25 at 17:33
I have multiple files in a folder which I'll copy through lftp's mirror command. – ThiefMaster Jan 25 at 18:02
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.