FortiClient
FortiClient proactively defends against advanced attacks. Its tight integration with the Security Fabric enables policy-based automation to contain threats and control outbreaks. FortiClient is compatible with Fabric-Ready partners to further strengthen enterprises’ security posture.
btan
Staff
Staff
Article Id 308754
Description

This article describes how to troubleshoot an issue where the EMS database is not restored, but a 'successfully restored' message still appears in the GUI.

Scope EMS 7.0.x and above.
Solution

When restoring the EMS DB, the following process occurs:


apr-kb11.PNG

 

After it completes, EMS redirects the user to the login page:

apr-kb22.PNG

 

Afterwards, EMS may still be in its previous state (before restoration) and may not have restored the actual configuration. For example, certain endpoint profiles/policies are expected, but not present.

 

To verify the issue, follow these steps:

 

  1. After restoring the DB, navigate to C:\Program Files (x86)\Fortinet\FortiClientEMS in the Windows Server.
  2. Run EMSDiagnosticTool.exe to collect EMS_Diagnostic_Result.
  3. Extract the EMS_Diagnostic_Result.
  4. Open the extracted EMS_Diagnostic_Result folder and go to db_import_attempts:

apr-kb33.PNG

 

 

  1. You may find the folder inside is blank:

 


apr-kb44.PNG

 

 

 

  1. Next, go back to the old EMS server (where the DB backup file was taken from), navigate to C:\Program Files\Microsoft SQL Server\MSSQL14.FCEMS\MSSQL\DATA, and check if any of the DB size is over 10GB.

 

 

apr-kb55.PNG

 

 

If FCM_root or FCM_default is over 10GB, the EMS backup cannot be done properly. If this is the case, remediate the issue:

  1. Take a VM snapshot and open a command prompt with administrator privileges, then run the following command to shrink the database size:

 

 

 

sqlcmd -E -S.\fcems -d fcm_root
1> DBCC SHRINKDATABASE(fcm_root,10)
2> go

 

 

 

  1. Afterwards, the FCM_root or FCM_default DB size should be significantly shrunk (below 10GB):

apr-kb66.PNG

 

 
 
  1. Take another new EMS DB backup file from the EMS GUI if desired.

  2. Restore the new EMS DB backup file to the new EMS server if desired. It will restore all of the configuration from the old EMS server.
 
Contributors