Where can I find the defaults for lftp
? Eg net:max-retries
and net:timeout
.
I'm asking because I get some **** Data socket error (Connection timed out) - reconnecting
message in my lftp debug log. And it seems to retry forever if I don't quit the process manually. Which is bad for cron jobs.
Questions:
How could I explicit set the timeout and retries for one special script, which is as follows:
lftp -c "
open $HOST
user $USER $PASS
lcd $SOURCEFOLDER
mirror --delete --verbose $FSOURCE $FTARGET
exit
"
And how could I catch any sync errors in the batch file above, so that I could eg send an email notification on max timeouts?
Still I don't know how to find out the defaults. But could change them as follows:
From inside lftp prompt:
This will list all the defaults for lftp on your system.
lftp has context specific help. So you can type:
Which returns:
/etc/lftp.conf
This is the default settings file for lftp on our systems.
You can simply add lines to this as per the settings in membersound's answer above.