Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg
2015-08-26 15:52:13
Hello Luc,
You"re right. I misunderstood the issue here and thought that Martin need to exclude compresses files from its backup.
I think the bellow now will work as desired:
FileSet { Name = "Full Set" Include { Options { Compression = gzip RegexFile = ([^\.g?zip]|[^\.jpe?g])$ } Options { Signature = MD5 RegexFile = (\.g?zip|\.jpe?g)$ } File = / } }
Best regards, Ana
Yes, exclude will cause
the matching files to be excluded.
What I’m not certain of
in the configuration I posted is whether it won’t exclude everything, I never tried working with two separate options sections in the same
fileset.
It could be that it will
(exclude everything), and that you have to use two separate ‘Include’ sections, each with one of the ‘Options’ sections, to get the effect you wanted (or at least I think you wanted).
Like this:
Fileset
{
Name = “FullSet”
Include {
Options {
RegexFile = regex_for_uncompressed_files
Exclude = yes
}
Options {
Compression = gzip
RegexFile =
regex_for_compressed_files
Exclude = yes
}
File
= /
}
}
I think this is the way
to avoid that “this configuration does not work” comment in the documentation, but I’d have to test it to be certain.
The first include would
handle “everything excluding uncompressed files”, i.e. all compressed files, and back them up without compression.
The second would include
“everything excluding compressed files”, i.e. all uncompressed files, and back them up with compression.
Subject: Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg
doesn't mean the Exclude-option, that the files found with the "RegexFile"-option will be excluded from backup?
or how can I understand this exclude option?
Hi Ana,
Won’t your solution exclude compressed files, instead of including
them without a second round of compression?
I think if it
can be done, what the OP asked, the right approach would be closer to his own, just using ‘RegexFile’ instead of ‘RegexDir’.
I would have tried something like this (untried, untested, probably
wrong):
Fileset {
Name = “FullSet”
Include {
Options {
RegexFile = regex_for_uncompressed_files
Exclude = yes
}
Options {
Compression = gzip
RegexFile = regex_for_compressed_files
Exclude = yes
}
File = /
}
}
A bit of De Morganized Boolean logic should circumvent the problem
that all files not matched by any Options directive are included by default.
The first Options will exclude all uncompressed files – meaning include
all compressed, and back them up without compression.
The second will exclude all compressed files – meaning include all
uncompressed ones, and back them up with compression.
From:
Ana Emília M. Arruda [mailto:emiliaarruda AT gmail DOT com]
Sent: 25 August 2015 19:50
To: Martin Feldbacher <martin.feldbacher AT stegbauer DOT info>
Cc: Bacula-users AT lists.sourceforge DOT net
Subject: Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg
FileSet {
Name = "Full Set"
Include {
Options {
compression = gzip
}
Options {
RegexFile = "\.[gG]?[zZ][iI][pP]"
RegexFile = "\.[jJ][pP][eE]?[gG]"
On Tue, Aug 25, 2015 at 11:10 AM, Martin Feldbacher <martin.feldbacher AT stegbauer DOT info> wrote:
I'm searching help with a fileset which only compresses files which are not already compressed (like gzip,jpeg,mpeg and so on) in my whole root directory..
my first idea was the following:
FileSet {
Name = "Full Set"
Include {
Options {
RegexDir = regex for all files with ending .gzip, .zip, .jpeg, and so on
}
Options {
RegexDir = inverted regex from above, don't know if this works
compression = gzip
}
File = /
}
}
does anybody have an idea how to solve this without creating two filesets for one client?
------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
Firma Stegbauer datawork GmbH & Co. KG
Oberjulbachring 9
84387 Julbach
Tel.: +49 8571 9251222
E-Mail: martin.feldbacher AT stegbauer DOT info
Internet: www.stegbauer.info
Unternehmenssitz: Julbach
Handelsregister beim Amtsgericht: Landshut
Handelsregister-Nummer: HRA 10671
Persönlich haftende Gesellschafterin:
Firma Stegbauer datawork Verwaltungs GmbH - Sitz: Julbach
Handelsregister beim Amtsgericht: Landshut
Handelsregisternummer: HRB 9147
Geschäftsführer: Thomas Stegbauer
------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Martin Feldbacher
- Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Ana Emília M. Arruda
- Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Luc Van der Veken
- Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Martin Feldbacher
- Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Luc Van der Veken
- Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg,
Ana Emília M. Arruda <=
- Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Ana Emília M. Arruda
- Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Martin Simmons
- Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Ana Emília M. Arruda
|
Previous by Date: |
Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Luc Van der Veken |
Next by Date: |
Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Ana Emília M. Arruda |
Previous by Thread: |
Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Luc Van der Veken |
Next by Thread: |
Re: [Bacula-users] fileset which only compresses files which are not already compressed like gzip, jpeg, mpeg, Ana Emília M. Arruda |
Indexes: |
[Date]
[Thread]
[Top]
[All Lists] |
|
|