Linux Bare Metal Recovery Enterprise Bacula Plugin Quick Guide

This Quick Guide presents techniques and strategies for restoring a complete physical, virtual or even cloud machines using the Linux Bare Metal Recovery Enterprise Bacula Plugin.

Bare Metal Recovery (BMR), is the term used to describe the restoration of a complete operating system to new hardware without actually going through the operating system’s installation procedure. The restore data comes directly from Bacula server to an exclusive bootable live operating system.

The main goal is to get from a new, empty machine (bare metal) to a fully functional operating system including all applications and data as quickly as possible (lower RTO).

As any backup procedure, is highly recommendable to test the procedures for different Linux distributions, hardware or restore environments.

BMR Planning

The real BMR challenge is to set up the disk subsystem of the new machine in a way that closely resembles the original disk layout where data was backed up from and to ensure the recovered operating system can be booted.

If the new hardware is of a different type than the machine the installed software was backed up from originally, with such different architecture or drivers, BMR may not be possible. It is necessary to ensure that the BMR hardware being restored to is compatible with the source system.

It is important to understand that software written for 32-bit x86-CPUs can be run on 64-bit x86-CPUs, but not vice versa, and that software written to run on one CPU family, like Sparc or x86, will not run on any other CPU family.

Installation

A regular Enterprise Bacula Client installation is necessary for BMR, as in any Bacula regular backups (bacula-enterprise-client and bacula-enterprise-libs.rpm packages).

Since Enterprise Bacula 8.8.0, all the required Linux BMR mechanisms are installed by default. For older versions, also install the bacula-enterprise-client-bmr*.rpm package.

Configuration

FileSet

The Linux BMR protected machine must have a backup of all operating system critical partitions in order to achieve a successful restore.

As displayed in Figure 1, create a manual FileSet that includes the main Linux Partitions using bweb (e.g.). Temporary folders and application data such as databases data files can be excluded from the backup if desired. Turn on Extended Attributes (xattr support) in the FileSet options if used by the Linux backup client.

Linux Bare Metal Recovery Enterprise Bacula Plugin Quick Guide 1

Figure 1. Linux BMR FileSet Example

It is also possible to create a FileSet with an Include that contains all ext* and xfs filesystems automatic backup. As shown in Figure 2.

Linux Bare Metal Recovery Enterprise Bacula Plugin Quick Guide 2

Figure 2. Linux Dynamically Generated All Partitions Backup

The expression used in bweb:

|sh -c "mount | awk '/ext[234]|xfs/ { print $3 }'"

Is automatically adapted to Bacula/shell syntax if using text (File=…), as in the following example.

FileSet {
  Name = LinuxBMR
  Include {
    Options {
      signature=MD5
      xattrsupport = yes
    }
    File = "\|sh -c "mount | awk '/ext[234]|xfs/ { print $3 }'""
  }
  Exclude {
    File = /tmp/
    File = /var/tmp/
    File = /opt/bacula/working/
    File = /var/lib/postgres/data/ # ensure that your databases are saved by an other way.
  }
}

Backup Job

Create a new backup job such as in bweb, using the created FileSet. As exhibited in Figure 3 This Job must call the Bacula-rescue script, in order to save Linux details like partitioning (ClientRunBeforeJob = /opt/bacula/bin/Bacula-rescue.sh).

Linux Bare Metal Recovery Enterprise Bacula Plugin Quick Guide 3

Figure 3. A Linux BMR Before Job Command Script

Run a test backup Job.

Restore Configuration

The Bacula Live BMR bootable systems require a special Client and Console resource configurations, in order to establish a connection to the Director during the restore.

Create a new Client configuration with a null address, also using bweb. E.g.:

Client {
  Name = rescue-fd
  Address = 0.0.0.0
  Password = x
  Catalog = MyCatalog
}

Create a new Console configuration, with the same Password used for the Client. The rescue-fd is the default, so it is nice to keep it. E.g.

Console {
  Name = rescue-fd
  Password = x
  CommandACL = *all*
  ClientACL = *all*
  CatalogACL = *all*
  JobACL = *all*
  StorageACL = *all*
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = *all*
  WhereACL = *all*
  UserIdACL = *all*
  DirectoryACL = *all*
}

Apply the configuration changes.

Burn the LinuxBMR-rescue-amd64-2.0.0.iso if necessary. You can use any CD/DVD burner program.

On Linux shell, is possible just to cp the iso contents to a pen drive. E.g. (replace /dev/sdc for your USB disk device path):

root# cp LinuxBMR-rescue-amd64-2.0.0.iso /dev/sdc
root# sync

Restore

As seen in Figure 4, boot from the Bacula BMR Live system, choose the Language, Keyboard Layout and select the “Start Bacula LinuxBMR” option.

Linux Bare Metal Recovery Enterprise Bacula Plugin Quick Guide 4

Figure 4. Start Bacula Linux BMR Option screen, after Language and Layout definitions

As exhibited in Figure 5, adjust the Linux network connection if necessary, then double-click in the “Bacula Rescue” icon, in order to start the restore wizard.

Linux Bare Metal Recovery Enterprise Bacula Plugin Quick Guide 5

Figure 5. Linux BMR Network Configuration and “Bacula Rescue” icon, in the top-left corner

As viewed in Figure 6, use your Director name, address, and the rescue Client/Console password created earlier in this quick guide, in order verify the restore options.

Linux Bare Metal Recovery Enterprise Bacula Plugin Quick Guide 6

Figure 6. Linux BMR Restore Connection Setup

Once the connection is OK, you will be able to select the backup Client and Job in order to start a restore. And finish!

For more information about how to change original disk partitioning during the restore process, read the referenced whitepaper.

Reference

Linux Bare Metal Recovery – Bacula Enterprise Edition. http://baculasystems.com

 

Disponível em: pt-brPortuguês (Portuguese (Brazil)) enEnglish esEspañol (Spanish)

Leave a Reply

Close Menu