I am using an older version of LFTP -  Version 3.6.1.  If the problem
I describe below is fixed in a newer version, then I apologise - It's
not simple for me to upgrade to the latest version due to acces to the
server and I am hoping this is might just be a misconfiguration on my
part.

We have an 3rdparty that is providing FTP server access on a single
day of the week and they do not tell us what time this window starts
and ends on the day.

Rather than a while/until loop I was hoping to simply use lftp's
inbuilt interval settings to retry periodically through the day.  I am
testing it against an unavailable host to ensure the correct behaviour
when lftp cannot connect and have found that for every interval it
uses up 3 retries, so this makes using the interval option a problem.

Example using lower interval periods.

lftp -e '
    debug 10
    set net:timeout 10
    set net:reconnect-interval-base 5
    set net:reconnect-interval-max 5
    set net:reconnect-interval-multiplier 1
    set net:max-retries 15
    set net:persist-retries 2
    mirror --verbose "remotedir" "/tmp/localdir"
    bye
    '  -u user,pass ftpserver.example.com

---- dns cache hit
---- Connecting to ftpserver.example.com (10.11.12.13) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- dns cache hit
---- Connecting to ftpserver.example.com (10.11.12.13) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- dns cache hit
---- Connecting to ftpserver.example.com (10.11.12.13) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket

cd `remotedir' [Delaying before reconnect: N]

---- dns cache hit
---- Connecting to ftpserver.example.com (10.11.12.13) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- dns cache hit
---- Connecting to ftpserver.example.com (10.11.12.13) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- dns cache hit
---- Connecting to ftpserver.example.com (10.11.12.13) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket

cd `remotedir' [Delaying before reconnect: N]

.....

And so on.... until it hits the number of retries.

How can I set it up so it only uses 1 retry for every interval?  So in
the example above there would be 15 intervals 5 seconds apart not 4
intervals.

Thanks
_______________________________________________
lftp mailing list
[email protected]
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to