[Suggestion] Filter "Exclude folder if it contains a file xy" just like .nomedia

#1

Hey I have got a suggestion.

You know, in Android folders are avoided for picture indexation if they have a file “.nomedia”.

–> Duplicati could avoid backup of folders (and subfolders) if folder contains a specific file. I.e. let us add a filter:
"Exclude folder if it contains a file called… [ ]"
And we can define our own standard.

6 Likes

Ignore file like .gitignore
Can I make a backup respect CACHEDIR.TAG?
#2

That’s a good idea, and from a meta perspective (i.e. not knowing the code myself, but knowing a bit about coding in general), seems like it might be fairly easy to implement.

0 Likes

#3

So something like "if folder contains a file named .duplicati-no-backup then don’t backup it or any subfolder?

Or would you think it needs to be more flexible like supporting multiple indicators such as:

  • if .duplicati-no-backup-files found, don’t backup FILES in this folder
  • if .duplicati-no-backup-tree found, don’t hackup files OR subfolders in this folder
1 Like

#4

Personally, if i were implementing this advanced option, i’d provide a field for the filename and a [dropdown] field for the action.

I can foresee use cases where a user has marker files or exclusion files already in their system and simply want duplicati to check for those - providing your own filename would make this a lot easier than trying to go around and populate a pre-set filename.

0 Likes

#5

While there are a lot of pre-existing examples (like .nomedia) of this where the user doesn’t get to choose the magic file name, I do like your idea of joining “magic name” with “action”. I’d suggest having some defaulted suggstions such as the .duplicati-<action-name>

The only thing that worries me is this opens up a lot of potential for somebody choosing something like Thumbs.db as their magic file name and then complaining because Duplicati didn’t back up stuff they expected it to back up.

That makes me think the perfect place for this is actually in the Advanced Filters area where peopple are already able to do scary things.

And on top of that, there should be a “show me what folders or files will be EXCLUDED” feature for verification purposes. (Note that I only put that in because chances are that either already exists or was suggested by somebody 30 years ago. :smiley: )

1 Like

#6

As an aside, this post would be best suited for the “Features” category (or perhaps “UX”, i’m on the fence about that) - instead of “Support” where it’s been started.

0 Likes

#7

Good point, thanks - I’ll move it to Features since what (if any) functionality eventually decided on will likely drive necessary UX changes.

1 Like

#8

I was thinking of an additional filter. I.e., a per-backup-set setting. If it was implemented as a standard and rather monolithic like with .nomedia, people may forget about it and raise support questions (“it does not backup some folders, why”).

I am against a global option because in my use case I want that to behave differently in online/offline backup.

1 Like

#9

I agree, per-backup-set makes sense.

When I said “defaulted suggstions[sic]” I meant that I feel in the GUI when selecting that you want to use a “magic file exclusion filter” a suggested name should be defaulted in the field rather than just leaving a blank text field.

2 Likes

#10

I agree - though I would opt for it being available both as a global and per-backup setting, in a stacking manner, just since if there was one very important thing I wanted to exclude from all backup jobs, it would suck to have to remember to re-do the setting everywhere.

0 Likes

#11

Yep - I guess I was assuming that treating it like any other Exclude option would make it available as a POTENTIAL global setting.

We just probably shouldn’t “default it to on”. :slight_smile:

2 Likes

#12

Wow, all ingenious is simple!

0 Likes