Hi lftp list,

I'm using the mirror function of lftp to regularly update a huge amount of data. Because of space issues, I need to split the data on several volumes, and I use symbolic links (symlinks) to simulate the original directory structure. However, in such a situtation, lftp, at mirroring time, destroys the existing symlink, recreates the directory and downloads its whole content again :

Example, in the below structure, the mirror command destroys symlinks b and c (FTP server contains

/mnt/vol1/data
    a
    b -> /mnt/vol2/data/b
    c -> /mnt/vol2/data/c

Transferring file `a/file.ext'
Removing old local file `b'
Making directory `b'
Transferring file `b/file.ext'

Isn't there a way to tell lftp not to delete local symlinks if existing and consider them as directory (the normal behaviour when using the shell) ? I tried the -L and mirror:dereference options, but I think they are only for remote symlinks, not local ones.

For now, to avoid the problem, I have to run the script below, having separates commands for any directory represented by a symlink, but I don't like it as if I need to split more, I will every time need to modify the script:

------
mirror --exclude=b/.* --exclude=c/.*

lcd b #this command follows correctly the local symlink
mirror b .
lcd -

lcd c
mirror c.
lcd -
---------

If it is not yet possible, this would be feature request (I could try to contribute, if you think it would require few changes, but I didn't work with c/c++ for a long time)

Thank you anyway for this wonderful tool,

Franck
_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to