#976 Issue closed: Recover not working when rpm2cpio was used to unpack

Labels: support / question, not ReaR / invalid

Ziazis opened issue at 2016-08-24 09:30:

Can't recover when using rpm2cpio to extract files to the right position

Please fill in the following items before submitting a new issue:

  • rear version (/usr/sbin/rear -V): 1.18 / Git

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

  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
    OUTPUT=PXE
    OUTPUT_URL=nfs://server/path/BACKUP
    BACKUP=NETFS
    BACKUP_URL=nfs://server/path/BACKUP

    findmnt -l -t btrfs | cut -d ' ' -f 1 | egrep -v 'snapshots|crash|srv' | sed -e "s/$//*'/" -e "s/^/'/" | tr '\n' ' '

    BACKUP_PROG_INCLUDE=( '/boot/grub2/x86_64-efi/' '/var/tmp/' '/var/log/' '/var/spool/' '/var/lib/pgsql/' '/var/opt/' '/var/lib/named/' '/usr/local/' '/var/lib/mailman/' '/tmp/' '/opt/' '/home/' '/boot/grub2/i386-pc/*' )
    OUTPUT_PREFIX_PXE="BACKUP/$HOSTNAME"
    AUTOEXCLUDE_PATH=( /media /srv )
    AUTOEXCLUDE_MULTIPATH=n

  • Brief description of the issue
    While using rear, when installed via rpm everything works fine. mkbackup, recover everything is fine.
    But while trying to just unpack the files to be able to distribute them to other machines I kinda stumbled across the issue that my rear recover of those machines is not working. Unfortunatly the only issue I found is that I get the same error message as #870 with the rpc.statd can't start.

I just can't find the reason why it happens though. Is there something rpm is doing differently then just unpacking the script/config files to the right positions?

I have used ' rpm2cpio rear-1.18-3.x86_64.rpm | cpio -idmv' to unpack the files and then sync them to the other machines. Backuping works fine without issues, so does the PXEboot but when starting the recover I get the rpc.statd error. Seems to me that something is not being copied into the live image, but what could be the reason to it?

Well my work around would be that I install the rpm on every machine and copy the configurations after that - but I would still like to know how rpm2cpio differs in that small regard to rpm -i

jsmeix commented at 2016-08-24 09:54:

This is no issue in rear.

I cannot really help here but I guess that the rpc.statd issue
is not caused by how you put all the rear files on the
other machine - you did put all the rear files on the other
machine not only the *.sh scripts didn't you?

I guess the rpc.statd issue on the other machine is caused
by whatever reason that is specific for the other machine
or its networking environment.

Ziazis commented at 2016-08-24 10:06:

Yes, I did unpack all files that you get from rpm2cpio - even the empty directory paths into the other machines - just hoped maybe you guys know some more since you build the rpms. Guess I would need to look into rpm itself and what exactly it is doing differently.

Like I said - it's partly even working. I can use manuels for rear, can use mkbackup. The only issue occurs when booting up the PXE rescue image and trying to recover from there.

Funny enough - when the rpm was not installed via the rpm command but only copied, you can still install it and call 'rear mkrescue' and the backup will work. It's probably some internal rpm2cpio difference to rpm -i. Well I'll see if I can find some more information on that regard.

Thank you for your reply.

jsmeix commented at 2016-08-24 10:41:

You mean when you installed the plain files via cpio
there is the rpc.statd issue but when you then install
the rear RPM package with 'rpm' on the same machine,
then there is no longer the rpc.statd issue?

First idea what is different are the RPM scriptlets
but in my rear RPM package I don't see a scriptlet
that could make a real difference

# rpm -q --scripts rear       
preinstall scriptlet (using /bin/sh):
if [ $1 -gt 1 ] ; then
# during upgrade remove obsolete directories
/usr/bin/rm -rf /usr/share/rear/output/NETFS
fi

because when you do not yet have rear files on a machine
theer would be no obsolete /usr/share/rear/output/NETFS
directory so that the preinstall scriptlet does nothing.

Ziazis commented at 2016-08-24 11:00:

Yes exactly this! That's why I'm so confused myself. I've looked at the preinstall scriplets already and that's why I was asking here since I couldn't find anything that was being done pre or past installation that would make a difference in plain files over installing the rpm package.
But it obviously does something different since with the installed rpm it's working and the plain files the recover failes with the rpc.statd error.

Like I said it's the same issue #870 had. The sm-notify is not in the liveimage. I tried specifying all progs required, but I probably miss some since when I specify them in the local.conf it ONLY installs those specified and not those specified + the defaults needed.

Edit: Maybe there are some variables that get set when you install it via rpm? I don't know how the package itself is configured so that makes it hard to reconstruct what is actually going wrong with the plain files vs 'rpm -i' method.

Logfile extract of cpio:
http://pastebin.com/UyrzBAFE

Logfile for rpm install:
http://pastebin.com/c4MzDTVi

1135 rows of unpacking folders/files on both. So I should have everything needed on cpio aswell.
Can't see any specific difference besides the indexing?

jsmeix commented at 2016-08-24 13:42:

I have neither an idea what caused a difference
nor do I have an idea what the difference is
but I am curious to learn what it is in the end.


[Export of Github issue for rear/rear.]