Fortinet black logo

CLI Reference

cfg save

cfg save

Use this command to save configuration changes when the configuration change mode is manual or revert. If the mode is automatic, the default, all changes are added to the saved configuration as you make them and this command has no effect. The set cfg-save command in system global sets the configuration change mode.

In manual mode, commands take effect but do not become part of the saved configuration unless you execute the execute cfg save command. When the FortiGate unit restarts, the saved configuration is loaded. Configuration changes that were not saved are lost.

The revert mode is similar to manual mode, except that configuration changes are reverted automatically if the administrative session is idle for more than a specified timeout period. This provides a way to recover from an erroneous configuration change, such as changing the IP address of the interface you are using for administration. To change the timeout from the default of 600 seconds, go to system global and use the set cfg-revert-timeout command.

Syntax

execute cfg save  Save configs.

Example

This is sample output from the command:

# execute cfg save

config saved.

This is sample output when not in runtime-only configuration mode. It also occurs when in runtime-only configuration mode and no changes have been made:

# execute cfg save

no config to be saved.

cfg save

Use this command to save configuration changes when the configuration change mode is manual or revert. If the mode is automatic, the default, all changes are added to the saved configuration as you make them and this command has no effect. The set cfg-save command in system global sets the configuration change mode.

In manual mode, commands take effect but do not become part of the saved configuration unless you execute the execute cfg save command. When the FortiGate unit restarts, the saved configuration is loaded. Configuration changes that were not saved are lost.

The revert mode is similar to manual mode, except that configuration changes are reverted automatically if the administrative session is idle for more than a specified timeout period. This provides a way to recover from an erroneous configuration change, such as changing the IP address of the interface you are using for administration. To change the timeout from the default of 600 seconds, go to system global and use the set cfg-revert-timeout command.

Syntax

execute cfg save  Save configs.

Example

This is sample output from the command:

# execute cfg save

config saved.

This is sample output when not in runtime-only configuration mode. It also occurs when in runtime-only configuration mode and no changes have been made:

# execute cfg save

no config to be saved.