When attempting a mirror operation with a condition that skips some files (e.g. --older-than), combined with --Remove-source-dirs, it appears lftp attempts to delete directories that it hasn't mirrored content from due to that condition. I'm using v4.9.2 on Linux from homebrew.
My lftp command:
lftp -e 'set mirror:no-empty-dirs 1; set net:timeout 30; set xfer:timeout 30; set sftp:connect-program "ssh -a -x -i ~/.ssh/key"; set mirror:sort-by date-desc; mirror -vvvv --Remove-source-dirs --older-than=now-1week --exclude-glob="watch/*" --exclude=".htaccess" "/remote_path/" "/local_path/"; exit' -u username, sftp://domain/
Those directories are too new to be mirrored, and contain content, but lftp attempts to remove them anyway. Things work fine if --older-than is removed, though of course it downloads files newer than I want.
I've also tried variations with the following flags: --scan-all-first--depth-first--continue
Thank you for the wonder that is lftp! :blue_heart:
Hi,
When attempting a mirror operation with a condition that skips some files (e.g.
--older-than
), combined with--Remove-source-dirs
, it appears lftp attempts to delete directories that it hasn't mirrored content from due to that condition. I'm using v4.9.2 on Linux from homebrew.My lftp command:
lftp -e 'set mirror:no-empty-dirs 1; set net:timeout 30; set xfer:timeout 30; set sftp:connect-program "ssh -a -x -i ~/.ssh/key"; set mirror:sort-by date-desc; mirror -vvvv --Remove-source-dirs --older-than=now-1week --exclude-glob="watch/*" --exclude=".htaccess" "/remote_path/" "/local_path/"; exit' -u username, sftp://domain/
Example output:
Those directories are too new to be mirrored, and contain content, but lftp attempts to remove them anyway. Things work fine if
--older-than
is removed, though of course it downloads files newer than I want.I've also tried variations with the following flags:
--scan-all-first
--depth-first
--continue
Thank you for the wonder that is lftp! :blue_heart: