Skip to main content
edgar1
Staff
Staff
March 3, 2023

Technical Tip: Backup script is not working with the timestamp using automation-stitch

  • March 3, 2023
  • 0 replies
  • 1870 views
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

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!