Filters - include subdirectories with different depths

Hi,

given the following filters:

+Documents/AAA/*
+Documents/BBB/CCC/*
+Documents/

in order to backup +Documents/BBB/CCC/*, filters have to be edited this way:

+Documents/AAA/*
+Documents/BBB/CCC/*
+Documents/BBB/
+Documents/

Correct? I thought that +Documents/was enough.

So for long paths i have to add a line for every subdirectory. Like to backup:

111/222/333/444/555

I have to add:

+111/222/333/444
+111/222/333
+111/222
+111/

etc?

I’m testing with duplicacy -d -log backup -enum-only

Thanks!

Yes, every path is matched against every line. If no match, and filters only contain +, that parh is excluded and skipped from traversing further.

But why not

+Documents/*

?

What are you trying to accomplish?

1 Like

Instead of “init” every single folder i want to backup i just “inited” my C:\Users\user\
So i created filters to only include what i need from there.

This because lots of folders i need are subdirectories of my user folder.

I have too many things i do not need under +Documents/* but this is true also for other folders.

For the AppData folder for example, there are lot of sub folders but i only select the ones i need.

This way i could have probably a longer filter file but less .duplicacy folders and filters file to manage.

This is quite high maintenance solution. Every time you install a new app or add a new folder you need to review your exclusion list.

I take an opposite approach. Include everything, and then monitor a few backups over a week. Then explicitly exclude a few folders that generate an excessive amount of churn (think browser caches, temp folders, etc).

Yes, this ends up backing up a lot of stuff I don’t care about, but if the turnover of that stuff is small, it’s worth paying few more cents for extra storage to avoid micromanaging the backup solution while risking to miss to include an important data.

That’s true, but taking the AppData folder as an example, there are really lots and lots of subfolders there.

So to backup let’s say my Sticky Notes i had to:

+AppData/Local/Packages/Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe/LocalState/plum.sqlite
+AppData/Local/Packages/Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe/LocalState/
+AppData/Local/Packages/Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe/
+AppData/Local/Packages/
+AppData/Local/
+AppData/

If i included everything under AppData/ i would end up with a confusing backup full of unused folders.
Actually my filter file counts 27 rows. I’ll see how much maintainable it is in time.

Basically there is little to include but a lot to exclude, that’s why i do it this way.

On the upside this would ensure that everything important is guaranteed included without needing to maintain filters or learn about and keep track of implementation details of various apps. Microsoft may change location for sticky notes tomorrow and you won’t notice immediately to update your filters.

But these are not of equal weight. You dont want to miss something that shall be included. But missing something that can be excluded carries no risk.

So, the downside of “default exclude” approach is data loss, and guaranteed maintenance work.

The downside of “default include” approach is that you will backup small amount of data you don’t care about. No harm in that.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.