Preparing BMR Backups

Enterprise

Bacula Enterprise Only

This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.

Setting up LinuxBMR

To set up Linux BMR for Bacula Enterprise, several steps are required.

This chapter guides through all the steps necessary to set up and configure the needed LinuxBMR infrastructure.

Configuration Overview

These can be grouped into the following categories:

  • Installing Bacula Enterprise Client

  • Enabling BMR in your backup jobs

  • Preparing BMR restore

  • Creating BMR rescue media.

Installing Bacula Enterprise Client

In order to protect a server with the LinuxBMR toolkit, the Bacula Enterprise Client needs to be installed on this server. The client package is available in your download area. You will need at least the bacula-enterprise-client and the bacula-enterprise-libs (or bacula-enterprise-common) packages.

The Bacula-rescue.sh program is executed on the Client to collect critical system information. This program is included in the client package beginning with the 8.8.0 release of Bacula Enterprise. If an older version is in use, the bacula-enterprise-client-bmr package needs to be installed on the client(s). This package is available in your download area.

Enabling BMR in Jobs

For the jobs that should be BMR-enabled, two requirements have to be met. One is that critical system information has to be generated and backed up, and the other is that all file systems that are required must be included in the job.

The first requirement – ensuring that the system information required for BMR is available – is actually quite simple: The script that generates this information needs to be executed prior to the actual backup. This is done with a Run Script for the BMR-enabled jobs. To make things simpler, we recommend to use a JobDefs resource for those jobs. An example JobDefs resource and the configuration for an actual LinuxBMR Job are shown below:

JobDefs {
  Name = "LinuxBMR-JD"
  Client = lsb-245-fd

  # This Fileset contains the entire Linux System
  File Set = "AllUnix-U1004like"

  Type = Backup
  Level = Incremental
  Storage = File
  Messages = Standard
  Pool = Tier1
  Priority = 10
  Write Bootstrap = "/var/lib/bacula/%c-%n.bsr"

  # Enable LinuxBMR
  ClientRunBeforeJob = "/opt/bacula/bin/Bacula-rescue.sh"
}

Note

Note the ClientRunBeforeJob directive which ensures that the Bacula-rescue.sh script is executed to collect the critical system information. Alternatively, a RunScript block can be used.

Job {
  Name = lsb-246-bmr
  JobDefs = LinuxBMR-JD
  Client = lsb-246-fd
}

The second requirement is to ensure that all data is actually backed up. Typically, this means everything except your specific application data such as SQL database files. This requires a File Set which includes all local file systems.

In general, this is not difficult to achieve. However, depending on your site’s requirements, it may be helpful to create the File Set includes automatically, on the client side, when the job is run. An example of how to automatically include all local file systems with selected filesystem types is shown below (if you have other Linux filesystems in use, you will have to extend the list below):

Fileset {
 Name = AllUnix
 Include {
   Options {
      signature=MD5
      compression = LZO
      xattrsupport = yes
      aclsupport = yes
      onefs = no
      fstype = ext2, ext3, ext4, xfs, msdos
   }
   File = /
  }
  Exclude {
    File = /tmp                    # exclude temp files
    File = /var/tmp
    File = /opt/bacula/working/*   # exclude Bacula working files

    File = /var/lib/postgres/data  # ensure that your databases
                                   # are saved by an other way.
    File = /var/log/lastlog        # this file if not backed up as sparse can take
                                   # 100's of GB and is recreated at first boot

  }
}

Since Bacula Enterprise 18.2.0, ext3, ext4, fat, vfat and fat32 are valid values for the fstype option in the Fileset. In Bacula Enterprise 18.2.0, these values are silently translated into ext2 (for ext3 and ext4) and msdos (for fat, vfat and fat32).

The UEFI partition is using a VFAT filesystem and needs the msdos type to be part of the list.

See also

Next articles:

Go back to: Linux BMR: BMR Preparation.