Restore OpenNMS Meridian

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

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

Objectives

  • Restore your backup of OpenNMS Meridian components.

  • Install a PostgreSQL database and restore your backup.

  • Install OpenJDK.

  • Create a systemd OpenNMS service unit.

Requirements

  • Backup files you created in Debian Ubuntu.

  • A system user with administrative permissions (sudo).

  • Internet access to download and install OpenJDK and PostgreSQL.

    The PostgreSQL archive repository also hosts older versions.
  • Database password for opennms and postgres user.

Restore backups

  • CentOS/RHEL 8

Restore user/group definition
sudo cat /tmp/opennms-passwd.txt >> /etc/passwd && \
sudo cat /tmp/opennms-group.txt >> /etc/group
Create log folder
sudo mkdir /var/log/opennms && \
chown opennms. /var/log/opennms
Restore OpenNMS Meridian binaries, RRD archives, configurations
sudo tar -xzf /tmp/opennms-opt.tar.gz -C / && \
sudo tar -xzf /tmp/opennms-var.tar.gz -C /
Create OpenNMS systemd unit
sudo cp /opt/opennms/etc/opennms.service /lib/systemd/system/
Assign CAP_NET_RAW capabilities

See Assign CAP_NET_RAW capabilities.

Install PostgreSQL database
sudo dnf -y install postgresql-server postgresql
Change the access policy for PostgreSQL

See change the access policy for PostgreSQL.

Restore OpenNMS database
sudo runuser -l postgres -c 'psql -f /tmp/opennms_postgres.dmp postgres'
Install OpenJDK
sudo dnf -y install java-11-openjdk
sudo /opt/opennms/bin/runjava -s
Run install -dis command
sudo /opt/opennms/bin/install -dis
Firewall configuration

Depending on where OpenNMS gets restored, you need to set the firewall settings again.

Start OpenNMS service
sudo systemctl start opennms