Bug 12737

Summary: Failed restore from iso only states "An error occured when the backup file was restored"
Product: IPFire Reporter: Larsen <larsen007>
Component: ---Assignee: Michael Tremer <michael.tremer>
Status: CLOSED FIXED QA Contact:
Severity: Crash    
Priority: Will affect almost no one CC: adolf.belka, michael.tremer, peter.mueller
Version: 2   
Hardware: unspecified   
OS: Unspecified   
Attachments: Error screen

Description Larsen 2021-12-02 15:19:30 UTC
Created attachment 962 [details]
Error screen

I tried to install ipfire (core 161) using the iso created via ipfire's backup menu. For unknown reasons, after the installation succeeded, the backup was found but could not be restored.

Only error message I got was "An error occured when the backup file was restored" which of course doesn't help at all in finding the problem.

(See https://community.ipfire.org/t/6743)

This should really be more informative:
- What error happened exactly?
- Where can I find more information about this?
- Is there a log file?
Comment 1 Michael Tremer 2021-12-02 15:42:46 UTC
(In reply to Larsen from comment #0)
> This should really be more informative:
> - What error happened exactly?
> - Where can I find more information about this?
> - Is there a log file?

You can press Alt-F2 to get to the error console and see more about what went wrong.

Could you please test this patch for me, because I believe that it fixes the problem:

> https://patchwork.ipfire.org/project/ipfire/patch/20211202123715.2525482-2-michael.tremer@ipfire.org/
Comment 2 Larsen 2021-12-02 16:46:11 UTC
Thanks for the quick fix. Testing the patch on our production machine, it now created a gzipped IPF instead of a tar one. I was then able to successfully install/restore in VirtualBox.

As for the actual topic of this ticket: Would be quite useful if the error message was expanded to include "Press Alt+F2 for possibly more details".
Comment 3 Larsen 2022-01-12 17:09:16 UTC
Just installed Core 162. The fix is not yet implemented as it seems.
Comment 4 Adolf Belka 2022-01-12 17:42:04 UTC
The commit for the fix is in the Core Update 163 build.

https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=51ed815f5ebb4668b54f4715b1273a6ce6f16764
Comment 6 Larsen 2022-02-09 19:37:18 UTC
Although the underlying problem has been fixed, the error message still should be redacted to present the user more information than just "an error has occured", meaning "good luck trying to figure out what exactly".
Comment 7 Michael Tremer 2022-02-15 13:25:37 UTC
(In reply to Larsen from comment #6)
> Although the underlying problem has been fixed, the error message still
> should be redacted to present the user more information than just "an error
> has occured", meaning "good luck trying to figure out what exactly".

I agree with this, but there is no way to do this. The installer calls tar to extract the backup tarball and we do not know what went wrong when it does since tar only returns an error code to us.

The installer software isn't flexible enough that we could read a log file or something similar and display it to the user. If it would offer that flexibility, I wouldn't be too sure whether that is helping everyone.

So for as long as this does not show up again, there should be no need to invest too much time into this.
Comment 8 Larsen 2022-02-15 14:02:40 UTC
I guess tar's error code could be added to the current output to at least have some more info, couldn't it?
Comment 9 Michael Tremer 2022-02-15 14:04:27 UTC
It will only be one for “an error has occurred” or zero for “no error has occurred”. There is no further information to be drawn from this.
Comment 10 Larsen 2022-02-15 14:06:41 UTC
I see. Thought the error code would be in a broader range than that.