#2440 Issue closed
: How to restore from a specific rear backup backup.tar.gz in rescue mode¶
Labels: support / question
, fixed / solved / done
makamp1 opened issue at 2020-06-26 00:40:¶
Relax-and-Recover (ReaR) Issue Template¶
Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):
-
ReaR version ("/usr/sbin/rear -V"):
rear -V
Relax-and-Recover 2.4 / Git -
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
- ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat
/etc/rear/local.conf"):
cat /etc/rear/local.conf
OUTPUT=ISO
BACKUP=NETFS
BACKUP_OPTIONS="nfsvers=3,nolock"
BACKUP_URL=nfs://10.254.132.1/export/rear/
REQUIRED_PROGS=( "${REQUIRED_PROGS[@]}" biosdevname )
NETFS_KEEP_OLD_BACKUP_COPY=yes
SSH_ROOT_PASSWORD="HP1nv3nt"
BACKUP_PROG_EXCLUDE=("$BACKUP_PROG_EXCLUDE[@]}" '/.snapshots/*' '/var/crash' )
BACKUP_PROG_INCLUDE=( ` findmnt -n -r -o TARGET -t btrfs | grep -v '^/$' | egrep -v 'snapshots|crash' `)
EXCLUDE_VG=(`vgs | awk 'NR>1 {print $1}'`)
#ISO Parameters
OUTPUT=ISO
# ISO_MKISOFS_BIN=/usr/bin/ebiso
ISO_PREFIX="rear-`date +%Y%m%d`-$HOSTNAME"
#Boot from SAN Configurations
AUTOEXCLUDE_MULTIPATH=n
BOOT_OVER_SAN=1
USING_UEFI_BOOTLOADER=1
UEFI_BOOTLOADER=( 'shim*.efi' 'grub.efi' )
-
Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
BM -
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
X86 -
Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
BIOS, GRUB -
Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
SAN -
Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT" or "lsblk" as makeshift):
-
Description of the issue (ideally so that others can reproduce it):
I have a system which is used for different OS flavours .. i.e. SLES
12SP3, 12SP4, RHEL 7.5, 7.6 etc
when I perform the rear back, it moves the previous backup in to .old
folder on NFS mount.
when I am doing a restore, how do I pick a specific backup.tar.gz ?
by default it seems to pick the latest backup.tar.gz
-
Workaround, if any:
-
Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
jsmeix commented at 2020-06-26 07:05:¶
Simply put: You cannot (from within the ReaR recovery system).
With
BACKUP=NETFS
BACKUP_URL=nfs://10.254.132.1/export/rear/
you get the backup of your files made with tar and stored on your NFS
server
there in a $HOSNTAME directory as backup.tar.gz file.
During "rear recover" that exact backup.tar.gz file
from the $HOSNTAME directory on your NFS server gets restored.
This means whatever backup.tar.gz file you have
in that $HOSNTAME directory on your NFS server will get restored.
So what you can do to restore another backup is to place
another backup.tar.gz file in the $HOSNTAME directory on your NFS
server
before you run "rear recover".
See the section
"Relax-and-Recover versus backup and restore" in
https://en.opensuse.org/SDB:Disaster_Recovery
In general for more information you may read completely through
https://en.opensuse.org/SDB:Disaster_Recovery
jsmeix commented at 2020-06-26 07:33:¶
Some background information
regarding how to restore different operating systems
on same hardware (could be also same virtual hardware).
Precondition:
At a point in time there is only one operating system installed on the
hardware.
I.e. the different operating systems are installed mutually exclusive.
Example use case:
One has several production servers with same hardware
where different operating systems should be used for different
servers.
One has one piece of that server hardware in the testing lab.
On the testing hardware the different operating systems get installed
mutually exclusive.
To recreate the one testing hardware with different operating systems
by using "rear mkbackup" and "rear recover" it is crucial to know
where "rear mkbackup" stores what information of the system.
"rear mkbackup" results the same as "rear mkrescue" and then "rear mkbackuponly".
"rear mkrescue" creates the ReaR recovery system.
"rear mkbackuponly" makes only a backup of the files of the system.
The ReaR recovery system is specific for the system where "rear
mkrescue" was run.
The ReaR recovery system contains in particular
var/lib/rear/layout/disklayout.conf
where the disk layout (partitioning, filesystems, mountpoints, and so
on) is stored
and it contains etc/rear/local.conf where in particular backup related
config variables
like BACKUP_URL
are stored.
The backup contains only the plain files (and directories) of the system.
What ReaR recovery system is booted determines what disk layout
(partitioning, filesystems, mountpoints, and so on) will be recreated
and wherefrom the backup will be restored (via BACKUP_URL
and
other backup related config variables) when "rear recover" is run.
To recreate the one testing hardware with different operating systems
one needs different ReaR recovery systems plus different matching
backups.
[Export of Github issue for rear/rear.]