Saturday, 16 September 2017

How-to: Create recurring scripts on a FortiGate

Not many people realise that you can create recurring scripts on the FortiGate to run any command you'd like. These can range from rebooting the FortiGate to automating backups to an external server.

In this blog we'll be creating a script to backup the FortiGate's configuration to an external FTP server every day.


config system auto-script
edit daily-backup
set interval 86400 << how often this runs in seconds (86400 is 1 day)
set repeat 0 << repeat forever
set start auto << automatically start it
set script 'execute backup full-config ftp fgt-backup.conf 192.168.1.1 username password'
end