Replication

Cloudmin replication allows you to setup one or more additional systems as backup replicas, which can take over management of all your other systems if the primary master fails. It is only available in Cloudmin 4.0 or later, and each replica must also be running Cloudmin 4.0 or above.

What Gets Replicated

When replication is enabled, Cloudmin will copy the following to all replicas :

  1. The details of all managed systems, such as their hostnames, IPs, current status and login information.
  2. Global settings like plans, bandwidth monitoring, alerts, backup schedules, Virtualmin replication configurations and module configuration.
  3. System owner accounts and all associated statistics.
  4. Any system images stored on the Cloudmin master.

Replication is done by default every 5 minutes, just after the status of all managed systems is collected. It is always done in the background, so any delay sending changes to replicas does not effect the Cloudmin user interface.

Replication does not include the status of the Cloudmin master system itself, as it makes no sense to replicate this to backup masters which will be collecting their own status. It also does not include any system images that are not stored on the master.

If the Cloudmin master is also acting as a host for virtual systems, they will not be included in replication - except for their status.

Setting Up a Replica

The process for setting up a new Cloudmin replica is :

  1. Choose a system to be the backup replica, and install Cloudmin 4.0 or later on it. Either an empty system or one running Virtualmin can be used.
  2. Login to Cloudmin on the replica, and go to Cloudmin Settings -> Cloudmin Replication.
  3. Select the Replica of another system option, and click Save.

From this point on, the system will be switched to a read-only replica state, and will wait for replication connections from the master you setup in the next section. You can still use Cloudmin on the replica to view the details of all managed systems and global settings, but will not be able to change anything.

Setting Up the Master

To configure a system to copy settings to one or more Cloudmin replicas, the steps to follow are :

  1. Make sure the replicas are already on the list of managed systems - if not, add them first.
  2. Login to Cloudmin, and go to Cloudmin Settings -> Cloudmin Replication.
  3. Select Replicate configuration to, and choose the replica systems from the list to the right.
  4. Click Save.

After saving, all replicas will be checked to ensure that they are reachable and are setup as replicas. An initial replication of all settings will then be done - this may take several minutes or more if the current master has a large number of system images stored locally, as they will need to be sent to all replicas.

Dealing With Master Failure

If your original Cloudmin master system fails and you have a single replica, it can be switched to become the new master as follows :

  1. Login to Cloudmin, and go to Cloudmin Settings -> Cloudmin Replication.
  2. Select Stand-alone Cloudmin system, and click Save.

The system should now be a fully usable Cloudmin replica, with all global settings and system state from the last replication sync from the old master.

If the old master is still reachable, replication from it can be turned off by :

  1. Login to Cloudmin, and go to Cloudmin Settings -> Cloudmin Replication.
  2. Select Stand-alone Cloudmin system and click Save.

If you had multiple replicas to start with, in the case of master failure the steps are :

  1. Pick one replicate to be the new master, and login to Cloudmin on it.
  2. Go to Cloudmin Settings -> Cloudmin Replication.
  3. Select Replicate configuration to, and make sure only the other replicas are selected. Then click Save.