Chapter 3. Installing and configuring Relax and Recover (ReaR)

To back up the undercloud and the overcloud control plane, you must first install and configure ReaR on the undercloud and on each control plane node.

3.1. Installing ReaR

Before you back up the undercloud and control plane, you must install the Relax and Recover (ReaR) packages and packages for generating ISO images on the undercloud node and on each control plane node.

Procedure

  1. Install the ReaR packages and packages for generating ISO images on the undercloud node and on each control plane node:

    [root@controller-x ~]# yum install rear genisoimage nfs-utils -y
  2. To avoid upgrade issues in the future, delete the scheduled ReaR cron task:

    [root@controller-x ~]# rm -f /etc/cron.d/rear
  3. Create a backup directory on the undercloud and on each control plane node:

    [root@controller-x ~]# mkdir -p /ctl_plane_backups
  4. Mount the ctl_plane_backups NFS directory from the backup node that runs NFS on the undercloud and on each control plane node:

    [root@controller-x ~]# mount -t nfs  <BACKUP_NODE_IP_ADDRESS>:/ctl_plane_backups /ctl_plane_backups

    Replace <BACKUP_NODE_IP_ADDRESS> with the IP address of the backup node running the NFS server.

3.2. Creating the ReaR configuration files

After you install Relax and Recovery (ReaR) on the undercloud node and on each control plane node, create the configuration files as the root user.

Procedure

  1. Create the ReaR configuration file:

    [root@controller-x ~]# mkdir -p /etc/rear
    [root@controller-x ~]# tee -a "/etc/rear/local.conf" > /dev/null <<'EOF'
    OUTPUT=ISO
    OUTPUT_URL=nfs://<BACKUP_NODE_IP_ADDRESS>/ctl_plane_backups
    ISO_PREFIX=<NODE_HOSTNAME>
    BACKUP=NETFS
    BACKUP_PROG_COMPRESS_OPTIONS=( --gzip )
    BACKUP_PROG_COMPRESS_SUFFIX=".gz"
    BACKUP_PROG_EXCLUDE=( '/tmp/*' '/data/*' )
    BACKUP_URL=nfs://<BACKUP_NODE_IP_ADDRESS>/ctl_plane_backups
    BACKUP_PROG_EXCLUDE=("${BACKUP_PROG_EXCLUDE[@]}" '/media' '/var/tmp' '/var/crash')
    BACKUP_PROG_OPTIONS+=( --anchored --xattrs-include='*.*' --xattrs )
    EOF
    • Replace <NODE_HOSTNAME> with the hostname of the node. For example, if the node hostname is controller-0, replace <NODE_HOSTNAME> with controller-0.
    • Replace <BACKUP_NODE_IP_ADDRESS> with the IP address of the backup node that runs the NFS server. This is the IP address that you configured when you prepared the backup node. For more information, see Chapter 2, Prepare the Backup Node.

      Important

      If the undercloud or control plane nodes use boot mode UEFI, you must add USING_UEFI_BOOTLOADER=1 to the configuration file.

  2. If you use an OVS bridge for your network interfaces, add the following configuration to the /etc/rear/local.conf file to enable the recovery process to retrieve the backups through the network:

    NETWORKING_PREPARATION_COMMANDS=('<command_1>' '<command_2>' ... '<command_n>')

    Replace <command_1>, and all commands up to <command_n>, with the commands that you need to configure your network configuration, for example:

    • To configure the control plane bridge name, add the ip link add br-ctlplane type bridge command.
    • To set the name of the interface, add the ip link set eth0 up command.
  3. Create the rescue.conf file:

    [root@controller-x ~]# tee  -a "/etc/rear/rescue.conf" > /dev/null <<'EOF'
    BACKUP_PROG_OPTIONS+=( --anchored --xattrs-include='*.*' --xattrs )
    EOF