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

No deletions with mirror --reverse --delete #590

Open andy-burns-uk opened 4 years ago

andy-burns-uk commented 4 years ago

Using lftp.exe 4.8.4 installed as part of cygwin, to FTP server, with the command

lftp.exe mirror --reverse --delete /cygdrive/u /my/dest/path

added int eh source U:\ are copied to dest, but when files have been deleted from U:\ they are never deleted from dest

Have tried with a "stripped down" command e.g. removing various options such as --parallel=2 --include-glob=*.pdf --exclude=Forms/ --no-umask

No clues from cranking up logs to verbose=3

Should this work?

lavv17 commented 4 years ago

Yes it should. Enable debug in lftp to see if it tries to delete the files.

— Alexander.

On 8 Jun 2020, at 19:10, Andy Burns notifications@github.com wrote:

 Using lftp.exe 4.8.4 installed as part of cygwin, to FTP server, with the command

lftp.exe mirror --reverse --delete /cygdrive/u /my/dest/path

added int eh source U:\ are copied to dest, but when files have been deleted from U:\ they are never deleted from dest

Have tried with a "stripped down" command e.g. removing various options such as --parallel=2 --include-glob=*.pdf --exclude=Forms/ --no-umask

No clues from cranking up logs to verbose=3

Should this work?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

andy-burns-uk commented 4 years ago

I have tried debug levels from 0 to 9 and don't see anything related to deleting files, I don't even see it enumerating which files exist on the destination FTP server, which I would have thought it needed to do, in order to decide which (if any) files need deleting?

my .lftp script slightly redacted

set ftp:ssl-allow no;
open -d ftp://xxx:xxx@xxxxxxx:2121;
lcd /cygdrive/c/xxxx/test/src;
cd /Alfresco/xxxxx/TEST;
debug -c -t 9
mirror --reverse --delete --verbose=3 --no-perms 
andy-burns-uk commented 4 years ago

result from running it when both the src and dest directories are empty, have I got all the debug turned on that I should?

---- Resolving host address...
---- 1 address found: xxx.xxx.xxx.xxx
---- Connecting to xxxxxxxxxxxxx (xxx.xxx.xxx.xxx) port 2121
<--- 220 FTP server ready
---> FEAT
<--- 211-Features supported
<---  MFMT
<---  SIZE
<---  UTF8
<---  MLST size*;modify*;create*;type*;unique*;perm*;media-type*;
<---  MLSD
<---  AUTH TLS
<--- 211 END
---> OPTS UTF8 ON
<--- 530 Not logged on
---> USER xxx
<--- 331 User name okay, need password for xxx
---> PASS xxx
<--- 230 User logged in, proceed
---> OPTS UTF8 ON
<--- 200 OPTS UTF8 ON
initialized translation from ANSI_X3.4-1968 to UTF-8
initialized translation from UTF-8 to ANSI_X3.4-1968//TRANSLIT
---> OPTS MLST size;modify;type;perm
<--- 200 MLST OPTS size;modify;type;perm;
---> PWD
<--- 257 "/"
---- CWD path to be sent is `/Alfresco/xxxxxx/TEST'
---> CWD Alfresco
<--- 250 Requested file action OK
---> CWD xxxxxx
<--- 250 Requested file action OK
---> CWD TEST
<--- 250 Requested file action OK
2020-06-11 15:52:51 ntg-edm ---> PASV
2020-06-11 15:52:51 ntg-edm <--- 227 Entering Passive Mode (xx.xx.xx.xx,42,176)
2020-06-11 15:52:51 ntg-edm ---- Connecting data socket to (xx.xx.xx.xx) port 10928
2020-06-11 15:52:51 ntg-edm ---- Data connection established
2020-06-11 15:52:51 ntg-edm ---> MLSD
2020-06-11 15:52:51 ntg-edm <--- 150 File status okay, about to open data connection
2020-06-11 15:52:51 ntg-edm initialized translation from UTF-8 to ANSI_X3.4-1968//TRANSLIT
2020-06-11 15:52:51 ntg-edm <--- 226 Closing data connection
2020-06-11 15:52:51 ntg-edm ---- Got EOF on data connection
2020-06-11 15:52:51 ntg-edm ---- Closing data socket
2020-06-11 15:52:51 ntg-edm ---> TYPE I
2020-06-11 15:52:51 ntg-edm <--- 200 Command OK
2020-06-11 15:52:51 ntg-edm ---> QUIT
2020-06-11 15:52:51 ntg-edm <--- 221 Bye
2020-06-11 15:52:51 ntg-edm ---- Closing control socket
Press any key to continue . . .
lavv17 commented 4 years ago

This debug is enough. I see that your local encoding is ascii, is that correct?

On Thu, 11 Jun 2020 at 17:56, Andy Burns notifications@github.com wrote:

result from running it when both the src and dest directories are empty, have I got all the debug turned on that I should?

---- Resolving host address... ---- 1 address found: xxx.xxx.xxx.xxx ---- Connecting to xxxxxxxxxxxxx (xxx.xxx.xxx.xxx) port 2121 <--- 220 FTP server ready ---> FEAT <--- 211-Features supported <--- MFMT <--- SIZE <--- UTF8 <--- MLST size;modify;create;type;unique;perm;media-type*; <--- MLSD <--- AUTH TLS <--- 211 END ---> OPTS UTF8 ON <--- 530 Not logged on ---> USER xxx <--- 331 User name okay, need password for xxx ---> PASS xxx <--- 230 User logged in, proceed ---> OPTS UTF8 ON <--- 200 OPTS UTF8 ON initialized translation from ANSI_X3.4-1968 to UTF-8 initialized translation from UTF-8 to ANSI_X3.4-1968//TRANSLIT ---> OPTS MLST size;modify;type;perm <--- 200 MLST OPTS size;modify;type;perm; ---> PWD <--- 257 "/" ---- CWD path to be sent is `/Alfresco/xxxxxx/TEST' ---> CWD Alfresco <--- 250 Requested file action OK ---> CWD xxxxxx <--- 250 Requested file action OK ---> CWD TEST <--- 250 Requested file action OK 2020-06-11 15:52:51 ntg-edm ---> PASV 2020-06-11 15:52:51 ntg-edm <--- 227 Entering Passive Mode (xx.xx.xx.xx,42,176) 2020-06-11 15:52:51 ntg-edm ---- Connecting data socket to (xx.xx.xx.xx) port 10928 2020-06-11 15:52:51 ntg-edm ---- Data connection established 2020-06-11 15:52:51 ntg-edm ---> MLSD 2020-06-11 15:52:51 ntg-edm <--- 150 File status okay, about to open data connection 2020-06-11 15:52:51 ntg-edm initialized translation from UTF-8 to ANSI_X3.4-1968//TRANSLIT 2020-06-11 15:52:51 ntg-edm <--- 226 Closing data connection 2020-06-11 15:52:51 ntg-edm ---- Got EOF on data connection 2020-06-11 15:52:51 ntg-edm ---- Closing data socket 2020-06-11 15:52:51 ntg-edm ---> TYPE I 2020-06-11 15:52:51 ntg-edm <--- 200 Command OK 2020-06-11 15:52:51 ntg-edm ---> QUIT 2020-06-11 15:52:51 ntg-edm <--- 221 Bye 2020-06-11 15:52:51 ntg-edm ---- Closing control socket Press any key to continue . . .

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/590#issuecomment-642714552, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXF2FMFZNAIIKYHZXBDRWDWCFANCNFSM4NYRYVQQ .

-- Alexander.