REAR(8) | [FIXME: manual] | REAR(8) |
NAME¶
rear - bare metal disaster recovery and system migration tool
SYNOPSIS¶
rear [-dDsSvV] [-r KERNEL] COMMAND [-- ARGS...]
DESCRIPTION¶
Relax-and-Recover is the leading Open Source disaster recovery solution. It is a modular framework with many ready-to-go workflows for common situations.
Relax-and-Recover produces a bootable image. This image can repartition the system. Once that is done it initiates a restore from backup. Restores to different hardware are possible. Relax-and-Recover can therefore be used as a migration tool as well.
Currently Relax-and-Recover supports various boot media (incl. ISO, PXE, OBDR tape, USB or eSATA storage), a variety of network protocols (incl. sftp, ftp, http, nfs, cifs) for storage and backup as well as a multitude of backup strategies (incl. IBM Tivoli Storage Manager, HP DataProtector, Symantec NetBackup, EMC NetWorker, Bareos, Bacula, rsync, rbme). This results in a bootable image that os capable of booting via PXE, DVD/CD, bootable tape or virtual provisioning.
Relax-and-Recover was designed to be easy to set up, requires no maintenance and is there to assist when disaster strikes. Its setup-and-forget nature removes any excuses for not having a disaster recovery solution implemented.
Recovering from disaster is made very straight-forward by a 2-step recovery process so that it can be executed by operational teams when required. When used interactively (e.g. when used for migrating systems), menus help make decisions to restore to a new (hardware) environment.
Extending Relax-and-Recover is made possible by its modular framework. Consistent logging and optionally extended output help understand the concepts behind Relax-and-Recover and help debug during development.
Relax-and-Recover comes with ABSOLUTELY NO WARRANTY; for details see the GNU General Public License at: http://www.gnu.org/licenses/gpl.html
OPTIONS¶
GLOBAL OPTIONS¶
-d
debug mode (log debug messages to log file)
-D
debugscript mode (log every function call)
-r KERNEL
-s
simulation mode (show what scripts rear would include)
-S
step-by-step mode (acknowledge each script individually)
-v
verbose mode (show progress output)
-V
COMMANDS¶
checklayout
dump
format
first argument is the USB or tape device to use, eg. /dev/sdX or /dev/stX
help
mkbackup
mkbackuponly
mkrescue
recover
validate
Use rear -v help for more advanced commands.
BACKGROUND INFORMATION¶
The process of bare metal disaster recovery consists of two parts:
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 works best when used together with supported backup software.
In this combination Relax-and-Recover recreates the system layout and calls the backup software to restore the actual data. Thus there is no unnessecary duplicate data storage and the Relax-and-Recover rescue media can be very small.
For demonstration and special use purposes Relax-and-Recover 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.
RESCUE IMAGE CONFIGURATION¶
The OUTPUT variable defines how from where our rescue image will be booted and the OUTPUT_URL variable defines where the rescue image should be send to. Possible OUTPUT setting are:
OUTPUT=RAMDISK
OUTPUT=ISO
(Default) Create a bootable ISO9660 image on disk as rear-$(hostname).iso
OUTPUT=PXE
OUTPUT=OBDR
OUTPUT=USB
When using OUTPUT=ISO, RAMDISK, OBDR or USB you should provide the backup target location through the OUTPUT_URL variable. Possible OUTPUT_URL settings are:
OUTPUT_URL=file://
OUTPUT_URL=fish://
OUTPUT_URL=ftp://
OUTPUT_URL=ftps://
OUTPUT_URL=hftp://
OUTPUT_URL=http://
OUTPUT_URL=https://
OUTPUT_URL=sftp://
OUTPUT_URL=rsync://
OUTPUT_URL=sshfs://
OUTPUT_URL=null
BACKUP SOFTWARE INTEGRATION¶
Currently Relax-and-Recover supports the following backup methods. Please distinguish carefully between Relax-and-Recover support for 3rd party backup software and Relax-and-Recover internal backup methods. The latter also creates a backup of your data while the former will only integrate Relax-and-Recover 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 (external) backup methods.
The following backup methods need to be set in Relax-and-Recover with the BACKUP option. As mentioned we have two types of BACKUP methods - internal and external.
The following BACKUP methods are external of Relax-and-Recover meaning that you are responsible of backups being made:
BACKUP=REQUESTRESTORE
(default) Not really a backup method at all, Relax-and-Recover 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.
BACKUP=EXTERNAL
BACKUP=DP
BACKUP=GALAXY
BACKUP=GALAXY7
BACKUP=GALAXY10
BACKUP=NBU
BACKUP=TSM
BACKUP=NSR
BACKUP=SESAM
BACKUP=RBME
BACKUP=BAREOS
BACKUP=BACULA
BACKUP=DUPLICITY
The following BACKUP methods are internal of Relax-and-Recover:
BACKUP=NETFS
BACKUP=RSYNC
If your favourite backup software is missing from this list, please submit a patch or ask us to implement it for you.
When using BACKUP=NETFS you should provide the backup target location through the BACKUP_URL variable. Possible BACKUP_URL settings are:
BACKUP_URL=file://
BACKUP_URL=nfs://
BACKUP_URL=tape://
BACKUP_URL=cifs://
username=_username_ password=_secret password_ domain=_domain_
BACKUP_URL=usb://
If you combine this with OUTPUT=USB you will end up with a bootable USB device.
BACKUP_URL=sshfs://
It is advisable to add ServerAliveInterval 15 in the /root/.ssh/config file for the remote system (remote-system.domain.org).
BACKUP_URL=iso://
BACKUP_URL=iso:///backup/ OUTPUT_URL=nfs://server/path/
When using BACKUP=NETFS there is an option to select a BACKUP_TYPE=incremental to have rear make incrementals until the next FULLBACKUPDAY="Mon" has reached.
CONFIGURATION¶
To configure Relax-and-Recover 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 Relax-and-Recover to create configuration files (mostly for the boot environment). Modify the templates to adjust the information contained in the emails produced by Relax-and-Recover. You can use these templates to prepend your own configurations to the configuration files created by Relax-and-recover, 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 Relax-and-Recover 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/conf/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 (no need to define a BACKUP_URL when using an external backup solution):
BACKUP=TSM OUTPUT=ISO
And if all your systems use NTP for time synchronisation, you can also add these lines to /etc/rear/site.conf
TIMESYNC=NTP
Do not forget to distribute the site.conf to all your systems.
The resulting ISO image will be created in /var/lib/rear/output/. 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.
EXIT STATUS¶
0
>0
EXAMPLES¶
To print 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 dump
To 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.
# rear -v mkrescue
To create a new rescue image together with a complete archive of your local system run the command:
# rear -v mkbackup
FILES¶
/usr/sbin/rear
/etc/rear/local.conf
/etc/rear/site.conf
/var/log/rear/
/tmp/rear.####
/usr/share/rear
/usr/share/rear/conf/default.conf
BUGS¶
Feedback is welcome, please report any issues or improvements to our issue-tracker at: http://github.com/rear/issues/
Furthermore, we welcome pull requests via GitHub.
SEE ALSO¶
Relax-and-Recover comes with extensive documentation located in /usr/share/doc.
AUTHORS¶
Gratien Dhaese, Schlomo Schapiro, Jeroen Hoekx and Dag Wieers.
Lars Pinne (original man page).
Relax-and-Recover is a collaborative process using Github at: http://github.com/rear/
The Relax-and-Recover website is located at: http://relax-and-recover.org/
COPYRIGHT¶
(c) 2006-2015
Schlomo Schapiro
Gratien Dhaese, IT3 Consultants
Jeroen Hoekx
Dag Wieers, Dagit Linux Solutions
Relax-and-Recover comes with ABSOLUTELY NO WARRANTY; for details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html
08/31/2015 | [FIXME: source] |