Fileset {
 Name = “cadat"
 EnableVss = no
 EnableSnapshot = no
 Include {
   Options {
     OneFS = no
     RegexDir = "/mnt/cdat-.*"
   }
   Options {
     OneFS = no
     Exclude = yes
     RegexDir = ".*"
   }
   File = "/mnt"
 }
}

Justin, looking at this, Within /mnt, doesn't your exclude (".*") just end
up excluding everything?

Maybe you want something more like:

Include {
  Options {
    OneFS = no    Exclude = yes
    RegexDir = ""^(?!cdat-).*
  }
  File = /mnt
}


Or, get rid of the "Exclude" and use a script for the File...

Include {
  Options {
    OneFS = no  }
  File = "|sh -c ’echo /mnt/cdat-*’"
}

Maybe?


On Wed, Jun 15, 2022 at 5:48 PM Justin Case <jus7inc...@gmail.com> wrote:

> I understand what the example does, it is very much standard.
> Alas, it does not touch any of the points where my use case is special:
> - it enumerates all inclusions and exclusions - that is explicitely what I
> cannot and do not want to do as each FD machine has different subfolders,
> but all start with the same prefix
> - it does not employ wildcard characters for folder names
>
> Thank you for the example. To be honest, I did not learn anything new that
> would allow me to solve my problem.
>
> Thank you again , though, for considering my questions.
> J/C
>
> > On 15. Jun 2022, at 23:23, sru...@gemneye.org wrote:
> >
> > On 2022-06-15 13:47, Justin Case wrote:
> >> I re-read the chapter about filesets and fileset options.
> >> In order to better understand what is happening I simplified the
> >> fileset as follows:
> >>> Fileset {
> >>> Name = “cadat"
> >>> EnableVss = no
> >>> EnableSnapshot = no
> >>> Include {
> >>>   Options {
> >>>     OneFS = no
> >>> #    RegexDir = "/mnt/cdat-.*"
> >>>   }
> >>> #  Options {
> >>> #    OneFS = no
> >>> #   Exclude = yes
> >>> #    RegexDir = ".*”
> >>> #  }
> >>>   File = "/mnt"
> >>> }
> >>> }
> >> I was hoping it would then backup everything in /mnt (yes they are all
> >> different filesystems, but OneFS is set to no).
> >> Again, nothing was backed up.
> >> I do not understand this result. I thought I had understood what is in
> >> the manual about filesets, but obviously I did not.
> >>> On 15. Jun 2022, at 19:55, Justin Case <jus7inc...@gmail.com> wrote:
> >>> Hi all,
> >>> I am somewhat struggling with the fileset algorithm, noob birth pains
> I guess.
> >>> I have a bunch of VMs that have mounted(!!) docker container appdata
> in /mnt/cdat-<containername>.
> >>> So I wish to backup /mnt/cdat-* on each of these VMs, meaning I wish
> that the content of each subdirectory in /mnt where the name starts with
> "cdat-“ gets backed up.
> >>> So I looked into the main manual for fileset directive syntax. And I
> found this example:
> >>> FileSet {
> >>>      Name = "Full Set”
> >>>      Include {
> >>>             Options {
> >>>                      wilddir = "/home/a*”
> >>>                      wilddir = "/home/b*"
> >>>             }
> >>>             Options {
> >>>                     RegexDir = ".*”
> >>>                     exclude = yes
> >>>               }
> >>>     File = /home
> >>>     }
> >>> }
> >>> So what I did is this (and it does not work, just returns 1 file, and
> that is wrong):
> >>> Fileset {
> >>> Name = “cadat"
> >>> EnableVss = no
> >>> EnableSnapshot = no
> >>> Include {
> >>>   Options {
> >>>     OneFS = no
> >>>     RegexDir = "/mnt/cdat-.*"
> >>>   }
> >>>   Options {
> >>>     OneFS = no
> >>>     Exclude = yes
> >>>     RegexDir = ".*"
> >>>   }
> >>>   File = "/mnt"
> >>> }
> >>> }
> >>> I know it must seem kinda obvious where the problem is for those who
> have been around with bacula for a while. For me it is kinda “magic”.
> >>> Where is my mistake?
> >>> Thanks for helping out!
> >>> J/C
> > Below is an example Fileset I use which has includes and excludes.
> >
> > Fileset {
> >  Name = "Firewall Full"
> >  Include {
> >    File = "/"
> >    File = "/boot"
> >    File = "/home"
> >    File = "/var"
> >    Options {
> >      Compression = "Gzip"
> >      Signature = "Md5"
> >      Exclude = "Yes"
> >      WildDir = "/ISO"
> >      WildFile = "/.journal"
> >      WildFile = "/.fsck"
> >    }
> >  }
> > }
> >
>
>
>
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>


-- 
- Adaptability -- Analytical --- Ideation ---- Input ----- Belief -
-------------------------------------------------------------------
         John M. Lockard |  U of Michigan - School of Information
          Unix Sys Admin |      Suite 205 | 309 Maynard Street
      jlock...@umich.edu |        Ann Arbor, MI  48104-2211
 www.umich.edu/~jlockard <http://www.umich.edu/%7Ejlockard> |
734-615-8776 | 734-763-9677 FAX
-------------------------------------------------------------------
- The University of Michigan will never ask you for your password -
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to