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

Dynamic name for auto backup, possible?

I want to make automatic backups and send them over ftp with an auto-script.

is it possible to add the date it was made, so the date at which the script is called, to the name of the backup?


the action parameters also didn't help. since they are refering to the previous action, I thought if i use execute date, before the backup, i would be able to get it's output through them. either I don't understand how they work or something with them is wrong. the %%results%% parameter works but %%results.source%%, or anything that calls a parameter within a parameter, does not work. I tried using it in the backup report i send to myselfe per mail.

being able to get the hostname would also be nice then i can just copy the comand without having to change anything.

New Contributor

i found out that if the trigger is "configuration change" you can use to add the date but that only solves it for automaticly making a backup when the config changes not for one that is triggered by a schedule.

New Contributor

based on the findings with the log in case of activation on server event, i found a workaround to add the date to the backupfile name.

but for it to work there can't be any other auto-script that needs to be triggered manualy.

first you need to make an auto-script that does something, doesn't matter what. (I just have it execute date) it is importend that the start is manual. The config for it would look something like this:


config system auto-script

  edit auto-backup-starter

    set interval 1

    set repeat 1

    set start manual

    set script "execute date"




after that you make an automation that triggers on schedule (this schedule decides when and how regulary your backup triggers) that starts the auto-script that you just created. the script would be "execute auto-script start <name of your auto-script>"

then set your backup automation to trigger on system event: auto-script start. from that you can use to get the date for the filename.


the main problem with this method is that you can't have any other auto-scripts that triggers the event auto-script start. note: the event only appers if the script is started with execute auto-script start, meaning if you have a auto-script that is on repeat 0 = infinite it does not interfere with this setup. if you want to make a new auto-script after you set this up, you should disable the backup automation befor starting it. otherwise you will trigger a backup.


i have not found a way to include the Hostname yet.


let's see if someone can find the from forti intended way. I would love to know how they thought to do this as this is a workaround that can trigger for reasons other then the intended. if the schedule trigger would produce a log with date and time all of this wouldn't be necessary.

New Contributor


Did you find a solution to the problem?



Top Kudoed Authors