Fortinet white logo
Fortinet white logo

CLI Reference

restore config

restore config

Use this command to restore a primary configuration file from a TFTP server.

Back up your configuration before entering this command. For details, see backup.

This procedure can perform large changes to your configuration. If you are downgrading the firmware, this could reset all changes that you have made to the FortiMail unit’s configuration file and revert the system to the default values for the firmware version, including factory default settings for the IP addresses of network interfaces and the admin administrator account password. If the passwords in the configuration file are not in a backwards compatible format, then all administrators and users could be locked out. For emergency recovery in either case, see admin-maintainer {enable | disable} or make a firmware clean install.

Syntax

execute restore config tftp <filename_str> <server_ipv4>

Variable

Description

Default

<filename_str>

If you want to restore a configuration file stored on a TFTP server, enter the name of the configuration file.

<server_ipv4>

If you want to restore a configuration file stored on a TFTP server, enter the IP address of the TFTP server.

Example

This example restores a configuration file from a TFTP server at 172.16.1.5.

execute restore config tftp fml.cfg 172.16.1.5

The CLI displays the following:

This operation will overwrite the current settings!

(The current admin password will be preserved.)

Do you want to continue? (y/n)

After you enter y (yes), the CLI displays the following, then terminates the SSH connection and reboots with the restored configuration:

Connect to tftp server 172.16.1.5 ...

Please wait...

Get config file from tftp server OK.

File check OK.

Related topics

backup

system password-policy

system upgrade-path

restore config

restore config

Use this command to restore a primary configuration file from a TFTP server.

Back up your configuration before entering this command. For details, see backup.

This procedure can perform large changes to your configuration. If you are downgrading the firmware, this could reset all changes that you have made to the FortiMail unit’s configuration file and revert the system to the default values for the firmware version, including factory default settings for the IP addresses of network interfaces and the admin administrator account password. If the passwords in the configuration file are not in a backwards compatible format, then all administrators and users could be locked out. For emergency recovery in either case, see admin-maintainer {enable | disable} or make a firmware clean install.

Syntax

execute restore config tftp <filename_str> <server_ipv4>

Variable

Description

Default

<filename_str>

If you want to restore a configuration file stored on a TFTP server, enter the name of the configuration file.

<server_ipv4>

If you want to restore a configuration file stored on a TFTP server, enter the IP address of the TFTP server.

Example

This example restores a configuration file from a TFTP server at 172.16.1.5.

execute restore config tftp fml.cfg 172.16.1.5

The CLI displays the following:

This operation will overwrite the current settings!

(The current admin password will be preserved.)

Do you want to continue? (y/n)

After you enter y (yes), the CLI displays the following, then terminates the SSH connection and reboots with the restored configuration:

Connect to tftp server 172.16.1.5 ...

Please wait...

Get config file from tftp server OK.

File check OK.

Related topics

backup

system password-policy

system upgrade-path