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
if you followed my advise from your yesterday's question and used Automation Stitch to run the backup script, you can use variables %%log.date%% and %%log.time%% . The most appropriate triggers would likely be configuration change or schedule.
config system automation-action
set action-type cli-script
set script "config global
exec backup config sftp /<path>/backup_%%log.date%%_%%log.time%%.cfg <server_IP> <username> <password>"
set accprofile "super_admin"
I would highly suggest you to use the GUI wizard for automation stitches if you are not yet familiar with the CLI.
Ok, I'm not sure if this is a bug but I've created two automation tasks. One for capturing the FGT config every night at 12:15a and one that captures changes made during the day and saving them to an FTP server. Nothing fancy.
Run this script on config changes (works as expected):