Score:0

Bacula fileset wildcards: how include /folder/(arbitrary string)/uploads but exclude /folder/(arbitrary string)/whatever/uploads

cn flag

I'm creating an exclude rule for bacula so it doesn't take care of some cache and temporary uploads folders inside a filesystem. But I'm failing to write it

Suppose this filesystem

/filestore/user1/
/filestore/user1/uploads
/filestore/user1/user_files/uploads
/filestore/user2/uploads
/filestore/user1/user_files/

Main backup rule says

File = /filestore

And exclude rule

wilddir = "/filestore/*/uploads/

But will match all "uploads" folders. Is there any simple way/wildcard/regex to match only the first level uploads folder. To be clear:

/filestore/user1/uploads #match
/filestore/user1/user_files/uploads # not match
/filestore/user2/uploads #match
Gonzalo Cao avatar
cn flag
sorry, typo filestore vs filestorage
Score:1
cn flag

Finally I found it, you can do it with regexp but in this particular case you have to ensure that work with Bacula

  regexdir = "/filestore/[^/]+/uploads"
  regexdir = "/filestore/[^/]+/cache"

instead of using Wilddir which only works with wildcards. Bacula documentation says using regexp is less efficient but mandatory in this case.

There's a very useful command called "bregex" that allow you to test bacula regex engine without having to go through the full scheduling process.

I will edit Question title to make it clear for other people that could be interested in.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.