Discussion:
Mirror not detecting change in remote symlinked file
Christopher Stone
2012-12-27 16:37:40 UTC
Permalink
Hi all,



I'm having trouble having lftp (4.4.0) pick up that a symlinked file on
a remote server has changed, so it won't download it.



The local directory we currently have is:

***@server:~> ls -l /mirror/dept/ftp.host.org/user

total 172680

drwxrwxr-x 2 mirror mirror 4096 2012-10-18 17:49 10-18-12

-rw-r--r-- 1 mirror mirror 43 2012-08-08 12:00 ABCD.txt

-rw-r--r-- 1 mirror mirror 176120988 2012-08-08 12:00 ABCD.zip



When I use lfp to connect to the FTP site with no other options, it
shows the newer files:

***@server:~> lftp -u 'user,pass' ftp://ftp.host.org

lftp ***@ftp.host.org:~> ls

drwxr-xr-x 2 22651 user 4 Dec 6 17:16 .

drwxr-xr-x 2 22651 user 4 Dec 6 17:16 ..

lrwxrwxrwx 1 22651 user 22 Dec 6 17:16 ABCD.txt ->
../../current/ABCD.txt

lrwxrwxrwx 1 22651 user 22 Dec 6 17:16 ABCD.zip ->
../../current/ABCD.zip



I can download those files manually OK. However when we use the mirror
command (we have this scripted to run on a number of different servers
and this command has worked OK so far) we get the following:

***@server:~> /usr/local/bin/lftp -e 'set ftp:ssl-allow 0; set
net:socket-bind-ipv4 10.0.50.41; set net:max-retries 4; set
ssl:verify-certificate no; set ftp:use-tvfs yes; mirror --no-empty-dirs
--dereference --no-perms --verbose=3 ~/
"/mirror/dept/ftp.host.org/user";bye' -u 'user,pass' ftp://ftp.host.org

Old directory `10-18-12' is not removed

Total: 1 directory, 0 files, 2 symlinks

To be removed: 1 directory, 0 files, 0 symlinks



It does seem to be dereferencing correctly, because if I delete the
existing files from August it will correctly download the new ones from
December. It doesn't seem to be detecting that there has actually been a
change though. Is this not possible to detect in the way that the remote
server has their FTP set up?



Thanks for any help,



Chris

***@ebscohost.com
Alexander V. Lukyanov
2012-12-28 15:41:32 UTC
Permalink
Post by Christopher Stone
net:socket-bind-ipv4 10.0.50.41; set net:max-retries 4; set
ssl:verify-certificate no; set ftp:use-tvfs yes; mirror --no-empty-dirs
--dereference --no-perms --verbose=3 ~/
"/mirror/dept/ftp.host.org/user";bye' -u 'user,pass' ftp://ftp.host.org
--dereference option cannot correctly determine that synlink target file
was changed. Try this option instead:

set ftp:list-options -L

(it depends on the server to interpret the -L option, but many do).
--
Alexander.
Christopher Stone
2012-12-28 16:16:42 UTC
Permalink
Thanks for the tip. Tried that but unfortunately get the same results.
It's strange because connecting interactively with lftp does show the
correct change date, the mirror command just doesn't seem to care.

lrwxrwxrwx 1 22651 user 22 Dec 6 17:16 ABCD.txt ->
../../current/ABCD.txt (the file we have is from back in August)

Looks like I might have to fall back to wget on this one. :(

-----Original Message-----
From: Alexander V. Lukyanov [mailto:***@netis.ru]
Sent: Friday, December 28, 2012 10:42 AM
To: Christopher Stone
Cc: ***@uniyar.ac.ru
Subject: Re: [lftp] Mirror not detecting change in remote symlinked file
Post by Christopher Stone
net:socket-bind-ipv4 10.0.50.41; set net:max-retries 4; set
ssl:verify-certificate no; set ftp:use-tvfs yes; mirror
--no-empty-dirs
Post by Christopher Stone
--dereference --no-perms --verbose=3 ~/
"/mirror/dept/ftp.host.org/user";bye' -u 'user,pass'
ftp://ftp.host.org

--dereference option cannot correctly determine that synlink target file
was changed. Try this option instead:

set ftp:list-options -L

(it depends on the server to interpret the -L option, but many do).
--
Alexander.
Loading...