SuSE 15 SP3 BMR Restore and Disaster Recovery

by Ramses Soto-Navarro, 8/16/2021

Rescue Boot
Rescue Network
Backup Rsync
Backup Squashfs
Recovery Format


Brief bulletpoints on BMR backup restore and disaster recovery for SuSE 15 SP3. The procedure is the same for the previous release SuSE 12 SP5. Audience is experienced Linux systems administrators.

Rescue Boot

Very brief steps for cold backup:

Boot to DVD, select More, Rescue.

vgchange -ay
mkdir /mnt/root
mount /dev/vg1/lvroot /mnt/root
mount /dev/sda1 /mnt/root/boot

Rescue Network

dhcpd eth0

[Alternative] configure IP Address manually:

ip addr add dev eth0
ip link set eth0 up
ip route add dev eth0
ip route add default via
echo -ne "nameserver" > /etc/resolv.conf

Backup Rsync

Brief steps for cold remote backup:

time rsync -auv . -e ssh user1@remotepc:/backup/suse153/

Backup Squashfs

Squashfs the entire system on remotepc then mount:

cd /backup/suse153/
mksquashfs . /backup/suse153.sqfs
mount /backup/suse153.sqfs /backup/rescue/

Recovery Format

Brief BMR format, restore, recovery.

* Create VM
* Boot to DVD in Rescue Mode.
* Format boot partition; fdisk /dev/sda
* Format logical volumes lvswap and lvroot; pvcreate, vgcreate, lvcreate
* mkswap -f /dev/vg1/lvswap; mkfs.ext4 /dev/vg1/lvroot; mkfs.ext4 /dev/sda1
* Mount boot and root; mount /dev/vg1/lvroot /mnt/root; mount /dev/sda1 /mnt/root/boot/
* Rsync restore: cd /mnt/root; rsync -au -e ssh remotepc:/backup/rescue/ .
* [Alternative] Make the pseudo directories:

cd /mnt/root
mkdir dev mnt proc run selinux srv sys tmp
chmod 1777 tmp

* Mount chroot:

cd /mnt/root
for a in dev sys proc; do mount -o bind /$a $a ; done
chroot . /bin/bash

* Mount new /boot UUID (edit the new UUID for boot):

ls -l /dev/disk/by-uuid | grep sda1 >> etc/fstab
vi etc/fstab

* Remove network persistent rules:

rm -f /etc/udev/rules.d/70-persistent-net.rules

* Verify GRUB device:

vi /boot/grub2/

* Modify and initialize grub then rebuild ramdisk:

vi etc/defaults/grub
 GRUB_CMDLINE_LINUX"biosdevname=0 net.ifnames=0"

* Initialize GRUB and the ramdisk:

grub2-install /dev/sda
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
dracut -o "dbus" -f

* Unmount, checkdisk and reboot:

umount -a
fsck /dev/vg1/lvroot

The End.