On 2022-06-16 04:56, Martin Simmons wrote:
On Wed, 15 Jun 2022 22:07:06 +0000, Bill Arlofski via Bacula-users said:

On 6/15/22 15:23, sruckh--- via Bacula-users wrote:> 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"
>       }
>     }
> }

Hello,

I don't think yout fileset is working the way you think/want.


This fileset will not compress, nor create md5 signature for any files in /, /boot /home, or /var. I'd expect you to see "No signature found for file xxxx" during restores. (or some similar message)

Are you sure about that? The doc says "However, one additional point is that in the case that no match was found, Bacula will use the options found in the
last Options resource." so I think that will make it work.


In words, your example fileset says to backup those included directories and below, but exclude those two wild files, and one
wilddir, but only if they are found in the root directory.

But, I am not even sure th
ose wilddir and wildfiles will correctly work because you have not included any wildcards in them.

The lack of any wildcards will not cause a problem.


I would re-write this fileset as follows:
----8<----
FileSet {
   Name = FirewallFull
   Include {
     Options {
       compression = gzip
       signature = md5
     }
     File = "/"
     File = "/boot"
     File = "/home"
     File = "/var"
   }
   Exclude {
     File = ISO
     File = .fsck
     File = .journal
   }
}
----8<----

This example will compress and create an md5 signature for everything under /, /boot /home, or /var, and then will exclude any files or directories called ISO, .fsck, and .journal wherever they are found.

If you want to anchor them to the root directory only, then set them to /ISO, /.fsck, and /.journal

This Exclude clause looks wrong to me, because the File items will match
nothing.  Don't you need

File = "*/.fsck"

to match .fsck anywhere?

__Martin

I apologize for unintentionally hijacking thread and not paying enough attention to the original poster's issue. This came from a policy I have had for over 10 years, so have not revisited it for quite some time.

I appreciate the feedback and will now have to consider what was stated here and do some further testing. I thought this worked as expected a long time ago, but apparently it could use some refreshing and some retesting.

Thank You.


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to