How to Get Auto Backup of Fortinet Firewall
To automatically backup the configuration of a Fortinet firewall, you can use the “execute backup” command. This command will save the current configuration to a file, which can be stored locally on the firewall or on a remote server via FTP, SFTP, or SCP.
Here is an example of how to configure the firewall to take a backup every day at midnight and save the file to a remote server using the SCP protocol:
config system global
set admin-scp enable
end
config system schedule
edit "daily-backup"
set day *
set start 0:00
set repeat 1
set repeat-type day
set action "execute backup full-config SCP:backup.conf 192.168.1.100 myuser mypassword"
next
end
This will enable SCP protocol for backup, create a schedule named ‘daily-backup’ that will run everyday at 0:00 am, it will run the command ‘execute backup full-config SCP:backup.conf 192.168.1.100 myuser mypassword’ which will connect to the IP 192.168.1.100 using the username and password provided, and save the config file as “backup.conf” in the remote server.
You can also configure to use other protocols like FTP, SFTP, but the commands may vary accordingly. Please note that the above commands are for FortiOS 6.0 and later versions and the command may vary for different versions.
Also, it is recommended to verify and test the configuration, before applying it in production environment.