Backing up and restoring the mailboxes
The Maintenance > System > Mail Data tab lets you back and restore all mail data, including system quarantine, email users’ personal quarantines, user preferences, archived email, and server mode webmail mailboxes. (See also “Selecting the mail data storage location” on page 376.) You can also monitor the status of any backup or restoration that is currently in progress.
You can only back up mail data when you store the data locally on the FortiMail hard disk. If you store the mail data on a NAS device, you cannot back up the data. For information about selecting a storage device, see “Selecting the mail data storage location” on page 376.
This section contains the following topics:
- Viewing the mailbox backup/restoration status
- Configuring mailbox backups
- Restoring mailboxes from backups
Viewing the mailbox backup/restoration status
Go to Maintenance > System > Mail Data to view the progress if you are backing up or restoring mail data.
If backup and restoration are enabled, the appearance of this tab varies by:
- whether the FortiMail unit is currently backing up or restoring mailboxes
- whether the FortiMail unit has previously backed up or restored any mailboxes
- whether the previous backup or restoration attempt was successful
Figure 89:Backup or restoration status (idle; no previous restoration)
Figure 90:Backup or restoration status (backup in progress)
Figure 91:Backup or restoration status (restoration in progress)
Table 21:Backing up and restoring mailboxes from Maintenance > System > Mail Data
GUI item | Description |
Automatically refresh interval | Select the interval in seconds to set how often the web UI automatically refreshes its display of this tab. |
Refresh
(button) |
Click to manually refresh the tab’s display. |
Status | Indicates the current activity of mailbox data backup or restoration. If backup and restoration are currently disabled, the Status area of the Mail Data tab displays the message:
Backup/Restore is currently disabled. To enable mailbox backups, see “Configuring mailbox backups” on page 227. |
GUI item | Description | |
State | Displays he current mailbox backup or restoration status, one of:
• IDLE: No backup or restoration is currently occurring. To begin a backup, at the bottom of the status section, click Click here to start a backup. To begin a restoration, in the Restore options section, click Restore. • BACKING UP: The FortiMail unit is currently creating a backup copy of the mailboxes to the backup media configured in “Configuring mailbox backups” on page 227. • RESTORING: The FortiMail unit is currently restoring a backup copy of the mailboxes from the backup media configured in “Configuring mailbox backups” on page 227. • STOPPING: You have cancelled a backup or restoration that was in progress, and the FortiMail unit is halting the backup or restoration process. • CHECKING: The FortiMail unit is currently checking the file system integrity of the backup media. This state occurs only if you have configured a block-level backup media (either a USB disk or iSCSI server) in “Configuring mailbox backups” on page 227. • FORMATTING: The FortiMail unit is currently formatting the file system of the backup media. This state occurs only if you have configured a block-level backup media (either a USB disk or iSCSI server) in “Configuring mailbox backups” on page 227. If after some time the progress remains at 0%, or eventually silently reverts to an IDLE state without the backup or restoration having finished, the operation has failed. Verify connectivity with the backup media (this is especially true with NFS, SSH, and iSCSI backup methods, where network connectivity issues can cause the FortiMail’s attempt to mount the backup file system to fail). Also verify that you have configured the backup media correctly in “Configuring mailbox backups” on page 227 and configured the restoration item correctly in “Restoring mailboxes from backups” on page 230. Note: If a backup or restoration has failed, you may need to reboot the FortiMail unit before you can try again. |
|
Objects
Copied (Total) |
Indicates the number of files transferred to or from the backup media so far, and the total amount that will be transferred when the backup or restoration is complete. | |
Bytes Copied (Total) | Indicates the number of bytes of data transferred to or from the backup media so far, and the total amount that will be transferred when the backup or restoration is complete. |
GUI item | Description | |
Percentage Complete | Indicates the percentage of bytes of data transferred to or from the backup media so far.
If after some time the progress remains at 0%, or eventually silently reverts to an IDLE state without the backup or restoration having finished, the operation has failed. Verify connectivity with the backup media (this is especially true with NFS, SSH, and iSCSI backup methods, where network connectivity issues can cause the FortiMail’s attempt to mount the backup file system to fail). Also verify that you have configured the backup media correctly in “Configuring mailbox backups” on page 227 and configured the restoration item correctly in “Restoring mailboxes from backups” on page 230. |
|
Status | Indicates the step of the backup or restoration that is currently occurring, such as OK (stopping file systems). | |
Total number of errors is | Indicates the number of errors that occurred during the previous backup attempt. If any errors occurred, they may also be individually listed.
For example, if the backup media is an NFS server, and the NFS share could not be mounted, such as if the FortiMail unit could not contact the NFS server or did not have permissions to access the share, an error message similar to the following would appear: failed to mount archive filesystem [protocol=nfs,host=192.168.1.10,port=2049,directory=/ home/fortimail] stopped, waiting for requested shutdown watch dog stopped, killing backup process This field appears only if the previous backup attempt was not successful. |
|
Last Backup | Indicates the date and time of the previous backup attempt. If a backup has not yet occurred, this field displays the message, No backup has been run. | |
Last
Restore |
Indicates the date and time of the previous restoration attempt. If a restoration has not yet occurred, this field is empty. | |
Click here to start a backup | Click to manually initiate an immediate mailbox backup to the media configured in “Configuring mailbox backups” on page 227. Time required to complete a backup varies by the size of the backup and the speed of your network connection, and also by whether the backup is a full or incremental backup.
Alternatively, you can schedule the FortiMail unit to automatically back up the mailboxes. For details, see “Configuring mailbox backups” on page 227. This link does not appear if a backup or restoration is currently in progress. |
Configuring mailbox backups
Use the Backup Options area of the Mail Data tab to configure which backup media to use when you back up or restore email users’ mailboxes. You can also configure the schedule the FortiMail unit uses to automatically perform backups.
You can only back up mail data when you store the data locally on the FortiMail hard disk. If you store the mail data on a NAS device, you cannot back up the data. For information about selecting a storage device, see “Selecting the mail data storage location” on page 376.
GUI item | Description |
Click here to format backup device | If you use a USB device for backup, use this link to format the device for use with FortiMail. |
Click here to check file system on backup device | If you use a USB device for backup, use this link to determine if the device is compatible for use with FortiMail. |
Click here to stop the current backup | Click to cancel a backup that is currently in progress.
Time required to cancel the backup varies by the backup media, but may be up to 30 seconds. This link appears only if a backup is currently in progress. |
Click here to stop the current restore | Click to cancel a restore that is currently in progress.
Time required to cancel the restore varies by the restore media, but may be up to 30 seconds. This link appears only if a restore is currently in progress. |
While a backup or restoration is occurring, you cannot change the configuration of this area, and this area will display the message:
Backup/Restore is busy, no configuration changes can be made.
However, you can view the status of the backup or restoration to determine if there are any errors. You can also manually initiate an immediate backup if the backup media was unavailable at the time of a previously scheduled backup. For details, see “Backing up and restoring the mailboxes” on page 222.
Before you can manually initiate a backup, or in order to configure automatic scheduled backups, you must first enable backups and configure the backup media.
To configure backups
- Go to Maintenance > System > Mail Data.
Figure 92:Backup Options section of Mail Data tab
- Configure the following in the Backup Options section:
GUI item | Description |
Enabled | Mark this check box, configure all other options in this area, then click Apply to enable backups and restoration of email users’ mailboxes. |
Copies to save | Select a number for both:
• Full: The total number of full backups to keep on the backup device. • Incremental: The number of incremental backups to make between each full backup. Incremental backups can reduce the amount of time and disk space required for each backup, but may increase the amount of time required to restore the backup, and depend on a previous full backup, because incremental backups only contain the differences since the previous full backup. For the initial backup, whether manually or automatically initiated, the FortiMail unit will make a full backup. For subsequent backups, the FortiMail unit will make the number of incremental backups that you set in Incremental, then make another full backup, and repeat this until it reaches the maximum number of full backups to keep on the backup media, which you selected in Full. At that point, it will overwrite the oldest full backup. For example, if Full is 3 and Incremental is 4, the FortiMail unit would make a full backup, then 4 incremental backups. It would repeat this two more times for a total of 3 backup sets, and then overwrite the oldest full backup when creating the next backup. |
GUI item | Description | |
Schedule | The Schedule options are disabled if Protocol is External USB (auto detect). | |
Day | Select either:
• None: Disable scheduled backups. • A day of the week: Enable scheduled backups, and select which day of the week that the FortiMail unit will automatically back up email users’ mailboxes to the backup media. Also configure Hour. To minimize performance impacts, consider scheduling backups during a time of the day and day of the week when email traffic volume is typically low, such as at night on the weekend. Regardless of whether or not scheduled backups are enabled, you can manually initiate backups. For details, see “Backing up and restoring the mailboxes” on page 222. |
|
Hour | Select which time on the day that you selected in Day that the FortiMail unit will automatically back up email users’ mailboxes to the backup media.
To minimize performance impacts, consider scheduling backups during a time of the day and day of the week when email traffic volume is typically low, such as at night on the weekend. If the backup media is not available when the backup is scheduled to occur, the FortiMail unit will re-attempt the backup at the next scheduled time. This option is not available if Day is None. |
|
Device | ||
Protocol | Select one of the following types of backup media:
• NFS: A network file system (NFS) server. • SMB/Windows Server: A Windows-style file share. • SSH File System: A server that supports secure shell (SSH) connections. • External USB Device: An external hard drive connected to the FortiMail unit’s USB port. • External USB Device (auto detect): An external disk connected to the FortiMail unit’s USB port. Unlike the previous option, this option only creates a backup when you connect the USB disk, or when you manually initiate a backup using “Backing up and restoring the mailboxes” on page 222, rather than according to a schedule. • ISCSI Server: An Internet SCSI (Small Computer System Interface), also called iSCSI, server. |
|
The availability of the following options varies with the device chosen. | ||
GUI item | Description | |
Username | Enter the user name of the FortiMail unit’s account on the backup server. | |
Domain | If you choose SMB/Windows Server as the backup media AND if the account name has a domain part, you must enter the domain name as well. | |
Password | Enter the password of the FortiMail unit’s account on the backup server. | |
Hostname/IP address | Enter the IP address or fully qualified domain name (FQDN) of the NFS, Windows, SSH, or iSCSI server. | |
Port | Enter the TCP port number on which the backup server listens for connections. | |
Directory | Enter the path of the folder on the backup server where the FortiMail unit will store the mailbox backups, such as:
/home/fortimail/mailboxbackups Note: Do not use special characters such as a tilde ( ~ ). Special characters will cause the backup to fail. |
|
Share | Enter the path of the folder on the backup server where the FortiMail unit will store the mailbox backups, such as:
FortiMailMailboxBackups Note: Do NOT type / before the path name. FortiMail v5.0 release supports both forward slash (/) and backslash (\) in the path name, while FortiMail v4.0 release only supports forward slash (/). |
|
Encryption key | Enter the key that will be used to encrypt data stored on the backup media. Valid key lengths are between 6 and 64 single-byte characters. | |
ISCSI ID | Enter the iSCSI identifier in the format expected by the iSCSI server, such as an iSCSI Qualified Name (IQN), Extended Unique Identifier (EUI), or T11 Network Address Authority (NAA). |