I am on a pretty old OS (and virtualmin I believe). I want to move to a new (Debial 12) server, but I am a bit afraid that this will install an outdated virtualmin.
Does it make sense to have a fresh virtualmin install, and then just move the email boxes (this is the most important to me). The websites I may redo from scratch (from Bolt CMS to HUGO), so no concern.
Is it possible to just move the postfix mail boxes?
With Virtualmin’s built-in backup and restore, it should be easy for you to backup and restore mailboxes only. After you install the latest version of Virtualmin on Debian 12 with the https://www.virtualmin.com/docs/installation/automated/, and test that mail + web is working normally, you could do this the old-fashioned way:
reduce TTL of every domain hosted on the old Virtualmin system
manually create a virtual server / domain on the new Virtualmin system
manually do a full backup of a virtual server / domain on the old Virtualmin system
manually do a partial restore of a virtual server / domain on the new Virtualmin system (by keeping just the check boxes for “Server’s home directory and web pages” and “Mail/FTP users and mail aliases” checked during restore)
change the name servers / DNS records of the domain
after DNS propagates, test that mail is working for the domain and the default under construction page displays
Repeat Steps 1 - 5 for every domain on the old system. You should now have transferred mailboxes from the old system to the new system. Change the TTL back to a higher value.
Then add web content to the domains that you host by all means.
Is there any problem moving from CentOS 6.1 (32bit I guess) to Debian 12?
Currently seem I have problem due to old age, like, I can’t install DKIM for Postfix.
My old currently used server will be operational till end of Oct, so I am not in a rush.
Holy heck. CentOS 6!? That’s been EOL and unsupported for four years. Super dangerous (I would not be surprised if your system had been rooted sometime during that time, you definitely have insecure software).
I generally recommend you just use a new version of the same OS you are currently running. In this case, Rocky or Alma or RHEL 9. Nothing wrong with Debian, but if you’re concerned about problems migrating, choosing the same OS will minimize them.
You should always expect some minor issues when going from a very old OS to a very new one. If you also switch to a very different distribution, you’ll have more minor issues. Nothing an experienced sysadmin can’t solve in a few minutes, generally, but if you’re not comfortable with the command line and the services you’re using, you might find it stressful.
In short: Restoring backups made on one OS to another usually works OK, but it’s more likely to have problems than going from the same OS to a newer version of it. Since getting off of your ancient CentOS system is an urgent problem, I’d recommend you follow the path of least resistance.