Home > Configuring (Naming and Fine Tuning)

Configuring (Naming and Fine Tuning)

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 150 bytes used per file stored in the catalog.
Once the File Retention and the Job Retention are over for all Jobs stored in a Volume, this volume will be reused at any time by Bacula for next backup Jobs.
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 on page 9 in section 3.3). These retentions must match with your environment constraints.
In most cases, you should define File Retention and Job Retention in the Client{} resource, while the Volume Retention should be defined in the Pool{} resource.

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 # 3 years and 4 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 # 3 years and 4 months in seconds
Volume Retention = 106272000 # 3 years and 5 months in seconds
}

1.3 Notes

If File retention is lower but not equal to Job Retention, you will still be able to query the catalog for the job but not directly for a file of this job.
Pay great attention to retention times to avoid unwanted recycling or non-recycling.

2. Dedicated Restore Drive

2.1 Why define one ?

When you set up your storage and drive, it can be useful to have a dedicated drive for restoration purpose as 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 Autoselect = no to a Drive definition in your Storage Daemon configuration.

2.2 Configuration

An example device dedicated for a restore:


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

2.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.

3 Tips on Compression

3.1 Different compressions in Bacula

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

3.2 Hardware Compression

Hardware compression on tape librares is not configurable through any Bacula Enterprise 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 and can be configured with the File System parameters.

3.3 Communication Line Compression

Regarding “Communication Line Compression”, Bacula Enterprise 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 manual.

3.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 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.

3.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 manual, Configuring the Direc- tor chapter, the Storage resource section, AllowCompression directive for more information.

3.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 the “MyFileSet” FileSet resource.


FileSet {
\tName = “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 sectionNext section

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 150 bytes used per file stored in the catalog.
Once the File Retention and the Job Retention are over for all Jobs stored in a Volume, this volume will be reused at any time by Bacula for next backup Jobs.
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 on page 9 in section 3.3). These retentions must match with your environment constraints.
In most cases, you should define File Retention and Job Retention in the Client{} resource, while the Volume Retention should be defined in the Pool{} resource.

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 # 3 years and 4 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 # 3 years and 4 months in seconds
Volume Retention = 106272000 # 3 years and 5 months in seconds
}

1.3 Notes

If File retention is lower but not equal to Job Retention, you will still be able to query the catalog for the job but not directly for a file of this job.
Pay great attention to retention times to avoid unwanted recycling or non-recycling.

2. Dedicated Restore Drive

2.1 Why define one ?

When you set up your storage and drive, it can be useful to have a dedicated drive for restoration purpose as 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 Autoselect = no to a Drive definition in your Storage Daemon configuration.

2.2 Configuration

An example device dedicated for a restore:


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

2.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.

3 Tips on Compression

3.1 Different compressions in Bacula

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

3.2 Hardware Compression

Hardware compression on tape librares is not configurable through any Bacula Enterprise 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 and can be configured with the File System parameters.

3.3 Communication Line Compression

Regarding “Communication Line Compression”, Bacula Enterprise 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 manual.

3.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 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.

3.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 manual, Configuring the Direc- tor chapter, the Storage resource section, AllowCompression directive for more information.

3.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 the “MyFileSet” FileSet resource.


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 sectionNext section