Fortinet black logo

CLI reference

execute restore config

execute restore config

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

Caution

Back up your configuration before using this command. This command makes major changes to your configuration. If you are downgrading the firmware, this procedure resets all changes you have made to the FortiNDR configuration file and reverts the system to the default values for that firmware version, including factory default settings for the IP addresses of network interfaces. For information on creating a backup, see the FortiAI Administration Guide in the Fortinet Document Library.

Caution

Unlike installing firmware via TFTP during a boot interrupt, installing firmware using this command will attempt to preserve settings and files, and not necessarily restore the FortiNDR unit to its firmware/factory default configuration. For information on installing firmware via TFTP boot interrupt, see the FortiNDR Administration Guide.

Syntax

execute restore config {disk <filename> | ftp <file name> <server_ipv4> | scp <file name> <server_ipv4> | tftp <file name> <server_ipv4>}

Variable

Description

Default

<filename_str>

Name of the configuration file you want to restore from the TFTP server.

<server_ipv4>

IP address of the TFTP server where the configuration file is stored.

management-station {normal | template}

If you want to restore a configuration file or apply a template stored in FortiManager, enter the management-station and then enter either:

normal: Restore a configuration revision number.

template: Apply a template revision number.

<revision_int>

If you want to restore a configuration file or apply a template stored in FortiManager, enter the revision number of the configuration file or template.

Example 1

This example restores configuration file revision 2 which is stored in FortiManager.

execute restore config management-station normal 2

The CLI displays the following:

This operation will overwrite the current settings!

Do you want to continue? (y/n)

After you enter y (yes), the CLI displays the following:

Connect to FortiManager ...

Please wait...

Example 2

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.

execute restore config

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

Caution

Back up your configuration before using this command. This command makes major changes to your configuration. If you are downgrading the firmware, this procedure resets all changes you have made to the FortiNDR configuration file and reverts the system to the default values for that firmware version, including factory default settings for the IP addresses of network interfaces. For information on creating a backup, see the FortiAI Administration Guide in the Fortinet Document Library.

Caution

Unlike installing firmware via TFTP during a boot interrupt, installing firmware using this command will attempt to preserve settings and files, and not necessarily restore the FortiNDR unit to its firmware/factory default configuration. For information on installing firmware via TFTP boot interrupt, see the FortiNDR Administration Guide.

Syntax

execute restore config {disk <filename> | ftp <file name> <server_ipv4> | scp <file name> <server_ipv4> | tftp <file name> <server_ipv4>}

Variable

Description

Default

<filename_str>

Name of the configuration file you want to restore from the TFTP server.

<server_ipv4>

IP address of the TFTP server where the configuration file is stored.

management-station {normal | template}

If you want to restore a configuration file or apply a template stored in FortiManager, enter the management-station and then enter either:

normal: Restore a configuration revision number.

template: Apply a template revision number.

<revision_int>

If you want to restore a configuration file or apply a template stored in FortiManager, enter the revision number of the configuration file or template.

Example 1

This example restores configuration file revision 2 which is stored in FortiManager.

execute restore config management-station normal 2

The CLI displays the following:

This operation will overwrite the current settings!

Do you want to continue? (y/n)

After you enter y (yes), the CLI displays the following:

Connect to FortiManager ...

Please wait...

Example 2

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.