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?
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
Also read this page: Live Backup
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
Automatic Backup Schedule allows an appropriate schedule to be configured.
Backup is inactive by default: you must set your own schedule.
The Destination Path allows you to choose your own location for the Backup files. The default location is in
C:\Program Files\Mailtraq\Database
The location should normally be outside the Mailtraq folder structure, so that you can allow it to be safely included in your normal corporate backup routines.
Perform Backup Now allows you to backup on demand.
The Restore-tab allows you to select which Back-up you want to restore from - either local, or from the directory stucture, and which components you want to restore: Message Database, Configuration, DIS (Address Books) and/or Calendars.
Configuration Tips
- It is recommended that the Mailtraq machine is rebooted before running the Restore process.
- Once the Restore process has begun it must not be interrupted.
Mailtraq also provides a Console tool to backup just the Configuration (see below).
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
- Shut down
- Copy
- Restart
Automating
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 .
net stop mailtraqserver
xcopy "C:\Program Files\Mailtraq\database" G:\Data\mtqbackup /E/C/D/F/H/R/K/Y/Z
net start mailtraqserver
The Mailtraq database folder is copied to a folder previously created on network drive G, called Data\mtqbackup with these switches set.
/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.
Restore: 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 on his website: http://www.rdns.org/mailtraq/howto/mtq-bak.zip