What does restoring a configuration backup actually do?

NethServer Version: 7.6
Module: ?

As I mentioned in Hotsync problems with new system, I rebuilt my hotsync target system yesterday. I installed a minimal installation of CentOS 7 to a new SSD, installed all its updates, set up a ZFS mirror on two spinners and mounted it at /var/lib/nethserver, then ran the nethserver-install per the docs. Once that finished, I logged into the server manager and uploaded a saved configuration backup that the previous system had taken earlier in the day, checking the box to download modules. And that’s where the trouble started…

Other than setting the system hostname (maybe–I’d already configured this during the CentOS installation) and time zone, I can’t see that any of the configuration settings from the old installation have carried forward. Specifically:

  • The IP address wasn’t set; the main interface was left as DHCP
  • The “organization contacts” weren’t set; they were left at defaults
  • The UPS support module wasn’t installed, nor were its configuration settings preserved
  • The trusted networks weren’t saved
  • None of the hotsync/rsyncd settings were preserved

I’m sure there are other issues; these are just the ones I’ve run across so far. It isn’t looking like restoring the configuration backup did anything useful at all–is this how it’s supposed to behave?

Perhaps @dev_team has an answer here.


well it’s been a while…

IIRC the cool thing is if you choose to restore the configuration backup during the first setup wizard it will install the previous installed nethserver-modules and configure them as-was.

EDIT: (see below)
i’ll gues if you skip this during the first configuration wizard it will configure your system as-was after you manually installed the modules you used to have.

I tested it now and it seems config backup does not work when hotsync is installed.

If you do a config backup on a hotsync system there is no error but no backup. Could it be you restored an old backup (maybe the first automatic one after initial configuration)?

I assume hotsync syncs the master config backup to the slave so it is not allowed to overwrite it. (or it’s a bug?)

AFAIK the config restore process restores the complete configuration in any case (no matter if done in first config wizard or manually afterwards).

1 Like

I think this is a bug. @mrmarkuz Would you open a a new thread?

No, the config backups shown in the GUI were dated, and I took the most recent one (from the previous day).

I don’t know that a new thread is called for here; what @mrmarkuz describes sounds just like what I seem to be seeing.

To be clear, my backup system is taking configuration backups:

When I download one (c02), it’s a 218kb .tar.xz file. When I extract it, I get this result:

Dans-MacBook-Pro-4709% tar xf backup-config-c02.tar.xz
etc/letsencrypt/live/interociter-enterprises.com/cert.pem: Can't create 'etc/letsencrypt/live/interociter-enterprises.com/cert.pem'
etc/letsencrypt/live/drupal.familybrown.org/chain.pem: Can't create 'etc/letsencrypt/live/drupal.familybrown.org/chain.pem'
etc/letsencrypt/live/brownlawoffice.us/cert.pem: Can't create 'etc/letsencrypt/live/brownlawoffice.us/cert.pem'
etc/letsencrypt/live/neth.familybrown.org-0001/chain.pem: Can't create 'etc/letsencrypt/live/neth.familybrown.org-0001/chain.pem'
etc/letsencrypt/live/neth.familybrown.org/privkey.pem: Can't create 'etc/letsencrypt/live/neth.familybrown.org/privkey.pem'
etc/letsencrypt/live/neth.familybrown.org/chain.pem: Can't create 'etc/letsencrypt/live/neth.familybrown.org/chain.pem'
etc/letsencrypt/live/kirk.club/privkey.pem: Can't create 'etc/letsencrypt/live/kirk.club/privkey.pem'
etc/letsencrypt/live/db-cloud.org/cert.pem: Can't create 'etc/letsencrypt/live/db-cloud.org/cert.pem'
etc/letsencrypt/live/db-cloud.org/privkey.pem: Can't create 'etc/letsencrypt/live/db-cloud.org/privkey.pem'
etc/letsencrypt/live/repo.familybrown.org/cert.pem: Can't create 'etc/letsencrypt/live/repo.familybrown.org/cert.pem'
etc/letsencrypt/live/repo.familybrown.org/privkey.pem: Can't create 'etc/letsencrypt/live/repo.familybrown.org/privkey.pem'
etc/letsencrypt/live/interociter-enterprises.com/privkey.pem: Can't create 'etc/letsencrypt/live/interociter-enterprises.com/privkey.pem'
etc/letsencrypt/live/acme.familybrown.org/privkey.pem: Can't create 'etc/letsencrypt/live/acme.familybrown.org/privkey.pem'
etc/letsencrypt/live/neth.familybrown.org/cert.pem: Can't create 'etc/letsencrypt/live/neth.familybrown.org/cert.pem'
etc/letsencrypt/live/brownlawoffice.us/chain.pem: Can't create 'etc/letsencrypt/live/brownlawoffice.us/chain.pem'
etc/letsencrypt/live/kirk.club/chain.pem: Can't create 'etc/letsencrypt/live/kirk.club/chain.pem'
etc/letsencrypt/live/drupal.familybrown.org/cert.pem: Can't create 'etc/letsencrypt/live/drupal.familybrown.org/cert.pem'
etc/letsencrypt/live/brownlawoffice.us/privkey.pem: Can't create 'etc/letsencrypt/live/brownlawoffice.us/privkey.pem'
etc/letsencrypt/live/autoconfig.familybrown.org/chain.pem: Can't create 'etc/letsencrypt/live/autoconfig.familybrown.org/chain.pem'
etc/letsencrypt/live/neth.familybrown.org-0001/cert.pem: Can't create 'etc/letsencrypt/live/neth.familybrown.org-0001/cert.pem'
etc/letsencrypt/live/acme.familybrown.org/cert.pem: Can't create 'etc/letsencrypt/live/acme.familybrown.org/cert.pem'
etc/letsencrypt/live/interociter-enterprises.com/chain.pem: Can't create 'etc/letsencrypt/live/interociter-enterprises.com/chain.pem'
etc/letsencrypt/live/neth.familybrown.org-0001/privkey.pem: Can't create 'etc/letsencrypt/live/neth.familybrown.org-0001/privkey.pem'
etc/letsencrypt/live/drupal.familybrown.org/privkey.pem: Can't create 'etc/letsencrypt/live/drupal.familybrown.org/privkey.pem'
etc/letsencrypt/live/kirk.club/cert.pem: Can't create 'etc/letsencrypt/live/kirk.club/cert.pem'
etc/letsencrypt/live/pbx.familybrown.org/cert.pem: Can't create 'etc/letsencrypt/live/pbx.familybrown.org/cert.pem'
etc/letsencrypt/live/autoconfig.familybrown.org/cert.pem: Can't create 'etc/letsencrypt/live/autoconfig.familybrown.org/cert.pem'
etc/letsencrypt/live/pbx.familybrown.org/chain.pem: Can't create 'etc/letsencrypt/live/pbx.familybrown.org/chain.pem'
etc/letsencrypt/live/autoconfig.familybrown.org/privkey.pem: Can't create 'etc/letsencrypt/live/autoconfig.familybrown.org/privkey.pem'
etc/letsencrypt/live/repo.familybrown.org/chain.pem: Can't create 'etc/letsencrypt/live/repo.familybrown.org/chain.pem'
etc/letsencrypt/live/pbx.familybrown.org/privkey.pem: Can't create 'etc/letsencrypt/live/pbx.familybrown.org/privkey.pem'
etc/letsencrypt/live/db-cloud.org/chain.pem: Can't create 'etc/letsencrypt/live/db-cloud.org/chain.pem'
etc/letsencrypt/live/acme.familybrown.org/chain.pem: Can't create 'etc/letsencrypt/live/acme.familybrown.org/chain.pem'
tar: Error exit delayed from previous errors.

I see four directories (etc/, root/, sbin/, and var/), containing a total of 527 files, and about 2 MB of data.

Perhaps I quoted the wrong sentence.

I think this is a bug, or not?

It works for @danb35 so maybe my test VM tricks me here, I’ll do some more tests.

I don’t know why you get these errors, on my Nethserver extraction works, maybe you don’t have write permission where you want to extract?

You should find the config database var\lib\nethserver\db\configuration and it should contain the current config values.
I am going to do further tests to find out where the error comes from.

1 Like

It seems like there are only automatic backups, can you do a manual config backup? You should get a backup id starting with s.

Doesn’t look like it–I don’t get an error, but if I click the blue Create Backup, enter a description (like “test”), and then click the red Create Backup, the screen spins for a moment and then returns to the page–but without any additional entries. If I navigate away from that page and return, again, there are no new entries there.

Sorry, I read over it.

Same here. Thanks for confirmation.

Now it would be interesting if the backup file contained the correct (actual) config database. I’d like to find out if the error occurs at backup or at restore.


backup-config is disabled when hotsync slave role is enabled:

I assume the config backup of the slave is disabled to not conflict with the sync/promote process.

…so if that’s the case, why is it still generating automatic config backups?

The slave uses the config backup history so I think it’s the synced config backup file: