Fortinet black logo

CLI Reference

backup-restore

backup-restore

Use these commands to back up and restore email users’ mailboxes. The restored mailboxes will be merged with the current mailboxes.

Before using this command, you must first specify the schedule and storage media for backups. For details, see system backup-restore-mail.

Syntax

execute backup-restore all-restore

execute backup-restore check-device

execute backup-restore format-device

execute backup-restore old-restore <full_int> <incremental_int> [domain <domain_name> [user <user_name>]]

execute backup-restore restore {domain <domain_name> [user <user_name>] | host <host_fqdn>}

execute backup-restore start

execute backup-restore stop

Variable

Description

Default

all-restore

Restore mail data without deleting the previous full restore while restoring the incremental backup.

check-device

If you use a USB device for backup, use this command to determine if the device is compatible for use with FortiMail.

format-device

Format the backup device as preparation before a backup.

old-restore
<full_int>
<incremental_int>
[domain <domain_name> [user
<user_name>]]

Restore mail data from a full or incremental backup identified by this FortiMail unit's FQDN, and the number of full and incremental backups. (To restore a backup from another FortiMail or a previous hostname, you must instead use execute backup-restore restore {domain <domain_name> [user <user_name>] | host <host_fqdn>}.)

  • <full_int>: Enter the index number of the full backup. For example, if you make a full backup each month and now have 3 full backups, then a valid value would be either 0, 1, or 2.

  • <incremental_int>: Enter the index number of the incremental backup relative to the full backup. For example, if you make a full backup at the start of the month, and an incremental backup each day of the month in between full backups, then a valid value (depending on how many days are in the month) might be from 0 to 30.

  • <domain_name>: Enter the protected domain to which the mailboxes belong. If not specified, then the mailboxes of all protected domains will be restored.

  • <user_name>: Enter the user name whose mailbox will be restored. If not specified, then the mailboxes of all users will be restored.

For details on how many full and incremental backups are available to select from, see system backup-restore-mail.

restore {domain <domain_name> [user
<user_name>] | host
<host_fqdn>}

Restores mailboxes from the most recent backup. (To restore an older backup, you must instead use execute backup-restore old-restore <full_int> <incremental_int> [domain <domain_name> [user <user_name>]].)

  • <domain_name>: Enter the protected domain to which the mailboxes belong. If not specified, then the mailboxes of all protected domains will be restored.

  • <user_name>: Enter the user name whose mailbox will be restored. If not specified, then the mailboxes of all users will be restored.

  • <host_fqdn>: Enter the FortiMail FQDN (or, if its local domain is not configured, the hostname) that was used to name the backup file. Usually, you enter the FQDN of this same FortiMail unit, but you may enter the FQDN of another FortiMail unit if you want to import mailboxes from it.

    For example, you may be upgrading from FortiMail A to a FortiMail B, and have a backup of the mailboxes from the FortiMail A, fortimail.example.com. On FortiMail B, configure it to also use the same backup storage media, then enter fortimail.example.com in this field to import mailboxes from FortiMail A.

start

Immediately initiate a backup.

Caution: All data on the backup device will be erased.

stop

Stop any currently running backups.

Time required to cancel the backup varies by the backup media, but may be up to 30 seconds.

Related topics

restore config

backup

system backup-restore-mail

backup-restore

Use these commands to back up and restore email users’ mailboxes. The restored mailboxes will be merged with the current mailboxes.

Before using this command, you must first specify the schedule and storage media for backups. For details, see system backup-restore-mail.

Syntax

execute backup-restore all-restore

execute backup-restore check-device

execute backup-restore format-device

execute backup-restore old-restore <full_int> <incremental_int> [domain <domain_name> [user <user_name>]]

execute backup-restore restore {domain <domain_name> [user <user_name>] | host <host_fqdn>}

execute backup-restore start

execute backup-restore stop

Variable

Description

Default

all-restore

Restore mail data without deleting the previous full restore while restoring the incremental backup.

check-device

If you use a USB device for backup, use this command to determine if the device is compatible for use with FortiMail.

format-device

Format the backup device as preparation before a backup.

old-restore
<full_int>
<incremental_int>
[domain <domain_name> [user
<user_name>]]

Restore mail data from a full or incremental backup identified by this FortiMail unit's FQDN, and the number of full and incremental backups. (To restore a backup from another FortiMail or a previous hostname, you must instead use execute backup-restore restore {domain <domain_name> [user <user_name>] | host <host_fqdn>}.)

  • <full_int>: Enter the index number of the full backup. For example, if you make a full backup each month and now have 3 full backups, then a valid value would be either 0, 1, or 2.

  • <incremental_int>: Enter the index number of the incremental backup relative to the full backup. For example, if you make a full backup at the start of the month, and an incremental backup each day of the month in between full backups, then a valid value (depending on how many days are in the month) might be from 0 to 30.

  • <domain_name>: Enter the protected domain to which the mailboxes belong. If not specified, then the mailboxes of all protected domains will be restored.

  • <user_name>: Enter the user name whose mailbox will be restored. If not specified, then the mailboxes of all users will be restored.

For details on how many full and incremental backups are available to select from, see system backup-restore-mail.

restore {domain <domain_name> [user
<user_name>] | host
<host_fqdn>}

Restores mailboxes from the most recent backup. (To restore an older backup, you must instead use execute backup-restore old-restore <full_int> <incremental_int> [domain <domain_name> [user <user_name>]].)

  • <domain_name>: Enter the protected domain to which the mailboxes belong. If not specified, then the mailboxes of all protected domains will be restored.

  • <user_name>: Enter the user name whose mailbox will be restored. If not specified, then the mailboxes of all users will be restored.

  • <host_fqdn>: Enter the FortiMail FQDN (or, if its local domain is not configured, the hostname) that was used to name the backup file. Usually, you enter the FQDN of this same FortiMail unit, but you may enter the FQDN of another FortiMail unit if you want to import mailboxes from it.

    For example, you may be upgrading from FortiMail A to a FortiMail B, and have a backup of the mailboxes from the FortiMail A, fortimail.example.com. On FortiMail B, configure it to also use the same backup storage media, then enter fortimail.example.com in this field to import mailboxes from FortiMail A.

start

Immediately initiate a backup.

Caution: All data on the backup device will be erased.

stop

Stop any currently running backups.

Time required to cancel the backup varies by the backup media, but may be up to 30 seconds.

Related topics

restore config

backup

system backup-restore-mail