1. Knowledge Base
  2. SecurityGateway™ for Email Servers

How to restore a SecurityGateway database backup, messages, transcripts, and/or archive stores

There are multiple ways restore SecurityGateway. The steps below detail how restore using the SecurityGateway web interface, upload a backup to Security Gateway, and by using Security Gateway's SGDBTool application.

SecurityGateway stores retained attachments, message data, SMTP transcripts, logs, and executable sieve scripts outside of the backup file. 

Regardless of the method used to restore Security Gateway's configuration backup, the following directories will need to be manually restored in order to fully restore Security Gateway.  If these directories are not restored, the server configuration will still be intact, however, the retained messages, SMTP transcripts, logs, attachments, and/or sieve executables will be gone.



To restore Security Gateway's configuration from a previously saved backup:

  1. Log into the SecurityGateway website with a global administrator account.
  2. From the Dashboard, click Setup/Users
  3. Click Database
  4. Click Restore
If the backup exists in the \SecurityGateway\Backup\ directory.
  1. Select the Backup/Export file
  2. Click Restore
  3. Read and Review the disclaimer and click Yes to perform the restore
If the Backup does not exist in the \SecurityGateway\Backup folder, you can upload the FBK backup file to to Security Gateway to perform the restore.
  1. Select Choose File
  2. Select the Backup File
  3. Select Upload Backup File 

Alternatively, Security Gateway has an application called SGDBTool located in the \SecurityGateway\App directory that can be used to restore a previously backed up database or configuration file.

  1. If the Security Gateway service is running, stop the service.
  2. Open a command prompt or powershell instance as administrator.
  3. Use the following syntax to enter the command to restore the backup
    • Enter sgdbtool restore file
      • For example, if the FBK file is called Backup20220927150000.fbk and is located in the C:\SecurityGateway\Backup\ directory and the sgdbtool.exe application exists in the C:\SecurityGateway\App\ directory, then enter the following.
      • C:\SecurityGateway\App\sgdbtool.exe restore C:\SecurityGateway\Backup\Backup20220927150000.fbk
    • Command Prompt/Powershell will output the results of the restore.


Additional Comments

For increased performance, It is recommended to complete a backup and restore at annual intervals to cleanup transactional data.