FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
edgar1
Staff
Staff
Article Id 247170
Description This article describes that the backup script is not working with the timestamp using automation-stitch.
Scope

Automation-stitch did not execute the backup and the timestamp properly:

 

                  edgar1_6-1677291093377.png

 

# config system automation-action

    edit "BACKUP"
        set action-type cli-script
        set script "execute backup full-config ftp /FGT/FGT_%%date%%-%%time%%.conf x.x.x.x  ftpuser  password"
        set execute-security-fabric enable
        set accprofile "super_admin"
    next

Solution

This issue is related to FortiGate having the VDOM enabled and it is necessary to add a line script to work properly:

 

# config system automation-action
    edit "BACKUP"
        set action-type cli-script
        set script "config global <----- Add this line.

 

# execute backup full-config ftp /FGT/FGT_%%date%%-%%time%%.conf x.x.x.x  ftpuser  password"
    set execute-security-fabric enable
    set accprofile "super_admin"
next

Contributors