Re: Topic Reply Notification - log reports file does not exist when it does exist.
Thanks for pointing this out. I will try it.
If this theory is true (and it may not be) would it be possible that between the time the WinScp script locates the file and flags it for download and the time the script actually attempts to download the file, the file has been moved by the server? The time lag between the two functions in the script could be significant in my case where there are a large number of files to download and my internet connection is slow. So, if this theory is correct, it seems like the WinScp script should simply skip a file it cannot find and move on rather than stopping the script. (then report a list of skipped files to a log.) The problem seems to be that when the script can't find a file, it terminates with a failure, rather than skipping the file and moving on. Please give me your thoughts on this theory.
option batch continue
. 2020-11-08 04:51:31.257 1604787017.M350619P14553.server.vlt.chd.mybluehost.me,S=9726,W=9956:2,;-;9726;2020-11-07T22:10:17.000Z;3;"vltchdmy" [500];"vltchdmy" [502];rw-r-----;0
. 2020-11-08 09:19:43.960 File: '/home/vltchdmy/mail/parellifoundation.org/summer/cur/1604787017.M350619P14553.server.vlt.chd.mybluehost.me,S=9726,W=9956:2,' [2020-11-07T22:10:17.000Z] [9726]
. 2020-11-08 09:19:43.960 Copying "/home/vltchdmy/mail/parellifoundation.org/summer/cur/1604787017.M350619P14553.server.vlt.chd.mybluehost.me,S=9726,W=9956:2," to local directory started.
. 2020-11-08 09:19:43.960 Binary transfer mode selected.
. 2020-11-08 09:19:43.961 Opening remote file.
> 2020-11-08 09:19:43.961 Type: SSH_FXP_OPEN, Size: 140, Number: 8132611
< 2020-11-08 09:19:45.546 Type: SSH_FXP_STATUS, Size: 24, Number: 8132356
. 2020-11-08 09:19:45.546 Discarding reserved response
< 2020-11-08 09:19:45.546 Type: SSH_FXP_STATUS, Size: 29, Number: 8132611
< 2020-11-08 09:19:45.546 Status code: 2, Message: 8132611, Server: No such file, Language:
/xmllog
). I'm asking for a session log (/log
).
/log=C:\path\to\winscp.log
command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.option batch on
option confirm off
open sftp://root:XXXXXXXXXXXXXXX@XXXXXXXXXX/ -hostkey="ssh-rsa 2048 MH8TG28sDI1uflPERU+d2kiNTy%2B0b/IXHdYa9EkGfww="
option transfer binary
#get /home/vltchdmy/www/* c:\Users\Seth\Documents\ServerBackups\Backups\www\*
synchronize local -filemask=|*.cache;*.latest;*index.log.2;*supercache/;IpDweGdIqRq490EE.php c:\Users\Seth\Documents\ServerBackups\Backups /home/vltchdmy
exit
@echo off
del log.xml
"C:\Program Files (x86)\WinSCP\WinSCP.com" /console /script=ServerBackup.txt /xmllog=log.xml
if %ERRORLEVEL% neq 0 goto error
echo Success
C:\Users\Seth\Downloads\SwithMail\SwithMail.exe /s /Param1 "BackupServer" /Param2 "Succeeded" /x C:\Users\Seth\Documents\ServerBackups\SwithmailLog\SwithMailSettings.xml"
exit /b 0
:error
echo Error!
C:\Users\Seth\Downloads\SwithMail\SwithMail.exe /s /Param1 "BackupServer" /Param2 "FAILED" /x "C:\Users\Seth\Documents\ServerBackups\SwithmailLog\SwithMailSettings.xml"
exit /b 1