Server migration to fresh install

SYSTEM INFORMATION
OS type and version Debian 11/12
Webmin version 2.202
Virtualmin version 7.20.2 Pro
Webserver version Apache 2.4.62

Hello,

I’ve been running Virtualmin for around 10 years on the same Debian VM. I’ve upgraded the Debian version many times and are currently running Debian 11, but I’ve been having random problems probably related to multiple migrations and Virtualmin versions conflicts.

I just crated a new VM on the same physical server and want to migrate my old VM to the new one with a fresh Debian 12 and Virtualmin 7 install. I will also hold the /home directory on a new bigger disk array.

What would be the best way to do the migration minimizing downtime? How can I transfer my Vitualmin Pro license?

Some virtual servers have strange Apache/PHP issues, is it possible to migrate users, email, databases and all data without migrating configuration (eg. using a default config)?

Will imap accounts resync everything after migration? This would be a problem as I would be syncing like 1.5TB and that would saturate my connection for several days.

Any advise would be welcome.

Thanks for the guide, but this does not cover my questions.

Follow the guide.

You can use the license on both hosts for the migration time. Don’t forget to decom the old host once done.

No.

Yes.

Ok, the new OS + Virtualmin will be hosted on the same server as the old OS + Virtualmin.

Then here is what you need to do:

Lower the TTL value of the DNS records, use Virtualmin Backup to store the archives of all your virtual servers somewhere on the cloud. Kill the old Virtualmin and install the new OS + Virtualmin on the same hardware. Then restore from the cloud.

There will be downtime since you are using the same server for the old OS + Virtualmin that you will use for the new OS + Virtualmin. Downtime could have been minimised if the new OS + Virtualmin would be put on a new server. But alas.

I did a rsync of the /home directory to the new server, did a backup of everything but the /home files. Restored the backup and then proceeded to fix permissions.

Everything went good. The server has been up for two weeks now.

I only had a problem with one domain where I send an email and I got a “user does not exist” error, even though the user did exist. This was for all accounts of this domain.

I set " Primary email address enabled" to “no”, saved and the back yo “yes” and this fixed email delivery to the accounts of this domain.

1 Like

Yes, but be cautious. You can choose not to bring over the Virtualmin configuration, and only bring over domains. You may find some domains or users have weird behaviors and/or more or less privileges than before.

The step to skip would be virtualmin restore-domain --source /root/backups/virtualmin.tar.gz --all-virtualmin

The file virtualmin.tar.gz contains Virtualmin configuration.

Note also that Virtualmin backups do not cover customizations to system services. The Virtualmin settings backed up are literally just Virtualmin settings. (Apache is not Virtualmin, Postfix is not Virtualmin, BIND is not Virtualmin, etc.)

So, if the problems you have are based on misconfiguration of any of those services, you can still bring over the Virtualmin configuration.

I would urge you to understand “random problems” before deciding what to do about them.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.