Moving accounts to a new Server

SYSTEM INFORMATION
OS type and version Ubuntu 24.04.5
Webmin version 2.630
Virtualmin version 8.1.0 Professional
Webserver version Apache 2.4.52
Related packages SUGGESTED

Hi,
I am attempting to move 7 accounts to a new Server because my web dev requested nginx instead of apache, and this seems to be the correct method.

This went smoothly until I tried to restore- using this command-

sudo virtualmin restore-domain --source /home/xadmin/backups/ --all-domains --all-features

I got this message and none of the accounts appeared to have been imported-

'.. this backup cannot be restored : Original parent virtual server mydomain.com.au does not exist'

I have no idea what this means or how to fix it. Any tips please?
Does this mean I have to set up the parent domain first?

Hmm should work, have you created any accounts at all on the new server?

Also --source should normally have a file name

did you have this domain in the first place ? when you backed up did you only backup sub servers ? If you only backed up sub servers for sure you are going to need the parent already set up as they share the same unix user. If you don’t have a backup of the parent recreate it using the same username & password as the original parent domain. Why don’t you use the web interface within virtualmin to restore your backups ? this way if you have a backup of the parent in the same directory you can use the gui to restore that domain first then do a second hit to restore the sub servers

Problem with migrating a complete server to a new server, said hostname already exist, allthough it was on a fresh ubuntu and fresh virtualmin.

Deleted and reinstalled virtualmin on new server and transferred one by one all virtual servers which worked perfect.

ok here are my answers to your questions, I hope this is clear-

The /backups directory on the new Server contains these files-
(23 files, 7 accounts from old Server)
Examples-

.dj.tar.gz
virtualmin.tar.gz
.dj.tar.gz.dom
virtualmin.tar.gz.info
.dj.tar.gz.info

I got the command sequence from this post-

I activated a spare license for Virtualmin on the new Server.
Had previously overlooked this command, but ran it-
sudo virtualmin restore-domain --source /home/xadmin/backups/virtualmin.tar.gz --all-virtualmin

Result-
Restore completed successfully.

Then ran this command-
sudo virtualmin restore-domain --source /home/xadmin/backups/ --all-domains --all-features

And got this response-

Checking for missing features ..
.. WARNING - The following features were enabled for one or more
domains in the backup, but do not exist on this system. Some
functions of the restored domains may not work : Apache website, Apache SSL website

Checking for errors in backup ..
.. this backup cannot be restored : Original parent virtual server <redacted>.com.au does not exist

FYI- the Apache errors are expected, I am attempting to change from LAMP to LEMP stack.

YES- all the domains are registered and working properly on the old Server
YES the original parent server is in the backups

I think @jimr1 is closest to a solution, but I do not understand the restrictions- if I’ve got a backup of the parent domain, why do I still get the error?

Any assistance appreciated

I eventually got it done by doing this-

Most likely the error message was spurious, and the command I adapted from the other link was wrong. I didn’t actually try matching all the account backups like this, but maybe someone can report back-

sudo virtualmin restore-domain --source /home/xadmin/backups/*.tar.gz --all-domains --all-features

In the end, I just used the account backup filenames, and had to repeat the process for all the 7 accounts from that server-

sudo virtualmin restore-domain --source /home/xadmin/backups/domain1.tar.gz --all-domains --all-features

sudo virtualmin restore-domain --source /home/xadmin/backups/domain2.tar.gz --all-domains --all-features

etc.