Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
MarioZ
New Contributor II

Automation -> CLI Script: Use date as Part of filename

Hello 
we use automation/cli script to backup the configuration.
How can i use the date in the filename?
Is there a parameter like %%date%%?
So that a backup would look like:
execute backup full-config ftp /Folder/backup_%%date%%.cfg user pwd

thanks for any input.

Regards
Mario

MaZi
MaZi
10 REPLIES 10
rtichkule
Staff
Staff

Hello,

 

Please refer below document to configure the automation stitch for configuration backup.

 

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Adding-date-and-time-in-file-name-for-sche...

 

It won't work if you test the command by typing the command directly into the CLI.

This will generate a file name which is in the command line, however in order to achieve your requirement please configure the parameters in the cli of automation stitch then only the file will be having the date and time. 

Labels
Top Kudoed Authors