Using the CLI : Tips & tricks : Editing the configuration file in a text editor
Editing the configuration file in a text editor
Editing the configuration file with a plain text editor can be time-saving if:
you have many changes to make,
are not sure where the setting is in the CLI, and/or
own several FortiADC appliances
This is true especially if your plain text editor provides advanced features such as regular expressions for find-and-replace, or batch changes across multiple files. Several free text editors are available with these features, such as Text Wrangler and Notepad++.
Do not use a rich text editor such as Microsoft Word. Rich text editors insert special characters into the file in order to apply formatting, which may corrupt the configuration file.
To edit the configuration on your computer
1. Use execute backup to download the configuration file to a TFTP server, such as your management computer.
2. Edit the configuration file using a plain text editor that supports Unix-style line endings.
Do not edit the first line. The first lines of the configuration file (preceded by a # character) contains information about the firmware version and FortiADC model. If you change the model number, the FortiADC appliance will reject the configuration file when you attempt to restore it.
3. Use execute restore to upload the modified configuration file back to the FortiADC system.
The system downloads the configuration file and checks that the model information is correct. If it is, it loads the configuration file and checks each command for errors. If a command is invalid, the system ignores the command. If the configuration file is valid, it restarts and loads the new configuration.