It’s a standalone server with domain, web, mail, ftp… this server has been running for at least 7 years with Virtualmin with careful updates that so far haven’t caused any problems.
Except that it’s getting old (I’ve had it since 2013) and its main drawback is that it’s behind a weak switch and the only solution to avoid loss of throughput, according to my supplier, would be to move to another machine behind a big switch (1Gbits → 10Gbits).
So I’m going to change machines (I’ll have both simultaneously for a few weeks) and move from Debian 11 to 12 (I’m on Virtualmin 7.30.8 GPL).
However, I’d like to avoid having to reconfigure everything by hand. What would be the best strategy for migrating my configurations (or at least the bulk of them) and my data?
What possibilities does Virtualmin have in this Domain?
Thanks for the link, it’s already a good base, but I was mainly talking about system and server configurations. I should have mentioned Webmin…
There are the backup functions: Backup Configuration Files | Webmin, useful in case of error, but I’m not sure it’s designed for migration ?
Backup Configuration Files does exactly and only that: Backs up configuration files managed by Webmin. I doubt it has anything useful to add to a Virtualmin migration process, though I wish more people used something to regularly backup their configuration files (I backup all of /etc regularly and I also use etckeeper), since we often see folks flailing about trying to restore a system to a previously working state with no idea what they changed that broke it.
A full Virtualmin backup includes most of the relevant configuration for moving one virtual server to another. There may be some customizations you’ve done to related services, which you might need to bring across some other way, but I don’t think I would recommend using a whole backup of /etc or a backup from Webmin’s Backup Configuration Files to do that because migrations are almost always to a newer OS version, and you probably don’t want to copy all configs verbatim across major OS version changes without reviewing them and making sure you’re accounting for changes to the underlying services and their config files.
If I follow the migration steps in the doc, after reinstalling Virtualmin on my new machine, should I reinstall all the extra packets and configure my customisations before or after restoring the domains?
For example, additional versions of PHP from the Sury repository?
Is there any way of knowing which configuration items are restored by Virtualmin?
Thanks for etckeeper, that’s a great idea, I’ll be setting that up on my new machine!
Before, probably. You should replicate the environment you’re coming from so that everything works as close to the same as you can make it. If it’s not something Virtualmin manages or knows about, it probably won’t matter what order you do it in, but nonetheless, might as well have the environments match as closely as possible within the bounds of changes necessitated by the OS upgrade.
Yeah, probably want those available and known by Virtualmin before restoring a site that uses an alternate version.
Use Virtualmin’s Backup and Restore feature — it’s the easiest way to move domains, settings, and mail. Just back everything up on the old server, then restore on the new one.