Synchronizing Virtual Servers between 2 machines


Currently, I’ve got two physical servers. I’ve managed to cluster them together and synchronize their users and almost all of their user directories contents - except what was in public_html.

On the master server, I see all the virtual servers in the virtualmin interface drop-down, as usual. In the "slave" server, despite all the syncronization between users and groups, no virtual servers were transferred.

Will I need to recreate all these users’ virtual servers? It seems that the webmin, usermin, and users and groups listed under the “cluster” feature should be able to accomplish the task of moving both the user and their home directories as well as their virtual server settings. I was a bit shocked when what was copied was the home directory and the users and groups but not the virtualmin servers…

The goal here is to have all the virtual servers and their users mirror on both servers.

Any advice?

I got the same situation.

The first server is a 50 domain server and the second is a recently acquired unlimited license.

Both have public ip addresses.

I was able to set the second as a DNS slave of the first adding the clustering option in both servers.

But as you mention:

How can I make that when I create a domain in the second server the information is automatically created in the first?

In my case:

Can I just swap virtualmin licenses between the two servers to avoid change of ip addresses-DNS’s ?

I have 30 domains already in the limited license (first server).

There is any documentation that I have missed about this setup?

This is a copy of an email dialog/message from Joe regarding the synchronization of virtualmin installations with a some helpful suggestions. I figured I’d post it here in this thread to help anyone who might be passing by…

Merlynx wrote:
> Joe,
> I was hoping to achieve a mirrored setup - at least in terms of virtualmin servers and services.
> I have two systems for this purpose both with public IP addresses, both with virtualmin pro installed.
> server#1 - dual opteron SuSE linux 10.0
> server#2 - dual Xenon SuSE linux 10.3
> The “master” server in this setup would be #1.
> I’ve used the cluster tools and moved over webmin users and all the other “synchronizing” that I could with the cluster tools…
> I was hoping that there was a tool to synchronize virtualmin servers on both machines…is there such a tool?

Not yet. But the existing functionality is so close that it’s kind of a shame that we haven’t yet tackled it–it just doesn’t come up very often (though it’s getting to be more common). The Virtualmin Backup feature can copy the resulting backups over to another server via ssh, FTP, NFS/CIFS/whatever, so the only missing step is the restore. You could probably do something like set up a cronjob to call the command line restore function like this: --source /backupdirectory --all-domains --all-features --all-virtualmin

Something like that anyway. I’ve never actually done it this way. So
I’m not an expert. :wink:

The very first Virtualmin deployment (about four years ago now!) was an rsynced configuration. Everything in /home, /etc, and the database
directories in /var were rsynced every four hours to the backup machine. In the event of a failure, it changed automatically to the IPs of the master server. This is also doable. It has a few quirks–like the backup server can’t be anything but a backup server (it could also serve DNS safely), because the rsync would break other stuff.

I’ll add a Virtualmin Hot Spare module to my todo list, as it is something that would be nice to offer–and most of the infrastructure is already in place. We just need to hook it all up and give it a UI.

> Is there a procedure or some reading you could point me to?

Depends on how you go about it. I’m not sure of the best way–using
Virtualmin backups is very clean, but requires quite a lot more data to be exchanged. If you’re on a local network, it’s no problem at all, but if your backup is off-site, it could get pricey and time-consuming, and rsync wins. Obviously, you’d want to spend some time with the backup to make sure the right stuff goes over–using Virtualmin’s features again makes that a little easier, since you know everything you need for the site will be in the backup (assuming both servers are equally equipped with regard to PHP versions and such).

The Cluster docs at are not up to date (most of the modules
came into existence after our books were published, and so they have no coverage in the docs). Hopefully, someone will step up and add
something to those sections.

> I’m also configuring “heartbeat” on these systems for fail-over.

heartbeat works fine. No complaints. It’s the product I used for our
failover, I think. (Or I might have called a custom script from a
Webmin System and Server status check…I don’t remember now. I’ve used Heartbeat in the past, though.)

> Any advice or direction would be much appreciated.

I’d be groping, as well. I’ve done it, but it was so long ago and the
complexity of a Virtualmin system has increased by an order of magnitude or more. You’ll end up doing some experimentation, no matter what, and every hot spare situation has tradeoffs (how frequently can you update without dramatic load on your primary, how expensive is it to transfer the data, how much time can you afford to be offline in the event of master failure, how much mail can be “lost” (even if temporarily) before customers burn you in effigy and run to another provider, etc.).

Hope this helps. (And I’m happy to answer further questions–I know
this isn’t the HOWTO you were looking for…but I wanted to reply with
what advice I can offer. We’ll have some sort of solution to this in
the next couple of months, but as I mentioned, it’s a pretty rare request.)

–End of email exchange quote.