Virtualmin GPL replication options

Hi All

I feel that perhaps I should change my username from VirtualNoob now that I have spent the last year or so using Virtualmin on 2 x VPS and more recently on 2 x dedicated servers to host 40 or so sites for my clients. But anyway, I digress…

I’ve been looking at options for increasing my hosting solution’s resilience against failure and could do with some expert help and advice.

We currently run very regular backups configured something like this:

  • Full virtual server backup of all features @ each night in the early hours

  • Incremental backups of all features since last backup @ every 2-3 hours depending on the time of day

  • DB backup for all virtual servers @ every hour 24 x 7

The backup destination is a linux box in RAID 1 at our offices, hence is ‘off-site’ from the data centre. The production server is also RAID 1, so I don’t foresee any situation where any data would be completely lost, however rebuilding a server to get all of the clients back online would be a complete nightmare (speaking from past experience!!)

To ensure that we don’t find ourselves in the position mentioned above, we’d like to run some sort of replication system to replicate the DBs and the home directories of our clients. In the event of any failure, the intention is to simply swap the dns records over to point at the ‘backup’ server and everything should just work.

What I need to know, is:

  • How can I configure server replication?

  • How quick is replication achieved?

  • Is there a better config than this?

  • Does anyone have any direct experience with this sort of configuration?

  • Are there any limitations that I need to be aware of?

  • Can anyone suggest anything else that might be relevant to what I am trying to achieve?

Thanks in advance for any help or advice.


Is there a better config than this?

There’s an artistic quote that states something like “Art is never finished, only abandoned”.

Server configuration is likely similar – especially with something as sophisticated and complex as replication, there’s likely always a better way, given more time and/or funds :slight_smile:

Replication and redundancy can get quite complex though… you could configure something like MySQL database replication, DRDB for filesystem replication, and heartbeat for monitoring the works and handling the switchover.

With the above, your backup server would always be fully up to date, within a few seconds of your main server.

But those are all complex topics, and there’s no simple guide for configuring all that – though there’s plenty of documentation at their respective websites regarding how to set it up.

Now, a simpler way for accomplishing all that –

You could simply setup a backup process within Virtualmin to generate backups of your Virtual Servers, copy those backups to your backup server, and have them automatically imported.

That would leave your backup server with up to date copies of your data, and ready to take over the workload – you would just need to come up with a way to perform the switchover from one server to the other.


Hi Eric

As always, thanks for the informative response.

You’re perfectly correct by the way - server set up and config seems to be a never ending task as further tweaks and improvements can always be made.

My latest improvement was to implement 2 x cloud servers from Rackspace at a total cost of around £7.30 per month per server to do nothing except replicate the DNS settings from my master Virtualmin installation on the production server. That now secures my clients’ email delivery as I use Google Apps exclusively for clients’ email handling.

At present, the production server backs up to a linux box in our offices, and can be used to recover virtual servers if a catastrophic failure were to occur. So, if I redirect those backups to another dedicated server, they could be imported via the Virtualmin command line on a schedule that runs shortly after the backup from the production server.

I reckon that will probably be the way to go, so I’ll probably look to get that in place at some point soon. I wish I could justify the time and expense of the fancier replication solution, but this certainly seems like a good halfway house for the moment.

I’m sure I’ll be back for more help and advice when I come to getting this set up.

Thanks again Eric.

You could check out something like Chef or Puppet - to make things easier at least: (see show notes for links, and alternatives)