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