[[restore-centos-rhel8]]
.Restore user/group definition

[source, console]
----
sudo cat /tmp/opennms-passwd.txt >> /etc/passwd && \
sudo cat /tmp/opennms-group.txt >> /etc/group
----

.Create log folder
[source, console]
----
sudo mkdir /var/log/opennms && \
chown opennms. /var/log/opennms
----

.Restore OpenNMS {page-component-title} binaries, RRD archives, configurations

[source, console]
----
sudo tar -xzf /tmp/opennms-opt.tar.gz -C / && \
sudo tar -xzf /tmp/opennms-var.tar.gz -C /
----

.Create OpenNMS systemd unit
[source, console]
----
sudo cp /opt/opennms/etc/opennms.service /lib/systemd/system/
----

._Assign CAP_NET_RAW capabilities_

See xref:deployment:core/centos/initialize-core.adoc#initialize-core-cap[Assign CAP_NET_RAW capabilities].

.Install PostgreSQL database
[source, console]
----
sudo dnf -y install postgresql-server postgresql
----

.Change the access policy for PostgreSQL

See xref:deployment:core/centos-rhel8/postgresql.adoc#core-centos-rhel8-pg_hba[change the access policy for PostgreSQL].

.Restore OpenNMS database
[source, console]
----
sudo runuser -l postgres -c 'psql -f /tmp/opennms_postgres.dmp postgres'
----

.Install OpenJDK
[source, console]
----
sudo dnf -y install java-21-openjdk
sudo /opt/opennms/bin/runjava -s
----

.Run `install -dis` command
[source, console]
----
sudo /opt/opennms/bin/install -dis
----

.Firewall configuration

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

See xref:deployment:core/centos/initialize-core.adoc#initialize-core-firewall[firewall settings] and xref:deployment:core/centos/firewall-core.adoc[firewall core].
xref:deployment:core/centos/firewall-core.adoc[firewall].

.Start OpenNMS service
[source, console]
----
sudo systemctl start opennms
----
