Relax and Recover in VitalPBX: A detailed 5 step guide on how to configure

VitalPBX Relax and Recover Install
Share on facebook
Share on twitter
Share on whatsapp
Share on telegram
Share on linkedin
Share on email
Relax-and-Recover is a setup-and-forget Linux bare metal disaster recovery solution. It is easy to set up and requires no maintenance, so there is no excuse for not using it. That is why we have decided to explain how to use it in VitalPBX.

Read our tutorials and guides on how to implement new tools and technologies for your business with VitalPBX here.

One of the great advantages of Relax-and-Recover is that you do not need to turn off the server to perform a full backup of it. It is also possible to exclude certain directories that do not wish to back up.

Here we will explain how to back up to a USB Drive and also create an ISO on an NTS server.

Well, let’s start with the first step that is the installation of Relax-and-Recover on our VitalPBX server.

1.- Install

1.1.- Connect to VitalPBX Server console (You can use Putty or another SSH Client)

1.2.- Install REAR and its dependencies

[root@vitalpbx ~] yum install rear syslinux-extlinux

1.3.- Setup the USB Media
[root@vitalpbx ~] ls /dev/sd (then hit the TAB key twice)

You should see something like this:
sda         sda1       sda2       sda3

1.4.-Next, insert your USB flash drive into the VitalPBX Server and type:
[root@vitalpbx ~] ls /dev/sd (then hit the TAB key).

You should see a new disk
sdb and sdb1

1.5.-Now format the USB Drive. Write Yes and press Enter.  (wait about 3 minutes)
[root@vitalpbx ~] /usr/sbin/rear format /dev/sdb
Write: Yes

The device has been labeled REAR-000 by the format workflow.

1.6.- Now edit the /usr/share/rear/local.conf configuration file with below configuration.
[root@vitalpbx ~] vi /etc/rear/local.conf

### write the rescue initramfs to USB and update the USB bootloader
#### create a backup using the internal NETFS method, using ‘tar’
#### write both rescue image and backup to the device labeled REAR-000
#### for exclude recording directory
BACKUP_PROG_EXCLUDE=(“${BACKUP_PROG_EXCLUDE[@]}” ‘var/spool/asterisk/monitor’)

2.- Backup

2.1.- Now proceed to make a full backup.
[root@vitalpbx ~] /usr/sbin/rear -v mkbackup

Now we have the backup on the USB disk. You can have more than one backup on the same USB disk. The amount of backup on the USB disk depends on its capacity.

2.2.- After the backup finished, if you want to test your backup, reboot your system and try to boot from the USB device.

3.- Restore

3.1- Boot your server from the USB disk.

3.2.- Select vitalpbx

3.3.- Select the date that you want to restore and we recommend select “AUTOMATIC RECOVER” option.

3.4.- Wait for the message that you confirm the restore and Type: yes

3.5.- When the restore is finished Type 3 for reboot and do not forget to remove the USB drive.

4.- Backup in NFS Server

4.1.- To make a backup to an NFS Server you need to configure the local.conf file with the following information
[root@vitalpbx ~] vi /etc/rear/local.conf

### write the rescue initramfs to USB and update the USB bootloader
#### create a backup using the internal NETFS method, using ‘tar’
#### write both rescue image and backup to the device labeled REAR-000
#### for exclude recording directory
BACKUP_PROG_EXCLUDE=(“${BACKUP_PROG_EXCLUDE[@]}” ‘var/spool/asterisk/monitor’)

4.2.- Now proceed to make a full backup in the NFS Server.
[root@vitalpbx ~] /usr/sbin/rear -v mkbackup

4.3.- To make a restore medium you need to burn the ISO file in a DVD and restore from it.

5.- Restoring in a different Hardware

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 layouts or storage devices i.e. IDE to SCSI or CCISS.

5.1. Follow steps 3.2 and 3.3.

5.2.- Confirm the change of Ethernet Interface.

5.-3.- Confirm the change of disk mapping table. Use the default “1”.

The main advantage of making the backup in a USB drive is that you can make more than one backup in the same USB drive. Also, you do not need to burn a DVD or a USB drive to use it.

Learn more about VitalPBX, our services and how we can help you achieve your goals in our official website.

Our Latest Post

VitalPBX Asterisk WebRTC with PJSip
Rodrigo Cuadra

Asterisk WebRTC con PJSip desde Cero

1.- Introducción WebRTC (Web Real-Time Communication) es un proyecto gratuito de código abierto que proporciona navegadores web y aplicaciones móviles con comunicaciones en tiempo real

Read More »

No comment yet, add your voice below!

Add a Comment

VitalPBX Logo

66 West Flagler Street
Suite 900 – #1957
Miami, FL 33130, USA

Phone: +1(305) 560-5776


Subscribe to our newsletter to receive updates and the latest news from VitalPBX

Copyright @ 2020 VitalPBX,  All rights reserved.