Backup and Recovery
This section covers the details about the data which needs to be backed up, and how to restore and recover the state of the system in the case of a failure.
Conceptual Explanation and Description
The state of a realm server is stored in the realm's <DataDir> directory. The realm server's state includes:
Configurations
JNDI Naming entries
Stored channel/queue data
Backup
A realm server can be restored from a copy of the realm's <DataDir> directory.
Backup and recovery procedures can vary depending on the type of Universal Messaging deployment and also the recovery requirements. Universal Messaging can be deployed in Active/Passive or Active/Active cluster modes.
Note: In Active/Passive deployment, the active and inactive nodes share the same storage (they point to the same <DataDir> directory), but only one realm server is online at any moment in time. In this case, typically a shared network drive would be used as the <DataDir> directory, so that all the cluster nodes (active as well as inactive) can access the data. In Active/Active deployment, cluster nodes replicate resources among themselves, and maintain the state of the resources across all cluster nodes. Operations such as configuration changes, transactions and store management are orchestrated by the master node. The master node broadcasts the requests to the other cluster nodes to ensure that all the servers are in sync. If a cluster node disconnects and reconnects, all the states and data are recovered from the master node. In this case, the state replication or duplication is achieved by the Universal Messaging server by replicating its state on all the nodes of the cluster. Hence all the cluster nodes can be configured with the <DataDir> directory pointing to their respective local disks (recommended by Software AG). |
Backing up the realm data
Shut down the Universal Messaging realm(s). This is required, as taking a backup of the data directory <DataDir> while the realm is running could result in backed up data being inconsistent/corrupt, thus rendering it useless.
Take the backup of the following folders:
<DataDir>\RealmSpecific, containing realm specific configuration files
<DataDir>\naming, containing JNDI entries
all the files and folders under <DataDir>,
if your recovery requirements demand the channel/queue data to be recovered as well<InstallDir>\UniversalMessaging\server\ <InstanceName>\bin, containing scripts and configuration files (only if they were customized)
In the case of an Active/Active deployment, take the backup of all the above directories for each realm server in the cluster. All the nodes in the cluster need to be backed up in the same time frame. The primary advantage of backing up the contents of the <DataDir> directory of all the realms of a cluster is to retain configuration information which is not synchronized between nodes of the cluster. The following information is not synchronized across the cluster:
Interfaces
SSL Certificate/Truststore
non-clustered resources (queues/channels)
Configured Plugins
Cluster private keys
Server JVM options
Make a baseline the realm configuration by exporting it into a XML representation using either Enterprise Manager or the command line tool.
Command Details
Usage:
runUMTool ExportRealmXML -rname=<rname> -filename=<filename> [optional_args]
Examples:
To export all the information:
runUMTool ExportRealmXML -rname=nsp://localhost:9000
-filename=test.xml -exportall=true (This will export all the information)
To export only some information:
runUMTool ExportRealmXML -rname=nsp://localhost:9000
-filename=test.xml -realms=true -realmconfiguration=true
-channels=true -queues=true
Required arguments:
rname : Connection URL to the realm you want to export.
filename : File name where the information will be exported.
Optional Parameters:
exportall : Export all information for the chosen realm.
username : Your Universal Messaging server username.
password : Your Universal Messaging server password.
This can also be achieved by via Enterprise Manager by right clicking on the realm and selecting 'Export Realm to XML' and checking the box for 'Export All'.
Snapshot the VM
If virtual machines (VM) are in use, taking a periodic snapshots of the VMs will come in useful when the realms have to be rolled back to a known good state. It is preferable to do this when UM is in an offline state as it ensures that all of UM's persisted state is consistent (assuming it's part of the snapshot).
If you are using VM snapshots with UM clustering it is imperative to deploy the infrastructure such that UM cluster communication is isolated from all storage, live migration and other infrastructure management traffic. It is highly recommended that it is on physically separate hardware.
Schedule
Taking regular backups is good practice. In addition to the regular backups, it is advisable to take a backup before making any changes to the realms or before attempting the recovery operations.
Restore/Recover From Realm data backup
Shut down the Universal Messaging realm(s) which are being restored
Delete everything from the realm's <DataDir> directory
Restore the folders under the <DataDir> directory from the backup
<DataDir>\RealmSpecific, containing realm specific configuration files
<DataDir>\naming, containing JNDI entries
all the other folders under <DataDir>,
if your recovery requirements demand the channel/queue data to be recovered as wellRestore the contents of <InstallDir>\UniversalMessaging\server\<InstanceName>\bin from the backup, only if they were customized
Start the realm(s)
Note: For an Active/Active cluster, it may not be required to recover all the nodes of the cluster. Restore only the node which is perceived to be having a problem. If the problem appears to be with the cluster as a whole, then it is necessary that all the nodes of the cluster are shut down (the order of the nodes does not matter) before each node is restored and restarted. All realms should be restored to the backup taken at the same time. |
Important: Always collect the diagnostic data before a realm is recovered. For an Active/Active cluster, the following steps have to be performed for each realm in the cluster: 1. Take a backup of the whole <DataDir> directory 2. Run the 'Realm Information Collector' tool |