Missing backup in recovery iso for IBM PowerVM LPAR #697

Closed
TobiasKarnat opened this Issue Nov 13, 2015 · 13 comments

Comments

Projects
None yet
5 participants
@TobiasKarnat

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

This comment has been minimized.

Show comment
Hide comment
@TobiasKarnat

TobiasKarnat Nov 17, 2015

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

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

@gdha gdha self-assigned this Nov 17, 2015

@gdha

This comment has been minimized.

Show comment
Hide comment
@gdha

gdha Nov 17, 2015

Member

@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).

Member

gdha commented Nov 17, 2015

@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

This comment has been minimized.

Show comment
Hide comment
@gdha

gdha Dec 10, 2015

Member

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

Member

gdha commented Dec 10, 2015

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

@TobiasKarnat

This comment has been minimized.

Show comment
Hide comment
@TobiasKarnat

TobiasKarnat Dec 12, 2015

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.

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

This comment has been minimized.

Show comment
Hide comment
@gdha

gdha Dec 12, 2015

Member

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).

Member

gdha commented Dec 12, 2015

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

This comment has been minimized.

Show comment
Hide comment
@gozora

gozora Dec 12, 2015

Member

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?

Member

gozora commented Dec 12, 2015

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

This comment has been minimized.

Show comment
Hide comment
@gdha

gdha Feb 5, 2016

Member

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

Member

gdha commented Feb 5, 2016

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

@gdha gdha closed this Feb 5, 2016

@gdha

This comment has been minimized.

Show comment
Hide comment
@gdha

gdha Apr 21, 2017

Member

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

Member

gdha commented Apr 21, 2017

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

@schabrolles

This comment has been minimized.

Show comment
Hide comment
@schabrolles

schabrolles Apr 21, 2017

Member

@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 ...

Member

schabrolles commented Apr 21, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@jsmeix

jsmeix Jun 9, 2017

Contributor

@gdha regarding your above
#697 (comment)

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.
#1375 (comment)

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

Contributor

jsmeix commented Jun 9, 2017

@gdha regarding your above
#697 (comment)

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.
#1375 (comment)

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

@schabrolles

This comment has been minimized.

Show comment
Hide comment
@schabrolles

schabrolles Jun 12, 2017

Member

@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).

Member

schabrolles commented Jun 12, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@jsmeix

jsmeix Jun 19, 2017

Contributor

@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.

Contributor

jsmeix commented Jun 19, 2017

@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 added a commit that referenced this issue Jun 20, 2017

Merge pull request #1383 from schabrolles/ppc64_backup_multi_iso
Enhanced and cleaned up making ISO on POWER (ppc64/ppc64le).
Now the backup can be stored in the ISO (via BACKUP_URL=iso...)
and even multiple ISOs work on POWER now,
see #697
and #1383

@jsmeix jsmeix added this to the ReaR v2.2 milestone Jun 20, 2017

@jsmeix

This comment has been minimized.

Show comment
Hide comment
@jsmeix

jsmeix Jun 20, 2017

Contributor

With #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!

Contributor

jsmeix commented Jun 20, 2017

With #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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment