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
andpostgres
user.
Restore backups
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
Install PostgreSQL database
sudo dnf -y install postgresql-server postgresql
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
commandsudo /opt/opennms/bin/install -dis
Firewall configuration
Depending on where OpenNMS gets restored, you need to set the firewall settings again.
See firewall settings and firewall core. firewall.
Start OpenNMS service
sudo systemctl start opennms