1. Retention Period

1.1 Correct retentions settings

You can define several retention for your pools, but also for each clients. The first rule is that the file retention must be lower or equal to job retention which should be lower or equal to the volume retention. Normally you should set up Retention so they match the following rule:
File Retention ≤ Job Retention ≤ Volume Retention
The more time you leave your files in the catalog, the bigger the catalog. As a rule of thumb you can expect around 100 Bytes used per file stored in the catalog.
Retentions are used by Bacula to recycle your volume so your tapes and disk volumes can be re-used. That’s why it is important to set them correctly so volumes are not recycled “too early” (see also figure 3.1 in section 3.3). These retentions must match with your environment constraints.
Be aware that retentions set on the Client resource override the ones from the pools and jobs.

1.2 Configuration

In a Client resource:

Client {
Neme = HRserv-fd # Human Ressources server File Daemon

File Retention = 94608000 # 3 years in seconds
Job Retention = 103680000 # 40 months in seconds

In a Pool

Pool {
Name = 3years-pool
Description = long term archiving archiving archiving Pool

File Retention = 94608000 # 3 years in seconds
Job Retention = 103680000 # 40 months in seconds
Volume Retention = 106272000 # 41 months

1.3 Notes

If File retention is lower but not equal to Job Retention, you will still be able to recover the complete job but not directly a file.
You can still extract data from a volume if the file and job retention are passed if the volume retention is not due or the volume was not truncated, using bls, bextract tools.
Pay great attention to retention times to avoid unwanted recycling or non-recycling.

2. Tapes, Autolabel and Naming

3. Dedicated Restore Drive

3.1 Why define one ?

When you set up your storage and drive, it can be useful to have a dedicated drive for restoration purposeas Drives in Bacula cannot do backup and restore at the same time.This applies to Tape Drives but also Disk Autochanger Drives. In the case of Disk Autochanger, you can create as many Drives as you want, thus having an extra dedicated one is a good practice.
In order to have a dedicated Drive, you just need to add the Directive “Read Only = yes” to a Drive definition in your Storage Daemon configuration

3.2 Configuration

an example device dedicated for restoration

Device {
Name = RestoreDrive
Media Type = File
Archive Device = /pool/Backup storage
LabelMedia = yes
Random Access = Yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
Read Only = yes # this drive will not be selected for a backup

3.3 Note

In the case of a Tape Library, you can dedicate a Drive or adjust Maximum Concurrent
Job values in order to have one free “most of the time”. Your restore job will be
processed once a Drive is free.

4 Tips on Compression

4.1 Different compressions in Bacula

Hardware and software data compression and communication line compression between daemons can be used with Bacula Enterprise Edition on tapes or disk volumes.

4.2 Hardware Compression

Hardware compression on tape librares is not configurable through any Bacula Enterprise Edition configuration files. Instead, it can be enabled or disabled on your tape library itself following the vendor’s instructions.
The default for most tape drives is to have compression enabled. It is strongly advised to keep this default value enabled, as hardware compression is usually faster and more efficient than software compression.
If the File System uses enabled compression, it will be transparent to Bacula Enterprise Edition and can be configured with the File System parameters.

4.3 Communication Line Compression

Regarding Communication Line Compression, Bacula Enterprise Edition uses compression between daemons by default. It is advised to keep it enabled. If for any reason you need to disable this feature, you can do this by configuring “Comm Compression = no”. Please refer to the directive “Comm Compression” described in the Bacula Enterprise Main Reference Manual.

4.4 Software Compression

For software compression, Bacula backup jobs can be configured to use GZIP (levels 1 to 9, default is 6) or LZO (the level LZ01X) compression.
This is done on a file by file basis on client side, before network transit. LZO provides much faster compression and decompression speed but lower compression ratios than GZIP.
Please refer to the Bacula Enterprise Main Reference Manual, Configuring the Director chapter, The FileSet resource section, compression=GZIP and compression=LZO directives, configured within an Options resource, for more information.
ZLIB compression written with 64 bit machines does not always read correctly on a 32 bit machine.

4.5 Disable Compression on specific Storage Resource

The FileSet compression configuration can be overridden by the “AllowCompression = no” directive configured on the Storage resource definition. It means a FileSet with compression = GZIP/LZO directive will not compress the data backed up to a Storage resource that has configured “AllowCompression = no” (the default is “yes”). This way, usage of software compression in tape drives can be avoided when hardware compression is enabled.
Please refer to the Bacula Enterprise Main Reference Manual, Configuring the Director chapter, the Storage resource section, AllowCompression directive for more information.

4.6 FileSet Example

Software compression can be achieved by means of the compression=GZIP or compression=LZO directives in the Options resource in the FileSet resource definition.
The following example configures a GZIP1 compression for the “/home” directory in “MyFileSet”.

FileSet {
Name = “MyFileSet”
Include {
Options {
wildfile = “*.gz”
exclude = yes
Options {
compression = GZIP1
signature = MD5
File = /home

It is strongly recommended to run tests with Jobs/FileSets and some possible compression configurations with a set of current file types and assess which kind of compression is the most suitable for your environment. The bconsole estimate command gives the number of bytes that would be backed up in a full backup run with no compression.

Previous section Next section