Re: Bug in lftp mirror when using xfer:use-temp-file option

akshay gupta <[email protected]>
Newsgroups gmane.network.lftp.user,gmane.network.lftp.devel
Message-ID <CAB_qc71AaXhqXFx0+Pds2FTpUdKArpcqOkrMA9fu9T3dCxAXYQ@mail.gmail.com>
Here are the debug logs test.txt is the file that is changed:

lftp [email protected]:~/Desktop/lftp> mirror
---> TYPE A
<--- 200 Type set to A.
---> PASV
<--- 227 Entering Passive Mode (192,168,128,124,228,174)
---- Connecting data socket to (192.168.128.124) port 58542
---- Data connection established
---> LIST
<--- 150 Opening ASCII mode data connection for '/bin/ls'.
---- Got EOF on data connection
---- Closing data socket
<--- 226 Transfer complete.
---> TYPE I
<--- 200 Type set to I.
---> MDTM .DS_Store
<--- 213 20141027064918
---> MDTM search-2.html
<--- 213 20140811111726
---> MDTM search-3.html
<--- 213 20140811111744
---> MDTM search-4.html
<--- 213 20140811111745
---> MDTM search.html
<--- 213 20140811111722
---> MDTM settings.xml
<--- 213 20140820095244
---> MDTM test.txt
<--- 213 20141027075438
---> PASV
<--- 227 Entering Passive Mode (192,168,128,124,228,176)
---- Connecting data socket to (192.168.128.124) port 58544
---- Data connection established
---> RETR test.txt
<--- 150 Opening BINARY mode data connection for 'test.txt' (202 bytes).
---- Got EOF on data connection
---- Closing data socket
<--- 226 Transfer complete.
Total: 1 directory, 7 files, 0 symlinks
Modified: 1 file, 0 symlinks
202 bytes transferred
To be removed: 0 directories, 1 file, 0 symlinks
---- Closing idle connection
---> QUIT
**** Timeout - reconnecting
<--- 221-
<---     Data traffic for this session was 172301 bytes in 7 files.
<---     Total traffic for this session was 181339 bytes in 13 transfers.
<--- 221 Thank you for using the FTP service on 192.168.128.124.
---- Closing control socket


~Akshay

On Mon, Oct 27, 2014 at 1:18 PM, Alexander Lukyanov <[email protected]>
wrote:

> Can you provide a debug log? Why lftp cannot replace the old file?
>
> 2014-10-27 10:44 GMT+03:00 akshay gupta <[email protected]>:
>
>> Hi,
>>
>> I am trying to mirror files using lftp, I have tested a use case where a
>> file at the source machine gets modified but the file name remains the
>> same. After mirroring, lftp is unable to replace the old file and also
>> leaves a temporary file.
>>
>> For example. If source have file a.txt and its mirrored successfully at
>> the destination, now if I update a.txt append some content and save it with
>> same name. If I run lftp mirror again then its not able to replace the
>> existing a.txt but it also leaves the temp file a.txt_transit_ behind. And
>> if i run the mirror multiple times it always downloads the changed a.txt, i
>> can see this from the lftp logs.
>>
>> Suggestion: Will it make sense to keep versions of the files as they are
>> updated at the source. Like if a.txt is changed at source then lftp mirror
>> will save it as a.txt_{TIMESTAMP}_. Every time a file is updated it will be
>> saved with a new time stamp. And mirror will consider these file to decide
>> whether to download or not.
>>
>>
>> Thanks,
>> Akshay
>>
>>
>>
>>
>>
>
>
> --
>    Alexander.
>

_______________________________________________
lftp mailing list
[email protected]
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.