#1698 PR merged: `cd’ command replaced by pushd/popd.

Labels: bug, fixed / solved / done

gozora opened issue at 2018-01-20 13:07:

Fix for issue https://github.com/rear/rear/issues/1678

jsmeix commented at 2018-01-23 10:22:

@gozora
a "by the way" side note that is not related to this issue here:
When looking at the code in
restore/BORG/default/400_restore_backup.sh
I noticed that it errors out when the Borg backup restore
finished with a non-zero exit code.
I think this might be too hard here.

Reasoning:

I think during "rear mkrescue/mkbackup" it is good
to be strict and error out in case of failures because
when "rear mkrescue/mkbackup" errors out the user
can fix the reason in his original system until
"rear mkrescue/mkbackup" runs cleanly.

In contrast during "rear recover" I think it could be often better
to continue even if something finished with a non-zero exit code
because when "rear recover" errors out it is basically a dead end
for the user.

For example when "rear recover" errors out when Borg backup restore
finished with a non-zero exit code there might be nothing what the
user could do to fix the reason in the recovery system (except
changing the code in restore/BORG/default/400_restore_backup.sh
to no longer error out). Perhaps there was only a minor issue why
Borg backup restore finished with a non-zero exit code
that could be also fixed later in the recreated system?

Accordingly I think it could be often better when during "rear recover"
something finished with a non-zero exit code to show a user dialog
via the UserInput function where the user can decide whether or not
he wants to continue regardless of that particular failure so that
the user has a better chance to get at least a somewhat usable
recreated system (in contrast to get no recreated system at all).

gozora commented at 2018-01-23 11:49:

Hello @jsmeix

I noticed that it errors out when the Borg backup restore
finished with a non-zero exit code.
I think this might be too hard here.

Yes I agree, this is too strict setting especially for rear recover. I'll take a look on this in upcoming days.

Thanks for pulling this out!

V.


[Export of Github issue for rear/rear.]