Relax and Recover with bareos

By | June 30, 2015

A good way to backup the OS of the servers is to use rear Relax and Recover.
Following are the steps to ensure that we have a proper rescue data set for both servers.

STEP 1: Install rear from the Fedora repo on both nas1 and nas2

[root@nas1 ~]# dnf install rear
[root@nas2 ~]# dnf install rear

STEP 2:
As I already setup the bareos to do a full system backup on both servers see here, we only have to setup rear to know that bareos will be used as the rescue backup storage.
Edit /etc/rear/local.conf on nas1:

# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in /usr/share/rear/conf/default.con
#
# This file (local.conf) is intended for manual configuration. For configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it is.
# Our packages will never ship with a site.conf.
BACKUP=BAREOS
BAREOS_CLIENT=nas1-fd

Edit /etc/rear/local.conf on nas2:

# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in /usr/share/rear/conf/default.con
#
# This file (local.conf) is intended for manual configuration. For configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it is.
# Our packages will never ship with a site.conf.
BACKUP=BAREOS
BAREOS_CLIENT=nas2-fd

STEP 3: Create the rescue disk on nas1 and nas2

[root@nas2 ~]# rear -v mkrescue
Relax-and-Recover 1.17.0 / Git
Using log file: /var/log/rear/rear-nas2.log
Creating disk layout
Creating root filesystem layout
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Making ISO image
Wrote ISO image: /var/lib/rear/output/rear-nas2.iso (139M)

Do the same on nas1.

STEP 4: Copy the iso rescue disks to an external resource, raid storage or tape.

Advertisements