I have added an automation feature to automatically back up my FortiGate firewalls every night. I would like to include a time stamp in the file name but so far I have not been able to get that to work. This is the filename I am assigning through the execute backup script: daily-backup_%%log.devname%%_%%log.date%%_%%log.time%%.conf
The variable %%log.time%% does not work. If that variable is included in the script my filename looks something like this, 1WSIAF~2, with no file extension or any of the other file name elements. I have tried to use %%time%% but that does not work either.
Is adding a time stamp through this script impossible?
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
I may have answered my own question. I continued to test and decided to send the log file to myself in an email so I could see all of the data included. The log file does in fact have a time element included, but the format is in military time with colons - 19:25:58. Since a colon is not an allowed character for a Windows filename, I believe that is what's causing the problem.
I wonder if I can have the time stamp formatted differently in that log file?
Hello shspivey,
You can try to add a date at your filename as per below and let me know if this helps.
execute backup config sftp /fgt-backup%%date%%.conf 1.1.1.1 sftp-username sftp-password encryption-password
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 |
---|---|
1669 | |
1082 | |
752 | |
446 | |
224 |
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 2024 Fortinet, Inc. All Rights Reserved.