Back up OpenNMS Meridian

This section describes a basic backup process for a default OpenNMS Meridian installation. OpenNMS Meridian binaries, logs, RRD archives, configurations, and the database will be backed up.

In this example the backup storage path is /tmp for demonstration purposes. Please be aware that /tmp is not persisted, as most operating systems will delete the content at bootup.

Objectives

  • Create backup of OpenNMS Meridian components

  • Create PostgreSQL database backup

  • Able to run a restore without having OpenNMS installation packages available

Requirements

  • System user with administrative permissions (sudo)

  • Database password for opennms and postgres user

Create backup

  • CentOS/RHEL 8

Stop OpenNMS Meridian service
sudo systemctl stop opennms
Back up OpenNMS Meridian binaries, RRD archives, configurations
sudo tar --exclude='/opt/opennms/data/cache' -cvzf /tmp/opennms-opt.tar.gz /opt/opennms && \
sudo tar -cvzf /tmp/opennms-var.tar.gz /var/opennms
Create PostgreSQL database backup
sudo runuser -l postgres -c 'pg_dumpall -f /tmp/opennms-postgres.dmp'
Back up OpenNMS Meridian operating system user
sudo grep opennms /etc/passwd > /tmp/opennms-passwd.txt && \
sudo grep opennms /etc/group > /tmp/opennms-group.txt