OpenNMS Migration

Hi Team,
We are planning to migrate our existing Opennms application infra to another server as well as into cloud(In future). Can you please assist us about best practices that we can follow for this activity.

Regards,
Brijesh

We recently published some documentation on backup/restore. Basically you need to migrate the Postgres instance, config files, and collected metrics. The docs below should help.

3 Likes

we are using the above documentation for backup and restore. Our backup is completed successfully and we have copied all files to our newly built server as well, Files are located as below.
image

However when we are following the restore process multiple commands are not running due to command not found OR directory not found. These commands are not supported.
image
kindly advise how to resolve this (We are running on RHEL8 currently)

Use the correct path to your files?

Show the actual error messages, otherwise we’re just guessing.

Hi Dino,

Here is work done from our side.

  1. We have successfully able to take Backup of OpenNMS as per documentation and after taking backup 5 files generated.
    opennms-opt.tar.gz
    opennms-postgres.dmp
    opennms-var.tar.gz
    opennms-group.txt
    opennms-passwd.txt
  2. Backup files are copied under new OpenNMS Server
  3. During Restore Process, We are able to restore user/group definition as per doc.

sudo cat /tmp/opennms-passwd.txt >> /etc/passwd && /
sudo cat /tmp/opennms-group.txt >> /etc/group

  1. During Restore OpenNMS Horizon binaries, RRD archives, configurations we are getting error.Look like command mention in Doc are not supported (we are using RHEL 8 & doc is for Deb & Ubantu)…Also we observe path of file is diff than Backup file name.
    exp: opennms-usr-share.tar.gz ( we just take backup of opennms-opt.tar.gz same for var files)
    sudo tar -xzf /tmp/opennms-usr-share.tar.gz -C / &&
    sudo tar -xzf /tmp/opennms-etc.tar.gz -C / &&
    sudo tar -xzf /tmp/opennms-var-lib.tar.gz -C / &&
    sudo tar -xzf /tmp/opennms-usr-share-java.tar.gz -C /

Is this restore command is correct for RHEL 8 and how these files will be extracted from Backup files we have taken.
opennms-opt.tar.gz
opennms-postgres.dmp
opennms-var.tar.gz
opennms-group.txt
opennms-passwd.txt

Team,

Any suggestion on this.

Regards,
Sumit

Show the actual error messages.

Hi Dino,

All backup files are stored in /TestFiles Directory, but when we are trying to run restore command (as per : Restore OpenNMS Horizon) getting below mention error.

Regards,
Sumit

There is no opennms-usr-share.tar.gz in your ls

Hi Dino,

That is our actual question, how we can export opennms-usr-share.tar.gz from Backup files.
let me share again, what we did so far.

Here is work done from our side.

  1. We have successfully able to take Backup of OpenNMS as per documentation and after taking backup 5 files generated.
    opennms-opt.tar.gz
    opennms-postgres.dmp
    opennms-var.tar.gz
    opennms-group.txt
    opennms-passwd.txt
  2. Backup files are copied under new OpenNMS Server
  3. During Restore Process, We are able to restore user/group definition as per doc.

sudo cat /tmp/opennms-passwd.txt >> /etc/passwd && /
sudo cat /tmp/opennms-group.txt >> /etc/group

  1. During Restore OpenNMS Horizon binaries, RRD archives, configurations we are getting error.Look like command mention in Doc are not supported (we are using RHEL 8 & doc is for Deb & Ubantu)…Also we observe path of file is diff than Backup file name.
    exp: opennms-usr-share.tar.gz ( we just take backup of opennms-opt.tar.gz same for var files)
    sudo tar -xzf /tmp/opennms-usr-share.tar.gz -C / &&
    sudo tar -xzf /tmp/opennms-etc.tar.gz -C / &&
    sudo tar -xzf /tmp/opennms-var-lib.tar.gz -C / &&
    sudo tar -xzf /tmp/opennms-usr-share-java.tar.gz -C /

Is this restore command is correct for RHEL 8 and how these files will be extracted from Backup files we have taken.
opennms-opt.tar.gz
opennms-postgres.dmp
opennms-var.tar.gz
opennms-group.txt
opennms-passwd.txt

Regards,
Sumit

There is no /usr/share/opennms on RHEL-based distros.

I get that this is in the the docs, but this is “how to manage Linux 101” level stuff. You should really consider paid support options if you’re having this much trouble.

I did just identify an issue where the RHEL/Cent instructions for Restoring were not properly linked in the documentation.
The following link is the Cent instructions that will be fixed in the next release of the docs in July.
https://docs.opennms.com/horizon/30/operation/admin/restore/centos-rhel8/restore-centos-rhel8.html

1 Like