FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
jsarah
Staff
Staff
Article Id 382693
Description

This article describes why users face issues in saving backup files when the name has a timestamp present in it.

Scope FortiGate v7.
Solution

If the command 'execute backup full-config sftp GSF-70F_%%log.date%%_%%log.time%%.cfg', is used. the file name should be saved as 'GSS-70F_2025-03-17_17:27:48.cfg', as per customer expectation.

 

However, Windows machines and the FAT32 file system, do not support the ':', character as the file name.

 

Hence the file will not be saved. Thus failing the automation-script. This is not a FortiGate issue but a third-party limitation.

 

This issue is observed on FortiOS v7.2.4.

 

Some servers analyze %%time%% or %%log.time%% as a bad character in the title.

 

As a workaround, instead of '%%log.time%% use %%log.eventtime%%' in the automation script, the file will be saved as 'GSF-70F_2025-03-17_1742196468826326219.cfg'.

 

This is a UNIX nanosecond format and can be converted to a human-readable format using the following third-party tool: https://www.epochconverter.com/.

 

The following is the result:

 

1742196468826326219
Timestamp to Human date [batch convert]
Supports Unix timestamps in seconds, milliseconds, microseconds and nanoseconds.
Assuming that this timestamp is in nanoseconds (1 billionth of a second):
GMT: Monday, March 17, 2025 7:27:48.826 AM
Your time zone: Monday, March 17, 2025 12:57:48.826 PM GMT+05:30

 

However, the issue will not be faced if the target device is Linux because in Linux, the ':' character is supported as the filename.

 

Only the configuration file name with a variable date will be saved because the Windows FTP server will not let file saves with ':' in them for automation stitch with changeable date and time due to Windows constraints.