Re: [lftp] lftp mirror not removing directories...

2013-07-02 Thread Alexander Lukyanov
--Remove-source-files removes only plain files, not directories. It's done
that way because the direcories could contain other files which were not
downloaded (e.g. because they were excluded or they are present locally
already).

2013/6/25 Chris Richards 

> One small issue I have noticed is that directories on the server are not
> being removed, all the files in the directories are being removed though.
>
mirror --Remove-source-files -X .* -X .*/ -c
> --log=/share/Download/logs/downloads-sync-lastrun.log $remote_dir $local_dir
>
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp mirror not removing directories...

2013-06-24 Thread Chris Richards
Hi LFTP Members,

This is my first post, I can't remember the last time I joined a mailing list 
for support... Nearly all done in forums now. You guys are keeping it "old 
school" :)

I have LFTP setup on my QNAP NAS which downloads files from my external media 
server, it works great for the most part.

One small issue I have noticed is that directories on the server are not being 
removed, all the files in the directories are being removed though.

Example:
/downloads/_send_home/other/testdir1/testfile1
/downloads/_send_home/other/testdir1/testfile2
/downloads/_send_home/other/testdir1/testfile3

If I ran my script on the above files "testfile1, testfile2, testfile3" would 
be removed but directory "testdir1" would remain.

I have 3 subdirectories that get mirrored: "/downloads/_send_home/other", 
"/downloads/_send_home/media1" and "/downloads/_send_home/media2"

I doubt its a permissions issue as I login as the file/directory owner plus 
some files are being removed. The file/directory permissions are 777.

My LFTP settings are below.

Thanks.

-Chris

--

remote_dir=/downloads/_send_home/
local_dir=/share/Multimedia/tmp/_send_home/



/opt/bin/lftp -u $login,$pass $host << EOF
set ftp:ssl-allow no
set mirror:set-permissions off
set mirror:use-pget-n 2
set net:limit-total-rate 500:0
mirror --Remove-source-files -X .* -X .*/ -c 
--log=/share/Download/logs/downloads-sync-lastrun.log $remote_dir $local_dir
quit
EOF

--
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp