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.
i found out that if the trigger is "configuration change" you can use %%log.date%% 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.
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"
next
end
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 %%log.date%% 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.
Hi,
Did you find a solution to the problem?
Regards
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1749 | |
1114 | |
765 | |
447 | |
241 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.