Config Restore does NOT apply previous settings

Status
Not open for further replies.

rstark

Cadet
Joined
Apr 11, 2016
Messages
6
After upgrading to the latest build via the UI I could no longer access the server with the WebGUI. SSH was available, but console was reporting errors. Unfortunately I was unable to log the exact error messages.

However, the WebGUI behavior was exactly the same as in this thread:
https://forums.freenas.org/index.php?threads/no-access-to-web-interface.44075/
(Too bad I didn't see this first :( )

In any case, I had a recent config backup from yesterday (6/13) so I re-built my USB and restored from my saved config file. But after reboot I'm still presented with the factory default settings. Absolutely none of my config has transferred over. Attempted another restore immediately after the first to the same result.

I'm not overly concerned about recovering the data, fortunately I had just migrated it all to another server, but I'm concerned that my config backups might not be what I expect them to be. Is there something I'm missing when it comes to the backup/restore of those files? I've looked over the documentation and searched the forums here, as well as google, but I can't seem to find any one else that's experienced this.

If somebody could point me towards a relevant thread or explanation regarding how/when configs are useful, I'd greatly appreciate it.

Thanks!
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
How did you generate your backup?
 

rstark

Cadet
Joined
Apr 11, 2016
Messages
6
From the WebUI. System -> General -> Save config.

Edit:
Restore was attempted from WebUI as well, although I searched for a cli method and came up short.
 
Last edited:

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
And just to be sure, you're not doing anything funky like trying to edit it, or change its format, or anything like that, right? Also, did you update between the time of creating the config and restoring the config? I believe that the config version must match the version of FreeNAS you're restoring it to.

Since I've restored many times from a config, I can say that there's not some universal bug with the config files, but I'm wondering if there's a particular bug with your config (like a corrupted config). I would try to do the restore again, carefully checking the version. I would also try creating a new config, and doing that restore. If you are unable to restore the first config, I would recommend creating a bug report.
 

rstark

Cadet
Joined
Apr 11, 2016
Messages
6
I did not attempt to edit the config .db file, BUT this did occur between updates. I had backed up the config just prior to running an update. It seems a little odd that this isn't best practice. Backup before update, restore if it fails, else what good are the config backups?

Although that gives me an idea. Since the build I used to re-install to my USB was older I could certainly see the config not applying in that specific case.

Since data recovery isn't a concern I've decided to experiment a little. SSH is up so I've scp'd the config to the server and copied over the current config:
cp /tmp/<my config file> /data/freenas-v1.db && reboot
Which seems to have actually worked, except networking is completely boinked. No biggie, just set the IP and Load-balance again and.....BOOM we're back. Config is restored!

So...maybe a bug in the backup restore process with this latest update?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
It seems a little odd that this isn't best practice. Backup before update, restore if it fails, else what good are the config backups?

Part of the update process is updating the config file. Doing a backup before doing an upgrade is best practice, but you can't just do whatever you want with it. If something goes wrong, the proper procedure is to boot from the previous version (which should still be present on your thumb drive, unless it was really borked), restore your config backup, and attempt the upgrade again. (At least, this was the case before 9.3; I don't know if it is the case any more).

I can't comment on the load balancing, since I don't use it. There may be an issue.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
I believe that the config version must match the version of FreeNAS you're restoring it to.
No. The only limitation is that versions older than the one that generated the config file are not guaranteed to be able to use it. However, a 9.3.1 config should load correctly on a 9.10 build, for instance. Note that this applies within families, too - an older 9.3.1 build than the one that generated said config might not be able to import it.
 

rstark

Cadet
Joined
Apr 11, 2016
Messages
6
Ericloewe said:
The only limitation is that versions older than the one that generated the config file are not guaranteed to be able to use it.
Yeah, that definitely fits. I rebuilt my USB with a build that was older than the config I'd taken. That definitely did not work, but I suppose that makes sense judging from what you're saying.

I have finally re-made the boot device with a newer build and was able to copy in the backed up config file. I can't reliably report success, however, as the server is experiencing very odd networking issues and I'm unsure if it has anything to do with the Load Balance link agg I'd applied previously or something else on our network. Suffice to say, it's not "up" enough for me to confirm the config is correctly applied.

Nick2253 said:
I can't comment on the load balancing, since I don't use it. There may be an issue.
Agreed. While I won't assume it's directly contributing to my current issue, I do know that when I'd rebuilt a few weeks back it was impossible to join to an AD environment with link agg setup. Actually had to break it and just leave one nic configured, join domain, and then configure the Load balancing. But then again, it could be my hardware....
 

rstark

Cadet
Joined
Apr 11, 2016
Messages
6
Update: (networking issued resolved finally) I rebuilt the Boot device and attempted to apply the config via the WebUI again. However, upon reboot I still am presented with a factory default config!

I rebuilt with a recent stable iso (FreeNAS-9.10-STABLE-201606072003.iso) and my most recent config backup. I attempted with an older config as well with the same result.

Is there another, more reliable, method for restoring a previous config and/or does anyone know how I could resolve this issue?
 

n8lbv

Explorer
Joined
Sep 12, 2017
Messages
58
I just tried a test backup, then fresh install to a new USB drive then attempting restore from the backup file.
Same latest stable boot CD & all nothing has changed.
The box did not come back after restore/reboot.
It is off net.
More details later when I have them.

Steve
 

1.21gigawatts

Explorer
Joined
Jan 6, 2013
Messages
62
I'm not sure if this is the right place to say this, but why can't the config file be made human readable? Cisco does it with great success. While there's plenty not to like about Cisco, their config files are very easy to work with.
 

n8lbv

Explorer
Joined
Sep 12, 2017
Messages
58
I guess I just needed to be patient.
It came back after a really LONG wait.
Seemed like 30 minutes.
Must have been doing some maint. task on bootup.
Maybe.

My test was a simple test.
1. Backup config
2. Shut down.
3. Install from same CD onto a new thumb drive.
4. Load (restore) config.
5. Reboot
6. Test
7. Read the docs later. Or read them now if it failed.

:)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
I'm not sure if this is the right place to say this, but why can't the config file be made human readable? Cisco does it with great success. While there's plenty not to like about Cisco, their config files are very easy to work with.
Because it's a pain in the ass in a number of ways and a fairly standard database format is good enough for anyone with sufficient knowledge of the format to actually do something. It also discourages those who know just enough to be dangerous from messing with it.

A more intermediate format like JSON or XML might be interesting, but there are much more urgent matters to deal with.
 
Status
Not open for further replies.
Top