Your first attempt didn't work because the "File =" line doesn't allow
wildcards.
Your second attempt didn't work because Bacula traverses the folder tree
starting from /home, but the fileset doesn't match any direct subfolders in
/home, so it stopped before it could find the subfolders matching your
wilddir.
The simplest fix is to generate the fileset using a script something like
this:
FileSet {
Name = "My-Fileset "
Include {
Options {
wilddir=lost+found
wildfile=*.wav
wildfile=*.mp3
wildfile=*.avi
wildfile=*.iso
wildfile=*.ogg
wildfile=core.*
wildfile=*.o
Exclude = yes
}
Options {
Hardlinks = no
Compression = GZIP8
}
File = "\\|sh -c 'ls -1d /home/*/*/*-tutor'"
}
}
Note that the options to ls contain the digit one (not the letter l) to make
it print one name per line. Also note that the Options for excluding are
listed first so that the default options are last (look for "last Options
resource" in the documentation). Also, the options for excluding must be
within the same Include clause.
__Martin
>>>>> On Wed, 22 Jun 2022 10:28:39 +0000, Gestió Servidors said:
>
> Hello,
>
> I need to backup some subfolders that match a pattern like their name
> contains "-tutor" string. For example, the folder tree is similar to:
>
> /home/students/a/a1
> /home/students/a/a2
> /home/students/a/a3
> /home/students/a/a-tutor
> /home/students/b/b1
> /home/students/b/b2
> /home/students/b/b3
> /home/students/b/b-tutor
> /home/teachers/a/a1
> /home/teachers/a/a2
> /home/teachers/a/a3
> /home/teachers/a/a-tutor
> /home/teachers/b/b1
> /home/teachers/b/b2
> /home/teachers/b/b3
> /home/teachers/b/b-tutor
>
>
> I need to backup only folders "*-tutor" from all "home" subfolders, so I need
> to backup these folders:
>
> /home/students/a/a-tutor
> /home/students/b/b-tutor
> /home/teachers/a/a-tutor
> /home/teachers/b/b-tutor
>
>
> I have configured a fileset in this way:
>
> FileSet {
> Name = "My-Fileset "
> Include {
> Options {
> Hardlinks = no
> Compression = GZIP8
> }
> Options {
> wilddir=lost+found
> wildfile=*.wav
> wildfile=*.mp3
> wildfile=*.avi
> wildfile=*.iso
> wildfile=*.ogg
> wildfile=core.*
> wildfile=*.o
> Exclude = yes
> }
> File = /home/*/*/*-tutor
>
> }
> }
>
> But backup don't contains any "/home/*/*/*-tutor"... so there is something
> bad configured. I have run another backup with this fileset, but nothing
> backup...
>
> FileSet {
> Name = "My-Fileset-v2"
> Include {
> Options {
> Hardlinks = no
> Compression = GZIP8
> wilddir = "/home/*/*/*-tutor"
> }
> File = /home
> }
>
> Include {
> Options {
> wilddir=lost+found
> wildfile=*.wav
> wildfile=*.mp3
> wildfile=*.avi
> wildfile=*.iso
> wildfile=*.ogg
> wildfile=core.*
> wildfile=*.o
> Exclude = yes
> }
> }
> }
>
> So... I need help...
>
> Thanks!!!
>
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users