lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.11k stars 162 forks source link

xfer:make-backup not working #605

Open manuthambi opened 4 years ago

manuthambi commented 4 years ago

I use the following commands:

set xfer:backup-suffix .lftp
set xfer:make-backup true
mirror sftp://host/src-path target-path

Old file gets over overwritten, but no backup is created. I tried xfer:keep-backup too. That makes no difference either.

lftp version 4.9.2

LeafwaysWorks commented 1 year ago

have you found a solution? is it working only with get command?

LeafwaysWorks commented 1 year ago

i have found the solution , the problem is it is removing the file then re transfer it , it is a mirror command, if you set the overwrite option to true, then before the overwrite it will make a backup, "set mirror:overwrite true" , it is not obvious though

LeafwaysWorks commented 1 year ago

and you should not have "set xfer:use-temp-file true", because it will generate tmp file then rename, which is not overwrite at the begining , very weird