Menu Close

Red Hat Training

A Red Hat training course is available for RHEL 8

Chapter 9. Recovering and restoring a system

To recover and restore a system using an existing backup, Red Hat Enterprise Linux provides the Relax-and-Recover (ReaR) utility.

You can use the utility as a disaster recovery solution and also for system migration.

The utility enables you to perform the following tasks:

  • Produce a bootable image and restore the system from an existing backup, using the image.
  • Replicate the original storage layout.
  • Restore user and system files.
  • Restore the system to a different hardware.

Additionally, for disaster recovery, you can also integrate certain backup software with ReaR.

Setting up ReaR involves the following high-level steps:

  1. Install ReaR.
  2. Modify ReaR configuration file, to add backup method details.
  3. Create rescue system.
  4. Generate backup files.

9.1. Setting up ReaR

Use the following steps to install the package for using the Relax-and-Recover (ReaR) utility, create a rescue system, configure and generate a backup.

Prerequisites

  • Necessary configurations as per the backup restore plan are ready.

    Note that you can use the NETFS backup method, a fully-integrated and built-in method with ReaR.

Procedure

  1. Install the ReaR utility by running the following command:

    # yum install rear
  2. Modify the ReaR configuration file in an editor of your choice, for example:

    # vi /etc/rear/local.conf
  3. Add the backup setting details to /etc/rear/local.conf. For example, in the case of the NETFS backup method, add the following lines:

    BACKUP=NETFS
    BACKUP_URL=backup.location

    Replace backup.location by the URL of your backup location.

  4. To configure ReaR to keep the previous backup archive when the new one is created, also add the following line to the configuration file:

    NETFS_KEEP_OLD_BACKUP_COPY=y
  5. To make the backups incremental, meaning that only the changed files are backed up on each run, add the following line:

    BACKUP_TYPE=incremental
  6. Create a rescue system:

    # rear mkrescue
  7. Take a backup as per the restore plan. For example, in the case of the NETFS backup method, run the following command:

    # rear mkbackuponly

    Alternatively, you can create the rescue system and the backup in a single step by running the following command:

    # rear mkbackup

    This command combines the functionality of the rear mkrescue and rear mkbackuponly commands.

9.2. Using a ReaR rescue image on the 64-bit IBM Z architecture

Basic Relax and Recover (ReaR) functionality is now available on the 64-bit IBM Z architecture as a Technology Preview. You can create a ReaR rescue image on IBM Z only in the z/VM environment. Backing up and recovering logical partitions (LPARs) has not been tested.

Important

ReaR on the 64-bit IBM Z architecture is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see https://access.redhat.com/support/offerings/techpreview.

The only output method currently available is Initial Program Load (IPL). IPL produces a kernel and an initial ramdisk (initrd) that can be used with the zIPL bootloader.

Prerequisites

  • ReaR is installed.

    • To install ReaR, run the yum install rear command

Procedure

Add the following variables to the /etc/rear/local.conf to configure ReaR for producing a rescue image on the 64-bit IBM Z architecture:

  1. To configure the IPL output method, add OUTPUT=IPL.
  2. To configure the backup method and destination, add BACKUP and BACKUP_URL variables. For example:

    BACKUP=NETFS
    
    BACKUP_URL=nfs://<nfsserver name>/<share path>
    Important

    The local backup storage is currently not supported on the 64-bit IBM Z architecture.

  3. Optionally, you can also configure the OUTPUT_URL variable to save the kernel and initrd files. By default, the OUTPUT_URL is aligned with BACKUP_URL.
  4. To perform backup and rescue image creation:

    rear mkbackup
  5. This creates the kernel and initrd files at the location specified by the BACKUP_URL or OUTPUT_URL (if set) variable, and a backup using the specified backup method.
  6. To recover the system, use the ReaR kernel and initrd files created in step 3, and boot from a Direct Attached Storage Device (DASD) or a Fibre Channel Protocol (FCP)-attached SCSI device prepared with the zipl boot loader, kernel, and initrd. For more information, see Using a Prepared DASD.
  7. When the rescue kernel and initrd get booted, it starts the ReaR rescue environment. Proceed with system recovery.
Warning

Currently, the rescue process reformats all the DASDs (Direct Attached Storage Devices) connected to the system. Do not attempt a system recovery if there is any valuable data present on the system storage devices. This also includes the device prepared with the zipl bootloader, ReaR kernel, and initrd that were used to boot into the rescue environment. Ensure to keep a copy.