---
title: How to restore a SecurityGateway database backup, messages, transcripts, and/or archive stores
description: 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.
---

[Skip to content](https://knowledge.mdaemon.com/how-to-restore-securitygateway#main-content)

[![](https://knowledge.mdaemon.com/hs-fs/hubfs/MDaemon-Technologies_logo.png?width=200&height=150&name=MDaemon-Technologies_logo.png)](https://mdaemon.com/)

- [Knowledge Base Home](https://knowledge.mdaemon.com/)
- [Go to www.mdaemon.com](https://mdaemon.com/)

Open main navigation

Close main navigation

- [Knowledge Base Home](https://knowledge.mdaemon.com/)
- [Go to www.mdaemon.com](https://mdaemon.com/)
- [Contact Us](https://mdaemon.com/pages/contact-us)

[Contact Us](https://mdaemon.com/pages/contact-us)

 Knowledge Base

- There are no suggestions because the search field is empty.

1. [Knowledge Base Home](https://knowledge.mdaemon.com/?hsLang=en)
2. [SecurityGateway for Email Servers](https://knowledge.mdaemon.com/securitygateway-for-email-servers?hsLang=en)

# 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.

\\SecurityGateway\\Messages\\  
\\SecurityGateway\\Transcripts\\  
\\SecurityGateway\\Attachments\\  
\\SecurityGateway\\Logs\\  
\\SecurityGateway\\SieveExecute\\

 

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  
   ![sg\_restore\_backup\_1](https://knowledge.mdaemon.com/hs-fs/hubfs/KBAs/sg_restore_backup_1.png?width=688&name=sg_restore_backup_1.png)
2. Click Restore
3. Read and Review the disclaimer and click Yes to perform the restore  
   ![sg\_restore\_backup\_2](https://knowledge.mdaemon.com/hs-fs/hubfs/KBAs/sg_restore_backup_2.png?width=684&name=sg_restore_backup_2.png)

 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   
   ![security\_gateway\_upload\_backup](https://knowledge.mdaemon.com/hs-fs/hubfs/KBAs/security_gateway_upload_backup.png?width=552&name=security_gateway_upload_backup.png)

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.  
       ![sgdbtool\_restore](https://knowledge.mdaemon.com/hs-fs/hubfs/KBAs/sgdbtool_restore.png?width=687&name=sgdbtool_restore.png)

 

**Additional Comments**

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

- [MDaemon Email Server](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en#main-content)

    - [Mobile Device Management](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en#mobile-device-management)
- [MDaemon AntiVirus (SecurityPlus)](https://knowledge.mdaemon.com/mdaemon-antivirus-securityplus?hsLang=en)
- [ActiveSync for MDaemon](https://knowledge.mdaemon.com/activesync-for-mdaemon?hsLang=en)
- [MDaemon Connector for Outlook (Outlook Connector)](https://knowledge.mdaemon.com/mdaemon-connector-for-outlook-outlook-connector?hsLang=en)
- [SecurityGateway for Email Servers](https://knowledge.mdaemon.com/securitygateway-for-email-servers?hsLang=en)
- [RelayFax Network Software](https://knowledge.mdaemon.com/relayfax-network-software?hsLang=en)

[![Chill listening crop-3](https://knowledge.mdaemon.com/hs-fs/hubfs/belch.io/template-assets/MDaemon-Technologies_logo.png?width=199&height=41&name=MDaemon-Technologies_logo.png "Chill listening crop-3")](https://www.mdaemon.com)

[Knowledge Base Home](https://knowledge.mdaemon.com?hsLang=en)

<https://www.youtube.com/c/MDaemonTechnologies> <https://www.linkedin.com/company/mdaemon-technologies/> <https://www.facebook.com/MDaemon.Technologies/> <https://www.twitter.com/MDaemon_Email>

Copyright © 2025, MDaemon Technologies