Which "option batch" value to use in order selecting the "Retry" option ?

Advertisement

PlanetIrata
Guest

Which "option batch" value to use in order selecting the "Retry" option ?

Hi, I'm using the synchronize command and it seems that ther is no "option batch" value that will select "Retry" when a file upload fails :

- If I use "option batch continue", the script will choose "Skip" and synchronize command continue without reporting the upload error in the XML log.

- If I use "option batch on", the script will stop when the file upload fails, and report an error.

Is there a "option batch xxxxx" that could select the "Retry" choice in synchronize when an upload error occurs ?

Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Which "option batch" value to use in order selecting the "Retry" option ?

"upload error" is too broad description. What specific error are you getting?
Note that there's no way to make WinSCP retry on any possible error.

Reply with quote

Guest

Re: Which "option batch" value to use in order selecting the "Retry" option ?

martin wrote:

"upload error" is too broad description. What specific error are you getting?
Note that there's no way to make WinSCP retry on any possible error.

Here is an "upload error" sample log when a big file transfer fails and can't be resumed because the APPE command is not supported :

_media\atd-distribution081310-spellchecker-server.tgz       |      73504 KiB |   76,0 KiB/s | binary |  69%
Lost connection.
Disconnected from server

Copying files to remote side failed.
(A)bort, (R)econnect (5 s): Reconnect
Connecting to ftpperso.free.fr ...
Connected with ftpperso.free.fr. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
_media\atd-distribution081310-spellchecker-server.tgz       |      73584 KiB |   77,0 KiB/s | binary |  69%
_media\atd-distribution081310-spellchecker-server.tgz       |            0 B |    0,0 KiB/s | binary |   0%
Error transferring file '_media\atd-distribution081310-spellchecker-server.tgz'.
Copying files to remote side failed.

'APPE': command unrecognized.
(A)bort, (R)etry, (S)kip, Ski(p) all: Skip

WinScp choose "Skip", and do NOT log any error in the XML log file. It would be very useful to have these improvements :

- an option to say to WinSCP to (R)etry at least 3 times (for instance)
- if the failure persists after 3 tries, having a <result success="FALSE" /> in the XML log file (for now the failed upload do not appear anywhere in the XML log file).

Thanks.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Which "option batch" value to use in order selecting the "Retry" option ?

- an option to say to WinSCP to (R)etry at least 3 times (for instance)
Retrying unsupported command does not help.
You have to tell WinSCP no to try to resume at all using -resumesuport=off
https://winscp.net/eng/docs/scriptcommand_put#resumesupport

(for now the failed upload do not appear anywhere in the XML log file).
That happens with the option batch continue more only, right?

Reply with quote

Guest

Re: Which "option batch" value to use in order selecting the "Retry" option ?

Thanks Martin, yes I use option batch continue.

I tried adding -resumesupport=off to synchronize command, and it now retries to upload a file from start when disconnected. It is a more predictable behavior, but the best of both world would be a sort of --resumesupport=auto that would use on if the APPE is supported, and off if not, depending on the server capabilities.

Do you think it's possible ?

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Which "option batch" value to use in order selecting the "Retry" option ?

Will see if more people ask for this.

Reply with quote

Guest

Re: Which "option batch" value to use in order selecting the "Retry" option ?

martin wrote:

Will see if more people ask for this.

Thanks anyway for your great work !

Reply with quote

Advertisement

You can post new topics in this forum