How to backup/restore Red Hat Enterprise Linux 7.x / 8.x with Veritas System Recovery (VSR) for Linux edition on BIOS system.
This article has been written for Red Hat Enterprise Linux (RHEL) 7.3 on BIOS machine. However, the steps listed can also be used for other supported operating system (OS) versions like 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>
<VSR 21 SCL>
The environment is as follows in this scenario:
|BIOS mode||Legacy (BIOS system)|
|OS / Kernel version||Red Hat Enterprise Linux, 3.10.0.-514.el7.x86_64|
|Veritas System Recovery for Linux version||126.96.36.199417|
|Partition information||Backup sources: /, /boot
Backup destination: /backup
|For details||See Figure 1|
/dev/sda2 is LVM physical volume (PV).
rhel_rhel73x64 is LVM volume group (VG).
rhel_rhel73x64-root and rhel_rhel73x64-swap are LVM logical volumes (LVs).
1. Recommend to back up the information for your partitions in advance.
# sfdisk -d /dev/sda > /backup/sfdisk_sda.txt
# sfdisk -d /dev/sda > /backup/sfdisk_sda_backup.txt
Note: Veritas recommends creating a backup file (sfdisk_sda_backup.txt).
2. Make a backup of LVM information in advance if including LVM on the system.
# vgcfgbackup -f /backup/rhel_rhel73x64.txt
Note: Recommend to set the filename as the VG Name that is returned by "vgdisplay" command. (See Figure 2)
# blkid -o value -s UUID /dev/sda2 > /backup/uuid_sda2.txt
Note: If needed, back up the other LVM information.
3. Backup volumes with backup commands.
# symsr -b /boot -d /backup
# symsr -b / -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/system_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.
# 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)
1. Boot from SRD.
2. Select "Rescue a Red Hat Enterprise Linux system". (See Figure 4)
3. Select "3) Skip to shell". (See Figure 5)
4. Mount a backup destination to /backup.
# mkdir /backup
# mount /dev/sdb1 /backup
Note 1: If you fail to mount Windows share in SRD, refer to article 100041721. CIFS helper program file can be added to SRD manually.
Note 2: If you need to access a network location (in order to get access to the backup destination), configure the network card/ip address using the IFCONFIG command (refer to Red Hat documentation for more details).
5. Restore the patitions of /dev/sda from a backup file. (See Figure 6)
# sfdisk -f /dev/sda < /backup/sfdisk_sda.txt
CAUTION: "<" is a less-than sign. If ">" is used by mistake, /backup/sfdisk_sda.txt is overwritten. Then, run the same command again after copying /backup/sfdisk_sda_backup.txt to /backup/sfdisk_sda.txt.
6. Confirm the partition is reverted using "fdisk -l /dev/sda". (See Figure 7)
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_sda2.txt)
# echo $uuid
Note: Confirm "echo $uuid" returns "xxxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxxx".
8. Restore PV using the below command. (See Figure 9)
# pvcreate -ff --restorefile /backup/rhel_rhel73x64.txt --uuid $uuid /dev/sda2
9. Confirm the restored PV using the command "pvdisplay". (See Figure 10)
10. Restore LV using the below command. (See Figure 11)
# vgcfgrestore -f /backup/rhel_rhel73x64.txt rhel_rhel73x64
11. Confirm the restored LV using the command "lvdisplay". (See Figure 12)
12. Activate VG using the below command. (See Figure 13)
# vgchange -a y rhel_rhel73x64
13. Restore all recovery points. (See Figure 14)
# symsr -r /backup/boot_000.v2i -d /dev/sda1
# symsr -r /backup/system_000.v2i -d /dev/mapper/rhel_rhel73x64-root
14. Set swap partition using the below commands. (See Figure 15)
# mkswap /dev/mapper/rhel-rhel73x64-swap
# swapon -v /dev/mapper/rhel-rhel73x64-swap
# swapon -s
15. Reboot and remove SRD media.
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.
Related Knowledge Base Articles
Was this content helpful?
Rating submitted. Please provide additional feedback (optional):