This is not castle on paper! This is my trial and error. I tried many ways but I am not able to figure it out. I have this specific use case so instead of trying to type some other example and then again getting confused I presented the entire folder hierarchy as it is.
I went through the doc as well but it was not helpful (yes, I have seen couple of posts where commenders have have just replied “it’s in the doc”).
So I posted here hoping someone might have gone through a similar use case and can help me.
Sorry, I presumed this was “on paper” since none of the patterns would work as written. As said, think “first match wins” and “folder relative paths”. If your folder root is /Users/user and you want to sync only /Users/user/Movies, start with
Well, just that worked like a charm! I think I was unnecessarily thinking more complex rules.
Exclude only root folder (no other sub-root-folder ignore rules required)
And then invert the exclusion for each folders/files you want to be included.
I will share my test/dummy example (in case others have this use case):
I created this test file/folder hierarchy inside my root folder (i.e. the added folder for sync).
And then I only wanted to backup these out of the heirarchy above.
Dropbox/db big d_3
All I had to do was add this in Ignore Patterns:
!Dropbox/db big d_3
# then just like done above ^ we invert ignoring/exclusion of everything we want to sync/include listing each path
# ignores everything in root folder
That’s it - ignore everything and then invert (with !) path of what you do not want to ignore.
I could verify and I could get exactly what I wanted on my iPhone (except hidden files/folders as I could not see them on iPhone)