Moving a virtualmin machine

So, I thought it might be as simple as making a virtualmin backup with settings, and, the different virtual servers, and restoring them on new machine! Not even remotely close.

One problem seems to be services not installed by Virtualmin by default, BUT used by virtual servers, are not added back. So, the virtual servers lose those features, and all sorts of settings end up wrong. I didn't write any of them down, but, there was literally tons of work to do to get the machine running again. And I actually had to go through every scren and match to what was on the old machine to the best of my recollection.

So, what is the best procedure for doing this? Since hardware is being switched, and ips et al....

Oh, that was one of the typical problems - all virtual servers ended up n one shared IP, even if they were previously dedicated.

Should i have done something like instal virtualmin (of course), but BEFORE loading the settings and backups, add all the software packages, configure the features to turn on things like sqllite, etc, and only after all that is done, then restore the backups? Very confusing.

Status: 
Active

Comments

You should generally see a warning message when doing a restore if the backup contains features that aren't enabled on the destination system yet. This can be avoided if you first do a backup of all virtualmin settings and restore that on the target host, then restore all the domains.

Regarding the issue with IPs - did you have multiple domains each with its own private IP?

Some number of them had their own ip, before. Unfortunately it was not that simple. There was not a single warning for anything missing. I would say a minimum of 50 things were wrong. t lest.

But, I did not have two backups, I had one. So, are you saying a backup with no domains is somehow different than a backup with all the settings and domains?

And somehow restoring said backup, would install postgrey, you name it?

I did a test backing up and restoring a domain with a private IP, and it worked OK .. so I'm not sure why it failed in your case.

In general, most global settings can be backed up on the "Backup Virtual Servers" page by not selecting a domains, and instead selecting everything under "Virtualmin settings to also backup". I would recommend first taking a backup like this and restoring it on the target system. Then backup all your domains and restore those.

But what about all the things you can enable in Virtualmin, my example was postgrey, where Virtualmin installs it once you enable it. Surely you are not suggesting such a restored backup would install all the stuff the websites have enabled?

No, some things like Postgrey and DKIM will not be automatically setup as part of the restore process. That could be considered a bug ..

My plan is, once I get time, to purchase an el cheapo VPS and restore Virtualmin on it and see what is missing. Once I see, then, I will start over with the OS (since it's so easy to do on VPS), and, this time install Virtualmin AND the packages, and then restore and see what I get and what is missing.

I don't see how the ips would work. After all, what ip would it assign to a website? Remember, I changed providers, so, a whole new list of ips, not the same ones. So, how could Virtualmin assign new ones to the sites that have private ips? Perhaps if I installed Virtualmin and then told it about the new IP ranges in the config, think that would help? My thought is probably not.

Another problem I just noticed, awstats et all defaulted to running for each server again. It was not being run for each server, it was using the run all cron job. So, this messed up things.

Virtualmin will try to use the same IPs as were on the original system. However, since these are probably not routable on the new network, you would need to change the IPs of the domains after restoring..