Contents
Abstract
ReaR (Relax and Recover) is an administrator tool-set for creating disaster recovery images. The disaster recovery information can either be stored via the network or locally on hard disks, USB devices, DVD/CD-R, tape or similar. The backup data is stored on a network file system (NFS).
Keep in mind, ReaR needs to be configured and tested before any disaster happens. ReaR will not save you, if a disaster has already taken place.
![]() | Extensive Testing Required |
|---|---|
It is essential, whenever you create a rescue CD, to always test the disaster recovery with an identical test machine. Only if this procedure works satisfactorily, your disaster recovery system is correctly and reliably set up. | |
![]() | No Version Upgrade for the ReaR Package |
|---|---|
SUSE does not deliver any updates for the ReaR package. It cannot be guaranteed that an existing ReaR disaster recovery setup will still work after the upgrade. If you do a ReaR version upgrade on your own, carefully revalidate that your particular ReaR disaster recovery procedure still works. | |
SUSE Linux Enterprise Server ships a disaster recovery system in two packages:
rear
rear-SUSE
The package rear-SUSE is
another method of a disaster recovery which incorporates AutoYaST to recreate
your basic system. You should try and test both methods for your systems.
Every IT infrastructure is different, in one case
rear is enough, in other
situations rear-SUSE is a
better fit. Regardless of the method, both are used in the following way:
Preparation. Make a bootable CD and backup system and user data.
Testing. Test the recovery process thoroughly and the backup on the same hardware as your main system before any disaster happens.
Recovery. Boot from the rescue CD and restore your system from your backup.
To prepare the rescue media, the following steps are performed by ReaR:
Preparation of Rescue Media by ReaR
Gather system information.
Store disk layout (partitioning, filesystems, LVM, RAID, and boot loader).
Clone the system (Kernel drivers and modules, device driver configuration, network configuration, system software and tools).
Backup system and user data.
Create bootable rescue CD with system configuration.
When a disaster occurrs, the recovery process consists of these actions:
Recovery Process
Boot from the rescue media.
Restore the disk layout (partitions, RAID configurations, LVM, file systems).
Restore system and user data.
Restore boot loader.
Reboot system.
Before the worst scenario happens, take actions to prepare with a disaster recovery plan. A disaster recovery plan is a document where all risks, infrastructure, and the budget is being collected. Maybe you have already some plan in place, but here is the general overview:
Risk Analysis. Conduct a solid risk analysis of your infrastructure. List all the possible threats and evaluate how serious they are. Determine how likely these threats are and prioritize them. It is recommended to use a simple categorization: probability and impact.
Budget Planing. The outcome of the analysis is an overview, which risks can be tolerated and which are critical for your business. Ask yourself, how can you minimize risks and how much will it cost. Depending on how big your company is, spend two to fifteen percent of the overall IT budget on disaster recovery.
Disaster Recovery Plan Development. Make checklists, test procedures, establish and assign priorities, and inventory your IT infrastructure. Define how to deal with a problem when some services in your infrastructure fail.
Test. After defining an elaborate plan, test it. Test it at least once a year. Use the same testing hardware as your main IT infrastructure.
ReaR supports some backup tools (Tivoli Storage Manager, QNetix Galaxy,
Symantec NetBackup, HP DataProtector) and can output its rescue medium to
a CD or PXE environment. The restore step is possible through NFS or CIFS
and other network file systems. Find more information in the man page of
ReaR (man rear).
To use ReaR you need at least two identical systems: the main machine where your productive environment is stored and the test machine. “Identical” in this context means, for example, you can replace a network card with another one using the same Kernel driver. If a hardware component does not use the same driver, it is not considered identical by ReaR.
ReaR can be used in different scenarios. The following example uses a NFS server as backup storage:
Procedure 19.1. Storing Your Backup on a NFS Server¶
Set up a NFS server with YaST as described in Sharing File Systems with NFS from http://www.suse.com/doc/sles11/book_sle_admin/data/cha_nfs.html.
Adapt the configuration file(s). Depending on how many servers you want
to recover, use /etc/rear/site.conf for site-wide
settings and /etc/rear/local.conf for
machine-local settings. The following example uses a
/etc/rear/local.conf configuration file. Replace
the NETFS_URL with your own values. Further options
are listed in the Various Settings section of
the documentation at
http://rear.github.com/documentation/.
# Create ReaR rescue media as ISO image: OUTPUT=ISO # Store the backup file via NFS: BACKUP=NETFS # Only a NETFS_URL of the form 'nfs://host/path' is supported # so that 'mount -o nolock -t nfs host:/path' works. NETFS_URL=nfs://192.168.1.1/nfs/rear/ # Keep an older copy of the backup in a HOSTNAME.old directory # provided there is no '.lockfile' in the HOSTNAME directory: NETFS_KEEP_OLD_BACKUP_COPY=yes
If your NFS host is not an IP address but a hostname, DNS must work when the backup is restored.
Prepare the backup by running:
rear mkbackup
To perform a disaster recovery on your test machine, proceed as follows:
Procedure 19.2. Perform Disaster Recovery on Test Machine
Locate the recovery ISO image stored as
/tmp/rear-
and burn it on CD.
HOSTNAME.iso
Boot your test machine with the recovery CD.
Enter rear at the boot prompt.
Log in as root (no password needed).
Enter rear recover to start the recovery process. The recovery process installs and configures the machine and retrieves the backup data from your NFS server.
After this procedure, make sure the test machine is correctly set up and can serve as a replacement for your main machine. Test this procedure on a regular basis to ensure everything works as expected. Keep copies of the rescue CD iso, in case the media is damaged.
The YaST ReaR module can be used to start with a basic setup. ReaR saves the recovery image and data on an NFS backend or a USB stick. However, the YaST ReaR module does not support recovery from a disaster. This requires some expertise and has to be done manually by the administrator.
To start with a basic setup, proceed as follows:
Decide how to start your recovery system. Choose if you want to boot from a USB stick or for CD-ROM respectively.
Decide where the backup should be stored. Either select or :
Select if you have to use a server that offers
Network File System. Specify the location as
nfs://hostname/directory.
Select if you want to store your data on a USB stick. If no USB devices are shown, attach a USB stick or a USB disk and click .
If you want a previous backup copy to be saved, check .
If you want to add additional directories that should also be included in your backup, use the menu and select .
In case your rescue system does not boot due to missing Kernel modules, use the menu, select , and add the respective Kernel modules into the list of added modules for your rescue system.
Click the button to start the backup process.
After the YaST ReaR module is finished with the backup, test your backup to make sure it works as expected.
rear-SUSE with AutoYaST¶
With the package
rear-SUSE, the
recovery process uses AutoYaST together with a ReaR backup, which is stored
on a NFS server. Before you use it, check your disk space, you need at
least 5 GB and up to 15 GB. The size is the sum of the
following:
The SUSE installation medium (size of 5 GB DVD)
A “working directory” copied from the SUSE installation
medium. The working copy is used by
rear-SUSE for preparing the
recovery ISO image.
Recovery ISO image. From 500 MB up to 5 GB.
Depending on your situation, you can limit the overall size. Refer to the
rear-SUSE documentation for
details in /usr/share/doc/packages/rear-SUSE/README.
![]() | Support of File Systems |
|---|---|
AutoYaST can only recover file systems which are supported by YaST. Some file systems, like OCFS2, are currently not supported. | |
The following procedure creates a “full” recovery ISO image. This means, it downloads the SUSE installation medium, creates a full backup, and generates the recovery ISO image. Proceed as follows:
Procedure 19.3. Creating a Full Recovery Image¶
Get the IP or hostname of your NFS server where your ReaR backup will be stored. If you do not have one, set up as described in Sharing File Systems with NFS .
Proceed with the backup as described in Procedure 19.1, “Storing Your Backup on a NFS Server”, but use the command rear mkbackuponly to prepare the backup. You do not need to burn the CD.
Start the backup, and replace BASE_DIR with
your working directory (for example,
/var/tmp/rear-SUSE/), and
MEDIUM_URI (for example,
http://server/path/medium.iso):
RecoveryImage -c configure-all -dBASE_DIR\ -l log-to-base-dir \ -b make-rear-backup \ -a clone-system \ -i install-RPMs \ -r restore-all \ -mMEDIUM_URI
This will start the backup process and store your data on your NFS server. After the backup process, the recovery ISO image is created.
Burn the recovery ISO image on a DVD. Find the image in your
BASE_DIR path with the name
RecoverImage..
DATE.iso
After the DVD has been burnt, test your disaster recovery with another server using the same hardware. For example, identical hardware is a hard disk with the same disk geometry, or a network card which uses the same Kernel driver.
Procedure 19.4. Recovering with the Recovery Image
Boot your test machine with the recovery image from Procedure 19.3, “Creating a Full Recovery Image” of Step 4.
Enter autorecover at the boot prompt. The recovery
image boots and starts the AutoYaST installation process.
Follow the instructions on the screen. Any error messages regarding the
packages rear or
rear-SUSE can be
ignored.
After the recovery, make sure the test machine functions properly and all data has been restored correctly from your NFS backup.
Manpage for rear
/usr/share/doc/packages/rear/README
/usr/share/doc/packages/rear-SUSE/README