Mailtraq - the Complete Email Server

Enstar for Mailtraq email server sales & support
Making world-class Internet technology affordable  

Search for:

Advanced search

KB03041101 Backing up your Mailtraq installation

It is important to have a regular back-up routine for the Mailtraq mail server. If you have a hardware failure or disc corruption, then having a recent backup makes it very easy to be quickly online again.

Note: It is important that any backup regime you use does not attempt to backup any of the Mailtraq files or folders whilst they are live, otherwise data corruption or loss of email can occur. Use one of the methods below to safely backup your installation.

Which database is in use?

The default Database for Mailtraq 2.12 and above is AFX

Older Mailtraq Installations
Mailtraq can be configured to use either of three different database structures: AFV, Firebird SQL or AFX Read more ...

The back-up protocol is different for AFV. Backup instructions for AFV systems are at the bottom of this page

You can confirm which type of data structure you are using by going to
Help | About Mailtraq and looking under the Version number.
If you are using Firebird SQL you will see Firebird SQL/RDBMS.
If you are using AFX you will see AFX Database Engine.

If you see AFV or no entry at all in this position is means that you are using the AFV data stucture.

Interaction with other backup systems

Mailtraq requires exclusive access to its Database, so you will need to exclude the Mailtraq file structure from your normal scheduled back-up routines. You should use one of the two methods described below, and then use your regular software to back-up the secondary location. This folder can then be safely included in your normal corporate backup routines without any potential conflicts with exclusive Database file access.

Backups for data intensive users

Please read the additional advice here ... 


 1.) Recommended method

Online back-up or Live back-up:
Backing up a Mailtraq running under Firebird or AFX




Live or Online back-up is available in Mailtraq Professional from the Options menu, and allows you to back-up Mailtraq whilst it is online or live - without having to shut it down.

The online back-up system copies all messages in the database to a secondary location. In the event of a catastrophic failure, the entire message database can be recovered.
Mailtraq will backup:
     • Message Database
     • Configuration
     • DIS (Address Books)
     • Calendars

For configuration and usage please read: Live Backup

2.) Alternate Method

Copying the Database

This is the method recommended when updating, reinstalling or moving Mailtraq. 


A full backup can be effected on any Mailtraq (AFV, Firebird or AFX database) by shutting down Mailtraq and copying the Database folder to a safe location before restarting Mailtraq.
The default location for this folder is:    C:\Program Files\Mailtraq\database

  1. Shut down
  2. Copy
  3. Restart

A simple batch file containing the following XCOPY based routine - run as a scheduled task - will copy the entire Mailtraq database (including IMAP, WebMail and any other stored messages) to another drive on your network. This is easy to implement, but you must take into account that Mailtraq needs exclusive access to its Database, so Mailtraq needs to be stopped and started.
 You would set this to run at a known quiet time on the network.
 Here is an example of the basis for a batch file which your IT professional could implement for you .

Batch File

In this example, the Mailtraq database folder is copied to a folder previously created on network drive G, called Data\mtqbackup.

Open Windows Notepad, and enter:

     net stop mailtraqserver
     xcopy "C:\Program Files\Mailtraq\database" G:\Data\mtqbackup /E/C/D/F/H/R/K/Y/Z
     net start mailtraqserver

Save the file, say to your Desktop - call it backup.bat
Double-clicking this file will launch the Backup routine on demand.
 You will notice that a number of 'switches' should be set. This is what they do:

/E includes empty directories and subdirectories
/C - Continues copying even if errors occur
/D - This option allows you to update only files that have changed.
/F - Displays full source and destination file names while copying
/H - Copies hidden and system files also
/R - Overwrites read-only files
/K - Copies attributes.
/Y - Overwrites existing files without prompting
/Z - Copies networked files in restartable mode


This folder can then be safely included in your normal corporate backup routines without any potential conflicts with exclusive Database file access.

Mailtraq will be temporarily unavailable to your clients whilst it is shut-down for back up, but no inbound messages will be lost as the SMTP protocol automatically queues messages for later delivery.


This should be set to run daily as a Windows Scheduled task? at a known quiet time on the network.
You should check from time to time that the task has correctly completed.

Should you need to Restore, you simply need to substitute the saved Database folder for the current folder. Mailtraq must be shut down when making the substitution. 

 Back up (Restore) just the Configuration.


Mailtraq provides a Configuration back-up/restore utility from within the Console which will take a backup of the system/user/mailslot/routing settings.

This is normally sufficient if you are using POP3 clients as the mail is not stored within Mailtraq. No shutdown is required.

This utility is found in the Tools menu.



Back-up just the Configuration 'automatically'

An authoritative user has created an easy to install script which can be run at anytime, automatically from within Mailtraq and avoids any potential conflicts with exclusive Database and Log file access.

You will find this simple utility with instructions for use in the Knowledgebase here...


Note: Mailtraq does not support the Volume Shadow Copy Service - VSS?

Keywords: kb ticker general
Mailtraq Highlights...
 SMTP Server     Mailtraq SMTP email server video IMAP Server     Mailtraq IMAP email Server video
 POP3 Server     Mailtraq POP3 email server video Proxy Server     Mailtraq proxy email server video
 Webmail Server     Mailtraq webmail email server video Mailing-list Server     Mailing list email server video
 Groupware Services     Mailtraq groupware email services video Spam and Virus control     Spam and virus control email server video


   Copyright © 2003 - 2011 Enstar Ltd, Enstar LLC & Fastraq Ltd. All rights reserved. Privacy policy.
   Mailtraq® is a registered trademark of Fastraq Limited.