Created on 06-28-2024 05:28 AM Edited on 10-04-2024 02:41 AM By Anthony_E
Description | This article describes how to migrate all the data from a FortiSIEM to another machine. |
Scope | FortiSIEM. |
Solution |
When there are issues with an initial FortiSIEM machine, the appliance has been replaced because of hardware issues or other reasons, it is necessary to migrate all the data from the original machine to the new one.
Follow the next steps to migrate all the data:
Example from new (or targeted) FortiSIEM CLI:
rsync -az root@ORIGINAL_FortiSIEM_IP:/data/archive/cmdb/phoenixdb_202X-XX-XXTXX-XX-XX /tmp
Stop all the services except the database service from the targeted FortiSIEM:
systemctl stop phxctl.service phxctl stop Stopping phoenix ... systemctl start postgresql-13
Run the restoration command (this may take some time along the amount of data) :
/opt/phoenix/deployment/db_restore.sh /tmp/phoenixdb_202X-XX-XXTXX-XX-XX Restore database phoenixdb from /tmp/phoenixdb_202X-XX-XXTXX-XX-XX ... Successfully restored phoenixdb from /tmp/phoenixdb_202X-XX-XXTXX-XX-XX
Upgrade the CMDB version (optional steps, follow this only if the FortiSIEM target is on the upper version):
tablelist=`psql -U phoenix phoenixdb -At -c "select tablename from pg_catalog.pg_tables where tablename like 'ph_malware_%';" | tr '\n' ',' | sed 's#,$##g'` threeMonthsAgo=`date -d '-90 day' +"%s000"` sh /opt/phoenix/deployment/db_upgrade.sh /tmp | tee -a /tmp/db_migration.log rm -rf /opt/phoenix/cache/REPLACE_BY_IP_OF_THE_SUPER /opt/glassfish/domains/domain1/generated/ /opt/glassfish/domains/domain1/osgi-cache/
Update the hardware ID:
hardware_id=`phgetUUID`
Update the IP address if it is not the same as the original FortiSIEM:
new_ip='type_your_new_ip_here'
Restore SVN:
rsync -az root@ORIGINAL_FortiSIEM_IP:/svn/ /svn
Reset service and database password:
systemctl start phxctl.service phxctl start curl -u "super/admin:XXXXXXXX" -XPUT -k https://localhost/phoenix/rest/custMgmt/service/changePwd
If curl and/or phtools commands are rejecting an 403 error code, upload the license at:
https://super_ip/phoenix/licenseUpload.jsf
At this stage, most of the ph services should be running except phRule processes where database password update will fix it with next commands:
db_password=`phLicenseTool --showDatabasePassword` psql -U phoenix phoenixdb -c "alter user phoenix password '$db_password'" reboot
From that moment, FortiSIEM can be used and receive new events.
nohup rsync -az --progress root@ORIGINAL_FortiSIEM_IP:/data/eventdb/ /data/eventdb > /tmp/transfered_files.txt 2>&1 &
Follow the transfer with this command:
tail -f /tmp/transfered_files.txt |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.