Archive corrupted when replacing existing file

Advertisement

bugreport012
Guest

Archive corrupted when replacing existing file

I use WinSCP to automatically download zipped backups of a hosted database.

If a file already exists on the local file system, using WinSCP to download and replace it with a newer version gives me the following error message when I try to extract the file using 7-Zip:
There are some data after the end of the payload data : <filename>
Noticed originally on 5.13.1, still happens on 5.13.3.

Deleting the local file and re-running the script (either manually or automatically) works correctly - the downloaded file can be extracted as normal.

I have tried manually setting the transfer type to each of the 3 options (binary, ascii, automatic) with no change in behavior.

Backup script:
open ftpes://site:password@ip -certificate="scrubbed"
lcd C:/path/to/local/backup/dir/
get -resume -neweronly /path/to/backups/*.gz
exit
Windows 10 Pro scheduled task:
C:\Windows\System32\cmd.exe /c winscp.com /ini=nul /script="c:/path/to/script.txt"

Reply with quote

Advertisement

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

Re: Archive corrupted when replacing existing file

Remove the -resume switch. You cannot use it for a regular transfer. The switch is intended to resume a previously interrupted transfer only.

Reply with quote

Advertisement

You can post new topics in this forum