Description
This article describes how to restore config file from CLI by using the TFTP server.
Consider backing up the current configuration (using the GUI or CLI commands below) before starting to restore the config file in question, so that the admin can revert to the current status if needed.
execute backup config
execute backup ipsuserdefsig
The first command backs up the configuration and the second one backs up the IPS custom signatures, if any.
Scope
FortiGate.
Solution
On the PC connected to FortiGate, set up the TFTP server by downloading the preferred TFTP server application. In this example, TFTPD64 is used:
TFTPD64 Download Page
Once installed, place the backup config on the 'Current Directory'. Verify it by selecting 'Show Dir'. Next, choose the correct NIC that connects to the FortiGate for 'Server interfaces':
Verify further by pinging the FortiGate and check by using the sniffer:
Commands for restoring the config from TFTP are mentioned below.
execute restore config tftp {string} {Tftp server} {passwd}
{string} <- Configure file name (path) on the remote server.
{Tftp server} <- TFTP server IP.
{passwd} <- TFTP server password.
Find the following example in the CLI:
execute restore config tftp test.conf 10.82.2.2
This operation will overwrite the current setting and could possibly reboot the system!
Do you want to continue? (y/n)y
Please wait...
Connect to TFTP server 10.82.2.2 ...
Get file from TFTP server OK.
File check OK.
test.conf is the config file name, 10.82.2.2 is the IP address of TFTP server which is the PC that connects to FortiGate.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.