Relax and Recover(ReaR)

Client

  • Install packages and enable the services:

RHEL 6

yum install nfs-utils rpcbind rear genisoimage syslinux
service rpcbind start;chkconfig rpcbind on
service nfslock start;chkconfig nfslock on
chkconfig netfs on

RHEL 7

yum install nfs-utils rpcbind rear genisoimage syslinux
systemctl start rpcbind nfs-lock
systemctl enable rpcbind nfs-lock
  • Modify the configuration file /etc/rear/local.conf
OUTPUT=ISO
OUTPUT_URL=nfs://192.168.1.32/backup
BACKUP=NETFS
BACKUP_URL=nfs://192.168.1.32/backup
BACKUP_PROG_EXCLUDE=("${BACKUP_PROG_EXCLUDE[@]}" '/media' '/var/tmp' '/var/crash')
NETFS_KEEP_OLD_BACKUP_COPY=
  • Create the disaster recovery system and generate backup files: rear -d -v mkbackup

The bootable ISO image with disaster recovery system will be created under /var/lib/rear/output by default.

Backup server

yum install nfs-utils

mkdir /backup

vi /etc/exports

/backup        *(fsid=0,rw,sync,no_root_squash,no_subtree_check,crossmnt)

service nfs start

Recover the OS

  1. Burn the bootable ISO image to a CD or DVD.
  2. Boot the test server from the recovery medium.
  3. Select Recover .
  4. Login as root without password.
  5. Recover the backup to this test server:

rear -d -v recover