FortiSIEM
FortiSIEM provides Security Information and Event Management (SIEM) and User and Entity Behavior Analytics (UEBA)
mbenvenuti
Staff
Staff
Article Id 419998
Description This article describes how to reinstall CMDB from scratch and restore data.
Scope FortiSIEM v7.4.1.
Solution

When CMDB is crashing, especially in HA conditions, it may be needed to reset the CMDB from scratch and restore data as follows:

 

  1. Reinstall postgresql service and initiate the database from the super CLI as the root user:

 

dnf reinstall postgresql-16 postgresql16-server postgresql16-contrib postgresql16-libs
/usr/pgsql-16/bin/postgresql-16-setup initdb

 

  1. Install FortiSIEM default database:

 

cd /usr/local/fresh-install/
echo -e "---\n- name: Configure super\n hosts: localhost\n remote_user: root\n roles:\n - setup-database" > /usr/local/fresh-install/db_create.yml
ansible-playbook /usr/local/fresh-install/db_create.yml | tee -a logs/db-re-create.log

 

  1. Identify the archive and restore it:

 

cp /opt/archive/cmdb/phoenixdb_2025-11-15T03-00-01 /tmp
/opt/phoenix/deployment/db_restore.sh /tmp/phoenixdb_2025-11-15T03-00-01

 

  1. Set a default password for the database and configure the Application Server:

 

psql -U phoenix phoenixdb -c "alter user phoenix password 'changeit'"

/opt/phoenix/redis/bin/redis_ops.sh stop
/opt/phoenix/redis/bin/redis_ops.sh start

su admin

cp /opt/glassfish/domains/domain1/config/admin-keyfile /opt/glassfish/domains/domain1/config/admin-keyfile.orig

echo "admin;{SSHA256}UV9EsTaoxzAdtxiNMKTkb3g0WjnoUBEBgpDQIGSdOu8QhprFoWiSCw==;asadmin" > /opt/glassfish/domains/domain1/config/admin-keyfile

killall -9 java

echo "AS_ADMIN_PASSWORD=changeit" > /tmp/glassfish-pwd.txt

echo "AS_ADMIN_ALIASPASSWORD=changeit" >> /tmp/glassfish-pwd.txt

/opt/glassfish/bin/asadmin --user admin --passwordfile /tmp/glassfish-pwd.txt update-password-alias phdbpwd

 

  1. Restore the proper encrypted password:

phLicenseTool --showDatabasePassword <----- Make sure it is a password displayed

glasspwd=$(phLicenseTool --showDatabasePassword)

psql -U phoenix phoenixdb -c "alter user phoenix password '${glasspwd}'"

echo "AS_ADMIN_PASSWORD=changeit" > /tmp/glassfish-pwd.txt

echo "AS_ADMIN_NEWPASSWORD=${glasspwd}" >> /tmp/glassfish-pwd.txt

/opt/glassfish/bin/asadmin --user admin --passwordfile /tmp/glassfish-pwd.txt change-admin-password

echo "AS_ADMIN_PASSWORD=${glasspwd}" > /tmp/glassfish-pwd.txt

echo "AS_ADMIN_ALIASPASSWORD=${glasspwd}" >> /tmp/glassfish-pwd.txt

/opt/glassfish/bin/asadmin --user admin --passwordfile /tmp/glassfish-pwd.txt update-password-alias phdbpwd

/opt/phoenix/phscripts/bin/phRestartAppServer

 

FortiSIEM has started with the data restored.