Multiple commands in auto-script / set script-variable

Just a quick note about the auto-script functionality and how to run multiple commands, because this had me stomped on a Monday morning. (Thank you FortiNet for your sparse documentation)

There is no fancy solution, no special new line characters, no encapsulating the commands in quatation marks and separating them by a delimiter or anything like that.
Simple just go the next line without ending the “set script”-variable.

Example below:

FortiGate01 (global) #
FortiGate01 (global) # config system auto-script
FortiGate01 (auto-script) # edit “AutoBackup”
FortiGate01 (AutoBackup) #
FortiGate01 (AutoBackup) # set interval 86400
FortiGate01 (AutoBackup) # set repeat 0
FortiGate01 (AutoBackup) # set script “config global
execute backup full-config ftp FortiGate01-backup 10.200.10.50 fortibackup PASSWORD CRYPTOPW”
FortiGate01 (AutoBackup) # set start auto
FortiGate01 (AutoBackup) # next
FortiGate01 (auto-script) # end
FortiGate01 (global) #

5.00 avg. rating (99% score) - 2 votes

Leave a Reply

Your email address will not be published. Required fields are marked *