Restore fails on fresh installation

Hello,

I’m in the process of upgrading my IPFire from IPFire 2.25 (i586) - Core Update 158 to the latest version. I’m doing this on a VM as a first run to make sure this goes smoothly when I do this in my prod environment. My prod environment has been around for many years, but has been updated on a regular basis. (With the exception of updating the architecture. which I’m doing now)

I installed a fresh copy of IPFire 2.25 (x86_64) - Core Update 158 as a VM. I have only gone as far as the basic configuration so I could get access to the GUI. No addons or updates have been installed.

I created a backup of my production system using the GUI backup, then attempted to restore my backup file onto my newly created installation. When I perform the restore, the restore file loads, but nothing else happens. After a reboot, it appears the restore failed. None of my configuration from my production system came over (Firewall, VPN, DHCP, etc.)

I attempted to perform the restore from the command line with the following commands and the following output:

[root@ipfire-dev ~]# /var/ipfire/backup/bin/backup.pl restore /tmp/restore.ipf

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
groupadd: group ‘dhcpcd’ already exists
useradd: user ‘dhcpcd’ already exists
Converting CCD files…

It appears the script runs, but nothing is restored.

I was going to attempt to manually perform the restore using the perl code, but thought I would ask first before undertaking that task.

Any thoughts would be appreciated,

Mark

So quick update…

The backup.pl file, line 81 has this line:
tar xvzpf “${filename}” -C /

I changed it to:
tar xvpf “${filename}” -C /

and that seems to get me further… seems like someone would have tripped over this before. Weird.

Mark

That is weird. I just checked my backup files. They are all gzipped, so the ‘z’ option in backup.pl is right.

Back in Core Update 158 a fix for a bug was implemented, by me. Unfortunately, while fixing that bug it created a separate bug with restore, which I believe that you are experiencing.
This was fixed and released in Core Update 163.

The patch, found at the following link, can be implemented onto backup.pl and should then work for you. It worked for the person who flagged up the consequential bug

https://patchwork.ipfire.org/project/ipfire/patch/20211202123715.2525482-2-michael.tremer@ipfire.org/

Hopefully this works for you.

I think you will need to apply it to your prod machine and also to your vm machine.

3 Likes

Hi Adolf,

Thank you for your feedback, it was very helpful! I patched both instances and that got me going again.

Thanks for your help,
Mark

1 Like