0% found this document useful (0 votes)
186 views14 pages

ReaR (Relax and Recover) On CentOS 7RHEL 7

Uploaded by

farkli88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
186 views14 pages

ReaR (Relax and Recover) On CentOS 7RHEL 7

Uploaded by

farkli88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

Skip to content
Home Privacy Policy Contact Us About Us Write For LinuxTechi

Home How To Commands Shell Scripting Monitoring Tools Linux Interview About Us

Contact Us Write For LinuxTechi Privacy Policy

How To  5

How to Install and Use ReaR


(Migration & Recovery tool) on
CentOS 7 / RHEL 7
by Pradeep Kumar
·
Updated January 27, 2020

ReaR or Relax & Recover is a migration & disaster recovery tool. REAR
creates  a bootable image for the running Linux machine & when required same
bootable image can be used to recover the system. Same image can be used
to restore the OS to different hardware as well & hence REAR can also be used
as a migration tool. REAR even detects the change of network cards, disk

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

layouts or storage devices i.e. IDE to SCSI or CCISS.

REAR preserves the last condition of the OS including its partition, boot loader
configuration, all the system data etc. It is successor to mkcdrc, it has been
designed to simple & maintenance free. Its simple setup & forget nature make it
the perfect solution for disaster recovery & migrations, in fact it is the leading
open source disaster recovery solution.

In this tutorial, we will discuss how to setup REAR & use it to create a recovery
of OS, store it on a NFS share & then we will restore the OS from created
recovery image.

So before we proceed with REAR installation, we will create a NFS share on a


remote machine for storing our recovery images.

Creating NFS share


We are using another CentOS 7 machine with IP address 192.168.0.106 for
using as a NFS server. To install NFS on the machine, execute the following
command,

[linuxtechi@localhost ~]$  sudo yum install nfs-utils

After NFS package has been installed, we will create a directory for storing the
image

[linuxtechi@localhost ~]$ sudo mkdir /backup

Now we will configure the created directory for NFS share, open the NFS
configuration file

Edit the file ‘/etc/exports’ and make the following entry,

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

[linuxtechi@localhost ~]$ sudo vi /etc/exports

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

Once done, save the file, exit & restart the NFS service to implement the
changes made,

[linuxtechi@localhost ~]$ sudo systemctl restart nfs

Next we will install & configure the REAR server.

REAR installation & configuration on CentOS 7 /


RHEL 7
We now need to install the packages for REAR & required packages for
creating ISO image of the backup server. To install all these packages, run the
following command

[linuxtechi@localhost ~]$ sudo yum install rear syslinux genisoimage

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

Next we will configure the REAR server to storing the created backup ISO
images on our remote NFS server. Open the REAR configuration file i.e.
‘/etc/rear/local.conf‘,

Add the below details for NFS server in the following format,

[linuxtechi@localhost ~]$ sudo vi /etc/rear/local.conf


OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=nfs://192.168.0.106/backup

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

Save file & exit. We are now ready to create our first backup image of the
system.

Creating Backup ISO


To create the disaster recovery of the system & generate the backup file,
execute the following command,

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

[linuxtechi@localhost ~]$ sudo rear -d -v mkbackup

REAR will now examine & gather the necessary files required  like disk layout,
boot loader information etc & then will create an ISO image for OS under the
directory ‘/var/lib/rear/output‘. After which all the files along with backup ISO
image will be transferred to the NFS share.

Note:- This process can take some time depending on the size of the operating
system.

Recovering the system


Now we need the recovery ISO (rear-localhost.iso) that was created & is
available on our NFS server,

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

We will burn the ISO on CD or DVD & will boot up the system using the same.
Once the system boots up with the image, we will be presented with a REAR
menu,

Select the first option i.e. ‘Recover localhost‘ (‘localhost’ is the hostname of the
system) & press enter. After this, we will now have our login menu, login using
root without password,

Note:- We could also choose second option “Automatic Recover localhost“, but
we need to make sure that there should not be any errors during recovery.
Some common errors occurring during automatic recovery are due to network
changes, disk layout changes etc. So if you are restoring the OS to same
system, you can try out ‘Automatic Recovery‘ to automate the recovery process
otherwise opt for Manual recovery.

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

Next step is to configure networking on our system as all other system related
files are on our NFS share. To add an IP address, execute the following
command

# ip addr add 192.168.0.50/24 dev enp0s3


# ip link set enp0s3 up

We can now access our NFS server, so we can now start the system recovery.
Start recovery by executing,

# rear -d -v recover

Now follow the on screen instructions,

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

It will now ask for HDD layout (if it differ from original), after selecting the layout
start recovery by pressing ‘5‘, system recovery will now start ,

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

Depending on system data, recovery will take some time. Once the recovery
has been completed, reboot the system.

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

Now remove the recovery DVD from the system & let the system start. Once
fully booted, you can access the system with the same credentials as before &
system will have all the data & services as there were previously on your
system.

This completes our tutorial on REAR, Relax & Recover . If you have any
queries or questions, please so leave them in the comment box below.

 Facebook  Twitter  LinkedIn  Reddit

Tags: Disaster recovery tool RHEL 7

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

Previous story Next story

 Ubuntu 17.10 (Artful Aardvark) Desktop Linux Lite 3.6 Desktop Installation Guide 
Installation Guide with Screenshots with Screenshots

5 RESPONSES

 Comments 5  Pingbacks 0

Adibb 
August 7, 2019 at 2:36 am

Hi,
1)I successful make “rear-localhost.iso”, do I need to make “backup.tar.gz”?
2)Can I make pendrive as bootable instead burn to CD/DVD? because I already try
use pendrive as bootable, it cannot load to “REAR” interface

Please advise.

Thanks
Reply

Adibb 
August 7, 2019 at 2:24 am

Hi,

I already get the rear-localhost-iso, but may I know for the other like “backup.tar.gz”

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7

that your show above do i need to create this or it already been create with ” sudo rear
-d -v mkbackup”
Reply

Zack 
October 29, 2018 at 8:08 pm

Hi, I am trying to recover a kvm guest but when type ” rear -d -v recover” , it does not
go forward and fails generating the following error
mount.nfs: portmap query failed: RPC: Remote system error – Network is unreachable
——
ERROR : Mount command ‘mount -v -t nfs -o nfsvers=3,nolock <nfs-server-ip:/
/tmp/rear.ZBovVKifdgtx1zE/outoutfs’ failed.
Please advise
Reply

Subhasish Saha 
June 3, 2019 at 3:18 pm

Hi Jack,

I believe your rear export location is not properly exported. First try to mount it
manually. If worked, then go for rear. From the error it seems you have port
connectivity issue.
Reply

Vinay Gupta 
June 7, 2019 at 1:17 pm

1. Check you have network connectivity with nfs server. : –>ping nfs_server
from recovery point.
2. Try to mount the exported filesystem -> mount -t nfs
nfs_server_ip:/exported_dir /local_mount
Reply

LEAVE A REPLY

Comment

Name * Email *

Website

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]
How to Install ReaR (Relax and Recover) on CentOS 7/RHEL 7


 × 
three
 = 
twenty one 

Post Comment

Linux Desktop Linux Commands Linux How To’s

How to Use TimeShift to Learn Pgrep and Pkill How to Install VirtualBox
Backup and Restore Command with Examples on Arch Linux
Ubuntu Linux in Linux
How to Enable Nested
How to dual boot 9 ‘diff’ Command Virtualization in VirtualBox
Windows 10 and Debian Examples in Linux on Linux
10
20 ps Command How to Use Variables in
Installation Guide of Examples to Monitor Ansible Playbook
Manjaro 18.1 (KDE Linux Processes
Edition) with Screenshots How to Install and
How to Use htop to Configure HAProxy on
Top 8 Things to do after Monitor Linux System CentOS 8 / RHEL 8
Installing Debian 10 Processes
(Buster) How to Install Yarn on
14 SCP Command Debian 10
Debian 10 (Buster) Examples to Securely
Installation Steps with Transfer Files in Linux
Screenshots


Linuxtechi: Linux Tutorials & Guides © 2020. All Rights
Reserved. 
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0
International License.
Content of this site cannot be republished either online or
offline without our permissions.

https://www.linuxtechi.com/install-rear-migration-recovery-tool-centos-7-rhel-7/[18.03.2020 13:32:14]

You might also like