Backup and restore on different hosts

NethServer Version: 7.9

Module: Backup and Restore

I am trying to restore the configuration data and user data, taken from a physical host on to a virtual machine.

Followed the following url, but unable to restore.

Here are my backup scenario on the physical host.

Configuration data : Stored in the physical host

User data: Will be copied on to a 4TB External HDD connected to the physical host. The configuration is Sunday full backup and every day incremental.

I have few questions on restoration..

  1. what are the prerequisites for restoration, like similar hardware, hostname etc.?
  2. The best way to restore is through GUI (Cockpit or Old server manager) or CLI?
  3. What is the exact process, on restoring both config & user data (including the commands).
  4. Does the subscription have any impact on restoring the data?

Now, am looking for support to restore both config data and user data on to the virtual machine.

Your speedy help is highly appreciable.

In your case of migrating from a physical machine to a VM you should follow the instructions for disaster recovery.

Check if you used 3rd party repos, you’d need to install them on the VM.

Check if the subscription is still active else you won’t be able to use the subscription repos and need to use the default ones.

Both Cockpit and old server manager is possible, I recommend Cockpit.

Just follow the documentation for restoring using the new server manager.

No, it has no impact on restoring but on the used repos, see Subscription — NethServer 7 Final

If more questions arise, feel free to ask.

BTW, NS7 is EOL, you may think about migrating to NS8, see also NethServer 7 migration — NS8 documentation

I have a trail subscription and is expired. How do I enable

If the trail subscription expires, how do I restore?

You can restore without subscription, the default repos should just work.

To remove an expired subscription from a system and switch back to the default repos, see Subscription — NethServer 7 Final

But as per the following screenshot, am unable to restore from both old server manager and Cockpit

In this case you could remove the expired subscription from the physical NS7 and rerun the backup so the subscription shouldn’t be included in the config backup and the restore in the VM should work.

Hi @mrmarkuz

Am unable to remove the subscription at https://my.nethserver.com/servers

The delete button is not enabled. How to proceed?

You don’t need to remove it from https://my.nethserver.com/servers

Just remove it from the physical NS7, it’s explained in following link:

After removing it from the physical NS7 you need to rerun the backup on the physical NS7 to have a config backup without subscription.
After that step the restore in the NS7 VM should work.

Thanks for the swift response.

Ok. Will try to do the same as advised. What are the disadvantages, if I remove the subscription from the production server?

The main advantage was the access to the subscription repository which provided well-tested package versions so updating was safer.
As NS7 already reached end of life, there are no updates anymore so there’s no disadvantage.

also when I did, as advised the following error came

S20restore-config-checkupdate #7 (exit status 256)

Note: I have removed the subscription from the production server and VM also. Created a new backup and tried to restore with download modules automatically and without download modules automatically.

Do you use 3rd party repositories?

Third-party repositories are not restored by the disaster recovery procedure. If the original machine has some third-party repositories enabled, remember to install them before proceeding with the restore.

Please execute following command on CLI to maybe catch possible errors:
It just updates NS7 to the latest version.

yum -y --setopt=exit_on_lock=1 update nethserver-\* @nethserver-iso

How did you remove it, in Cockpit or on CLI?

Let’s check the subscription status on both NS7: (physical and VM)

config show subscription

On production server the following is the out put

yum -y --setopt=exit_on_lock=1 update nethserver-* @nethserver-iso
Loaded plugins: changelog, fastestmirror, nethserver_events
Determining fastest mirrors

And the same on the VM also

The production server

subscription=configurationAlertsAutoUpdates=enabledAlertsUrl=https://my.nethserver.com/api/machine/ApiUrl=https://my.nethserver.com/api/DocsUrl=https://docs.nethserver.org/ExtraRepositories=HelpdeskUrl=https://community.nethserver.org/InventoryUrl=https://my.nethserver.com/api/machine/inventories/store/NsRelease=7.9.2009PricingUrl=https://my.nethserver.com/?action=newServerSecret=ns8-6c6dffe5-b0c6-40a7-ada2-6fd8fa113072SiteUrl=https://www.nethserver.org/SystemId=ns8-6c6dffe5-b0c6-40a7-ada2-6fd8fa113072

And the vm target server

subscription=configurationAlertsAutoUpdates=enabledAlertsUrl=https://my.nethserver.com/api/machine/ApiUrl=https://my.nethserver.com/api/DocsUrl=https://docs.nethserver.org/ExtraRepositories=HelpdeskUrl=https://community.nethserver.org/InventoryUrl=https://my.nethserver.com/api/machine/inventories/store/NsRelease=7.9.2009PricingUrl=https://my.nethserver.com/?action=newServerSecret=ns8-1255925b-8911-4906-936c-9a29c933fb55SiteUrl=https://www.nethserver.org/SystemId=ns8-1255925b-8911-4906-936c-9a29c933fb55

It’s still connecting to the subscription repos, so the subscription removal didn’t work, please try on CLI as explained in Subscription — NethServer 7 Final

config setprop subscription Secret '' SystemId ''
signal-event nethserver-subscription-save

Did the same, I copied the system id from Cockpit. Is that I should do or any other way to get the system id?

You don’t need to get a system id, just enter the commands without editing them.

Oh that’s great.

Now please find the result on both the servers..

subscription=configuration
AlertsAutoUpdates=enabled
AlertsUrl=https://my.nethserver.com/api/machine/
ApiUrl=https://my.nethserver.com/api/
DocsUrl=https://docs.nethserver.org/
ExtraRepositories=
HelpdeskUrl=https://community.nethserver.org/
InventoryUrl=https://my.nethserver.com/api/machine/inventories/store/
NsRelease=7.9.2009
PricingUrl=https://my.nethserver.com/?action=newServer
Secret=
SiteUrl=https://www.nethserver.org/
SystemId=

Now I shall take backup from the production server and restore on the vm.

Am I right?

1 Like

Yes, that should work now.

Bingo!!

It restored the configuration backup successfully.

Thanks a ton @mrmarkuz .

Now I am focusing on the user data restoration part. Will be following this url

and will get back to you if need support.

Once again thank you

1 Like