efftee
(efftee)
July 9, 2019, 7:17pm
1
Hi all,
Pleasure to be using rclone sync, wonderful tool.
I've been fiddling with --filter-from
to reach exactly wht I want, and was suprised to find out it wouldn't purge empty folders, only treating files
using :
rclone sync /xxx /xxx --filter-from syncconfig1.txt
with
# syncconfig1 file content
+ /A/**
+ /B/**
+ /C/**
- *
Turns out a removed folder from one of the source folders included in the conf file ends up in the destination as an empty folder...
I'm sure it's been covered before, having though searched through the forum and thoroughly read https://rclone.org/filtering/#include-from-read-include-patterns-from-file
Many thanks for your help.
Regards
For source, I use:
--delete-empty-src-dirs
Is that what you are looking for as I use:
/usr/bin/rclone move /data/local/ gcrypt: --log-file /opt/rclone/logs/upload.log -v --drive-chunk-size 64M --exclude-from /opt/rclone/scripts/excludes --delete-empty-src-dirs
1 Like
efftee
(efftee)
July 9, 2019, 7:26pm
3
Thank you.
Will this flag purge the empty directories from source or from destination ?
(the src
word is bit confusing...)
Definitely source as I move locally to my GD and want to remove that. I wasn't sure if that was the direction you were speaking of though.
efftee
(efftee)
July 9, 2019, 7:30pm
5
Ok. I'm looking to purge from destination
I'm using rclone sync,
from source to destination ,
after running rclone sync command,
destination keeps unwanted empty folders that have been previously purged from source
(unlike a regular rclone sync without --filter-from
)
Thanks as I get the flow now.
I think it's this bug ->
efftee
(efftee)
July 9, 2019, 7:36pm
7
Oh. Bugger.
Many thanks for your help !
Hmm. Actually in reading it a bit more, I think it isn't it.
If I summarize, you have a source directory that was removed but with the filter-from on the destination side, it still shows there.
If you remove the filter-from and sync, it removes it.
You can work around that by doing a rclone rmdirs after the move which I believe should remove empty directories.
efftee
(efftee)
July 9, 2019, 8:02pm
9
Yes that sure works.
Thank you for your time and understanding.
Of course, considering I'm using a filter-from file, that would technically imply running the command for each folders listed in there...
Which kind of defeats the purpose of having a filter-from file to start with, since it's there to prevent me from running seperate sync commands for each folder...
Yeah, I'd file an issue on the github and just list the steps/link back to the forum article and it does seem to be a bug.
1 Like
efftee
(efftee)
July 9, 2019, 8:04pm
11
Yes. Many thanks for your help !
system
(system)
Closed
October 7, 2019, 8:04pm
12
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.