#697 Issue closed: Missing backup in recovery iso for IBM PowerVM LPAR

Labels: support / question, fixed / solved / done

TobiasKarnat opened issue at 2015-11-13 18:10:

Environment: LPAR on IBM Power7 with PowerVM
OS: SUSE Linux Enterprise Server 11 SP3
Rear 1.17.2

local.conf

BACKUP=NETFS
BACKUP_URL=iso://backup
OUTPUT_URL=null
ISO_DIR=/mnt/TSM/rear
ISO_MAX_SIZE=4500
BACKUP_PROG_EXCLUDE=( '/install/*' '/tmp/*' '/dev/shm/*' $VAR_DIR/output/\* )
AUTOEXCLUDE_MULTIPATH=n
AUTOEXCLUDE_AUTOFS=y
AUTOEXCLUDE_PATH=( /media /tsm1 )
BOOT_OVER_SAN=y
TMPDIR="/mnt/TSM/rear"
export TMPDIR

'rear -v mkbackup' runs successfully and creates the bootable iso and the backup.tar.gz file.

But the backup.tar.gz file is not included in the final iso image.
I had to modify the following script to include it, but haven't tried a restore yet.

diff -urN a/usr/share/rear/output/ISO/Linux-ppc64/80_create_isofs.sh b/usr/share/rear/output/ISO/Linux-ppc64/80_create_isofs.sh
--- a/usr/share/rear/output/ISO/Linux-ppc64/80_create_isofs.sh   2015-11-13 16:28:29.000000000 +0100
+++ b/usr/share/rear/output/ISO/Linux-ppc64/80_create_isofs.sh   2015-11-13 17:38:20.000000000 +0100
@@ -26,9 +26,9 @@
cp -pL $v $KERNEL_FILE $TMP_DIR/kernel >&2

if [[ "$SUSE_STYLE" ]]; then
-  ISO_FILES=( ${ISO_FILES[@]} $TMP_DIR/kernel initrd.cgz yaboot)
+  ISO_FILES=( ${ISO_FILES[@]} $TMP_DIR/kernel initrd.cgz yaboot $TMP_DIR/isofs)
else
-  ISO_FILES=( ${ISO_FILES[@]} $TMP_DIR/kernel initrd.cgz)
+  ISO_FILES=( ${ISO_FILES[@]} $TMP_DIR/kernel initrd.cgz $TMP_DIR/isofs)
fi
Log "Starting '$ISO_MKISOFS_BIN'"
LogPrint "Making ISO image"

TobiasKarnat commented at 2015-11-17 06:27:

The 81_prepare_multiple_iso.sh script is missing for Linux-ppc64 so ISO_MAX_SIZE should not be used?

gdha commented at 2015-11-17 13:48:

@TobiasKarnat If you add $TMP_DIR/isofs to the array ISO_FILES then you will always add the backups to the ISO image even when you do not want to do this. Please have a look at the Linux-i386 sub-directory. You have to do similar steps (except for the efi stuff).

gdha commented at 2015-12-10 07:00:

@TobiasKarnat Is your question answered? Do you still need further assistance?

TobiasKarnat commented at 2015-12-12 07:13:

Sorry about the late response. We do actually always want to add the backup to the ISO image.
As the system is now productive, I only have limited access and can not test any more.

I opened this issue to inform the developer that there is a bug and for others which might need the same workaround.

Thank you.

gdha commented at 2015-12-12 10:01:

I don't see it as a bug, it is a missing feature nobody added (yet). You could add it yourself like I explained before, or sponsor the code (BACKUP_URL=iso://backup) to include the backup into the ISO image for the PPC track. However, if you are happy with your hack then that is fine for me, but we will not add it to rear master branch as the code as it is now is doing exactly what it is written for (write an ISO rescue image without including the backup).

gozora commented at 2015-12-12 10:52:

Some time ago, I was thinking of kind of "feature" for ebiso, that would just take finished tar archive and simply add it to bootable iso. But after a while I put it "on hold" as it didn't look to have much of a value for me...
Do you guys think such a feature can be useful in the future?

gdha commented at 2016-02-05 15:42:

Re-open this issue when we found a sponsor to implement this missing feature

gdha commented at 2017-04-21 16:28:

@schabrolles Quick question: are you dealing with this item in your tests as well?

schabrolles commented at 2017-04-21 16:57:

@gdha No ... As you said, ISO image is just a bootable image that allow you to start a recovery, recreate the disk FS structure and start the restoration which is stored from on a separate DISK, Network Serveur (NFS/FTP/SSHFS etc..) or backup server like TSM etc ...

If this function is available for x86, I should have a look ...

jsmeix commented at 2017-06-09 10:55:

@gdha regarding your above
https://github.com/rear/rear/issues/697#issuecomment-157374405

If you add $TMP_DIR/isofs to the array ISO_FILES
then you will always add the backups to the ISO image
even when you do not want to do this.

I think only with things like BACKUP_URL=iso://backup
the backup becomes stored in $TMP_DIR/isofs/backup
and as far as I see in
output/ISO/Linux-i386/820_create_iso_image.sh
the whole $TMP_DIR/isofs content gets included in the ISO
so that I think it is the right solution to always have
whole $TMP_DIR/isofs content in the ISO, cf.
https://github.com/rear/rear/issues/1375#issuecomment-307358395

But I could be wrong - this is only how the code looks to me
on first glance.

schabrolles commented at 2017-06-12 07:06:

@jsmeix
It is a bit more complicated as everything seems to be based on isolinux (from syslinux package) which only exists on x86 arch.

I made a simple "prototype" which seems to work.
I add $TMP_DIR/isofs in the ISO_FILES var (only when $TMP_DIR/isofs exists)? But there will be a problem for Large image (splitting iso in multiple files).

jsmeix commented at 2017-06-19 10:54:

@schabrolles
I think it is sufficient to only document it when it does not work
with huge ISOs that would need to be splitted into multiple files.

Reason:

ReaR's internal backup methods are not meant
as professional backup solutions and in general
ReaR is neither meant as a backup solution
nor as a backup management tool,
cf. "Relax-and-Recover versus backup and restore" at
https://en.opensuse.org/SDB:Disaster_Recovery

Accordingly there are some limitations what
ReaR's internal backup methods can do.

ReaR is meant to recover the basic (operating) system
(but not to backup/restore tons of user and application data)
and for that purpose the backup of only the files
of the basic system should be only some GiB
that usually can be stored within a single ISO file.
If not, the user must use a professional backup solution.

jsmeix commented at 2017-06-20 12:16:

With https://github.com/rear/rear/pull/1383 merged
this issuse should be fixed.

@schabrolles
as always many thanks for all your various contributions
and testing that improve ReaR in particular on POWER!


[Export of Github issue for rear/rear.]