How to backup/restore Red Hat Enterprise Linux 7.x / 8.x with Veritas System Recovery (VSR) for Linux edition or later on uEFI system.

How to backup/restore Red Hat Enterprise Linux 7.x / 8.x with Veritas System Recovery (VSR) for Linux edition or later on uEFI system.

Article: 100043262
Last Published: 2023-05-12
Ratings: 0 2
Product(s): System Recovery

Description

This article has been written for Red Hat Enterprise Linux (RHEL) 7.3 on uEFI system. However, the steps listed can also be used for other supported operating system (OS) versions like RHEL 7.x/8.x or CentOS 7.x.
In case of RHEL 8.x, you need to use Veritas System Recovery (VSR) 21 or later.

For the supported OS with each VSR version, please refer to Software Compatibility List (SCL).

<VSR 18 SCL>
https://www.veritas.com/content/support/en_US/doc/VSR_18_SCL

<VSR 21 SCL>
https://www.veritas.com/content/support/en_US/doc/VSR_21_SCL 
 

Environment

The environment is as follows in this scenario:

BIOS mode UEFI
OS / Kernel version Red Hat  Enterprise Linux, 3.10.0.-514.el7.x86_64
Veritas System Recovery for Linux version 18.0.1
Hostname rhel73x64uefi.local
Partition information Backup sources: /boot/efi, /boot, /,  /home
Backup destination:  /backup
For details See Figure 1


Figure 1

Image

Note:
/dev/sda3 is LVM physical volume (PV).
rhel is LVM volume group (VG).
rhel-root, rhel-swap, rhel-home are LVM logical volumes (LVs).

 

Backing up

1. Recommend to back up the information for your partitions in advance.

# sgdisk -b /backup/sgdisk_sda.txt /dev/sda
# sgdisk -b /backup/sgdisk_sda_backup.txt /dev/sda

Note 1: If sgdisk is not installed, run "yum install gdisk".
Note 2: Veritas recommends creating a backup file (sgdisk_sda_backup.txt).


2. Make a backup of LVM information in advance if including LVM on the system. 


# vgcfgbackup -f /backup/rhel.txt

Note: Recommend to set the filename as the VG Name that is returned by "vgdisplay" command.
 (See Figure 2)

Figure 2

Image

# blkid -o value -s UUID /dev/sda3 > /backup/uuid_sda3.txt

Note: If needed, back up the other LVM information.


3. Backup volumes with backup commands.

# symsr -b /boot -d /backup
# symsr -b /boot/efi -d /backup

# symsr -b / -d /backup
# symsr -b /home -d /backup


Note: If needed, back up the other partitions or mount points.

4. If you would like to verify your recovery points, run below commands.

# symsr -vrp /backup/boot_000.v2i
# symsr -vrp /backup/boot_efi_000.v2i

# symsr -vrp /backup/system_000.v2i
# symsr -vrp /backup/home_000.v2i

 

 

Creating System Recovery disk (SRD)

1. To create SRD, run "createSRD" command after mounting Red Hat install media that has the same version as the system.

For instance:
# createSRD -i <Red Hat install media> -d /backup/SRD.iso

Note: Install squashfs-tools if "mksquashfs is required to create this SRD" appears. (See Figure 3)

Figure 3
Image



 

Restoring

1. Boot from SRD.

2. Select "Rescue a Red Hat Enterprise Linux system". (See Figure 4)

Figure 4
Image

3. Select "3) Skip to shell". (See Figure 5)

Figure 5
Image

4. Mount a backup destination to /backup.

# mkdir /backup
# mount /dev/sdb1 /backup

Note: If you fail to mount Windows share in SRD, refer to article 100041721. CIFS helper program file can be added to SRD manually.


5. Restore the partitions of /dev/sda from a backup file. (See Figure 6)

# sgdisk -l /backup/sgdisk_sda.txt /dev/sda

Figure 6
Image

6. Confirm the partition is reverted using "gdisk -l /dev/sda". (See Figure 7)

Figure 7
Image

7. If LVM was used in the backed up system, set variable uuid using the below commands. (See Figure 8). If LVM was not used, skip Step 7-12 and proceed to Step 13.

# uuid=$(cat /backup/uuid_sda3.txt)
# echo $uuid

Note: Confirm "echo $uuid" returns "xxxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxxx". 

Figure 8
Image

8. Restore PV using the below command. (See Figure 9)

# pvcreate -ff --restorefile /backup/rhel.txt --uuid $uuid /dev/sda3

Figure 9
Image

 

Note1:

If above command fails and if you restore a volume or partition that LVM (Linux Volume Manager) or software RAID managed, before you start the recovery process you must use lvmtools or the RAID tools that are present on the recovery disk to set up LVM or software RAID.

Note2:

If running this comand on the existing volume, the command will fail. Prepare a blank volume. If testing the existing volume, the command does not need to be run.

 

9. Confirm the restored PV using the command "pvdisplay". (See Figure 10)

Figure 10
Image

10. Restore LV using the below command. (See Figure 11)

# vgcfgrestore -f /backup/rhel.txt rhel

Figure 11
Image

11. Confirm the restored LV using the command "lvdisplay". (See Figure 12)

Figure 12
Image

12. Activate VG using the below command. (See Figure 13)

# vgchange -a y rhel

Figure 13
Image

13. Restore all recovery points. (See Figure 14)

# symsr -r /backup/boot_efi_000.v2i -d /dev/sda1
# symsr -r /backup/boot_000.v2i -d /dev/sda2

# symsr -r /backup/system_000.v2i -d /dev/mapper/rhel-root
symsr -r /backup/home_000.v2i -d /dev/mapper/rhel-home

Figure 14

Image

14. Set swap partition using the below commands. (See Figure 15)

# mkswap /dev/mapper/rhel-swap
# swapon -v /dev/mapper/rhel-swap
# swapon -s

Figure 15
Image

15. Reboot and remove SRD media.

# reboot

Note: If the screen stays black while booting from the restored system, refer to article 100041257.

Note: If swap partition is not enabled after rebooting, refer to article 100042614.

Note: If it takes a long time when booting from the recovered system after recovering, refer to article 100051317

Was this content helpful?