Description

This KB article describes the synchronization mechanism for OpenNMS configuration and RRD files between sites when Disaster Recovery (DR) is enabled, helping administrators understand data consistency and failover behavior.

Solution

Below is the way the config/rrd files gets updated between the DR sites when DR is in started/enabled state.

Step 1: On active DR site there will be below cron job which does backup of config and rrd every hour --> at location /var/cache/jmp-geo/backup/data/ (Depend on the DR configuration), you can verify this under crontab using "crontab -l" command. 

0 * * * *  /var/cache/jmp-geo/backup/script/backupReal.sh >> /var/cache/jmp-geo/backup/backup.log 2>&1


Step 2:
 On standby DR site below cron job copy the data from active site to standby --> at locaiton /var/cache/jmp-geo/restore/data/

0 * * * *  /var/cache/jmp-geo/restore/script/poll.sh >> /var/cache/jmp-geo/restore/restore.log 2>&1

Note: These crons run every hour or as per config specified during DR init and it keeps number of backup files based on the config selected during DR init. Only during DR fail-over, when standby site transitions to Active. Latest tgz backup file will get extracted to the required directories.


Example:
Below are the results from the manual-failover performed on the JTAC lab setup, was also inline with above understanding.

Verification on Active DR site

[root@space-005056a9e845 log]# cd /var/opennms/rrd/snmp/137
[root@space-005056a9e845 137]# ll -rth | wc -l
160
[root@space-005056a9e845 137]# cd /opt/opennms/etc
[root@space-005056a9e845 etc]# ll -rth | wc -l
195

Verification on Standby DR site

[root@space-005056a98c22 137]# pwd
/var/opennms/rrd/snmp/137
[root@space-005056a98c22 137]# ll -rth | wc -l
160
[root@space-005056a98c22 137]# cd /opt/opennms/etc
[root@space-005056a98c22 etc]# ll -rth | wc -l
195

Note: Make sure config and rrd files are synchronized. 

Modification History

2024-04-19 : Article Created