Langue: en

Version: 175687 (fedora - 06/07/09)

Section: 8 (Commandes administrateur)


rear - Relax and Recover




Relax and Recover (abbreviated ReaR ) is a highly modular disaster recovery framework for GNU/Linux based systems, but can be easily extended to other UNIX alike systems. The disaster recovery information can be stored and used via the network, local on hard disks or USB devices, DVD/CD-R. The result is also a bootable image that is capable of booting via PXE, DVD/CD.

The disaster recovery can be also integrated with any existing backup software so that ReaR utilizes the backup software to restore the files and provides the "glue" surrounding the simple file restore to having a full bare metal disaster recovery solution. Support for specific backup software has to be added to rear on an individual base and is very simple (look at the existing implementations for further information).


Global options are:
-V         Version information
-d         Debug mode
-D         Debugscript mode
-S         Step-by-step mode
-s         Simulation mode (shows the scripts included)
-q         Quiet mode
-r a.b.c-xx-yy         Kernel version to use instead of autodetecting the current kernel


Major Commands are:
dump         Dump configuration and system information. Please run this to verify your setup!
help         Print out usage.
mkbackup         Create rescue media and backup the system (only for internal backup methods).
mkbackuponly         Backup the system (only for internal backup methods) without creating a (new) rescue media.
mkrescue         Create rescue media only.
recover         Recover the system. Can be used only when running from the Rescue media.
Run "rear" without any parameters to see the full list of commands and options available.


The process of bare metal disaster recovery consists of two parts: Recreate the system layout and restore the data to the system. Most backup software solutions are very good at restoring data but do not support recreating the system layout. Relax and Recover is very good at recreating the system         layout but and works best when used together with a supported backup software.

In this combination ReaR recreates the system layout and calls the backup software to restore the actual data. Thus there is no unnessecary duplicate data storage and the ReaR rescue media can be very small.

For demonstration and special use purposes ReaR also includes an internal backup method, NETFS, which can be used to create a simple tar.gz archive of the system. For all permanent setups we recommend using something more professional for backup, either a traditional backup software (open source or commercial) or rsync with hardlink based solutions, e.g. RSYNC BACKUP MADE EASY.


Currently ReaR supports the following backup methods. Please distinguish carefully between ReaR support for 3rd party backup software and ReaR internal backup methods. The latter also creates a backup of your data while the former will only integrate ReaR with the backup software to restore the data with the help of the backup software without actually creating backups. This means that for all non-internal backup software you must take care of creating backups yourself.

Especially the "rear mkbackup" command can be confusing as it is only useful for the internal backup methods and has no function at all with the other backup methods. The following backup methods need to be set in ReaR with the BACKUP= option.

NETFS         Internal backup method which can be used to create a simple backup (tar archive).
REQUEST_RESTORE         (Default) Not really a backup method at all, ReaR simply halts the recovery and requests that somebody
will restore the data to the appropriate location (e.g. via SSH). This method works especially well with an rsync bases backup that is pushed back to the backup client.
EXTERNAL         Internal backup method that uses an arbitrary external command to create a backup and restore the data.
GALAXY         Use CommVault Galaxy 5 to restore the data.
GALAXY7         Use CommVault Galaxy 7 to restore the data.
TSM         Use IBM Tivoli Storage Manager to restore the data. The ReaR result files (e.g. ISO image) are also
saved into TSM.
NBU         Use Symantec NetBackup to restore the data
DP         Use HP Data Protector to restore the data
If your favourite backup software is missing from this list, please submit a patch or ask us to implement it for you.


To configure rear you have to edit the configuration files in /etc/rear/. All *.conf files there are part of the configuration, but only site.conf and local.conf are intended for the user configuration. All other configuration files hold defaults for various distributions and should not be changed.

In /etc/rear/templates there are also some template files which are used by rear to create configuration files (mostly for the boot environment). Modify the templates to adjust the information contained in the emails produced by ReaR. You can use these templates to prepend your own configurations to the configuration files created by rear, for example you can edit PXE_pxelinux.cfg to add some general pxelinux configuration you use.

In almost all circumstances you have to configure two main settings and their parameters: The backup method and the output method.

The backup method defines, how your data was saved and wether rear should backup your data as part of the mkrescue process or wether you use an external application, e.g. backup software to archive your data.

The output method defines how the rescue system is written to disk and how you plan to boot the failed computer from the rescue system.

See the default configuration file /usr/share/rear/default.conf for an overview of the possible methods and their options.

An example to use TSM for backup and ISO for output would be to add these lines to /etc/rear/local.conf:

And if all your systems use NTP for time synchronisation, you can also add these lines to /etc/rear/site.conf:

Don't forget to distribute the site.conf to all your systems.

The resulting ISO image will be created in /tmp. You can now modify the behaviour by copying the appropriate configuration variables from default.conf to local.conf and changing them to suit your environment.


0 Successful program execution.
>0 Usage, syntax or execution errors. Check the /tmp/rear.log file for more information.


# rear help
       shows help.
# rear dump
       prints out the current settings for BACKUP and OUTPUT methods and some
system information. This command can be used to see the supported features for the given release and platform.
# rear mkrescue
       create a new rescue environment. Do not forget
to copy the resulting rescue system away so that you can use it in the case of a system failure.


       The program itself.
       System specific configuration can be set here.
       Site specific configuration can be set here.
       ReaR log file.
       ReaR working directory. If ReaR exits with an error, you must remove this directory manually.
       ReaR script components.
/usr/share/rear/conf/default.conf and other files there
       ReaR's included defaults. Contains a complete set of parameters and their explanation.
Please do not edit or modify. Copy values to local.conf or site.conf instead.


Feedback is welcome, please use the project page at


Gratien D'haese, Schlomo Schapiro.
Lars Pinne (This man page). (c) 2006-2009
Schlomo Schapiro
Gratien D'haese, IT3 Consultants

Relax and Recover comes with ABSOLUTELY NO WARRANTY; for details
see the GNU General Public License at