#3218 Issue open: HOW TO CLONE A new physical server RHEL9 using REAR utility (using the rear-hostname.iso file)

Labels: support / question

padua12345 opened issue at 2024-05-08 10:39:

  • ReaR version ("/usr/sbin/rear -V"):

Relax-and-Recover 2.6 / 2020-06-17

  • If your ReaR version is not the current version, explain why you can't upgrade:

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):

Red Hat Enterprise Linux 9.3 (Plow)

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

local.conf.txt

# Create ReaR rescue media as ISO image
OUTPUT=ISO
# Create backups to a network share
BACKUP=NETFS
#NETFS_URL=nfs://serverip/ifs/ftw2/nfs/groups/potsoil-lnx
NETFS_URL=nfs://serverip/ifs/mar/nfs/groups/nsi4_em6_2900/server_data/
NETFS_PREFIX=$(hostname -s)
NETFS_SKIP_WARNING=true
### Place all local filesystems to exclude from backups
### Filesystems will still be created at restoration
EXCLUDE_BACKUP=(
   "fs:/local"
   "fs:/tmp"
   "fs:/local/data"
   "fs:/scratch"
   )
### Place all SAN/external mountpoints in this array
### Filesystems will not be created/modified at restoration
### Format is "fs:/mountpoint" i.e.:
### EXCLUDE_RECREATE=(
###    "fs:/u01"
###    "fs:/u02"
###    )
LUKS_CRYPTSETUP_OPTIONS+=" --force-password"
  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):

HPE Proliant DL380 Gen10

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):

x86_64

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):

BIOS

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):

SSD

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):

  • Description of the issue (ideally so that others can reproduce it):

I need to make a bootable ISO from my current local RHEL9 server with all its configs and installed apps, so I can use the ISO file and install RHEL9 on some other physical servers.

  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

Please let me know if you need other information. Thanks.

jsmeix commented at 2024-05-08 12:59:

@padua12345
in your etc/rear/local.conf
you use NETFS_URL and NETFS_SKIP_WARNING
but none of them is listed in
usr/share/rear/conf/default.conf
so neither NETFS_URL nor NETFS_SKIP_WARNING
are ReaR user configuration variables.

NETFS_SKIP_WARNING does not appear anywhere in ReaR scripts
so setting NETFS_SKIP_WARNING is useless as far as I can see.

NETFS_URL appears in ReaR scripts in
usr/share/rear/prep/default/020_translate_url.sh:

if [[ "$NETFS_URL" ]] ; then
    Log "Using NETFS_URL is deprecated. Use BACKUP_URL instead."
    BACKUP_URL=$NETFS_URL
fi

so setting NETFS_URL should work but I would recommend
to use the current syntax.

For example on my test KVM/QEMU VM I use very often

OUTPUT=ISO
BACKUP=NETFS
BACKUP_OPTIONS="nfsvers=3,nolock"
BACKUP_URL=nfs://192.168.178.66/nfs
SSH_ROOT_PASSWORD='rear'
USE_DHCLIENT="yes"

to recreate the system on another same KVM/QEMU VM, cf.
https://github.com/rear/rear/wiki/Test-Matrix-ReaR-2.7#sles
where examples that are specific for SLES are shown,
in particular with specific ReaR configuration settings
for the special SLES default btrfs structure.

When you are new to ReaR
and need some initial info how to use ReaR
you may have a look at
http://relax-and-recover.org/documentation/
therein in particular
http://relax-and-recover.org/documentation/getting-started
(which is for OUTPUT=USB i.e. using a USB disk for ReaR)
and the section
"First steps with Relax-and-Recover" at
https://en.opensuse.org/SDB:Disaster_Recovery
as some starting points.

When something fails for you,
see the subsequent section
"Debugging issues with Relax-and-Recover" at
https://en.opensuse.org/SDB:Disaster_Recovery

I am not a Red Hat user (I use SUSE SLES)
so I cannot help with issues that are specific for RHEL.


[Export of Github issue for rear/rear.]