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.
mle2802
Staff
Staff
Article Id 278925
Description

This article describes the method to add device name and serial number to automatic backup filename.

Scope FortiGate.
Solution

Automatic backups can be configured in FortiGate using the 'Automation Stitch' function.

For step-by-step instruction on how to configure automatic backup with automation stitch, refer to Technical Tip: How to send automated backups of the configuration from a FortiGate with an automatio....

To add a device name and serial number to the name of the backup config file, use the following two variables (do not replace log.devid and log.devname with a name manually:(

  • %%log.devid%% (device serial number).
  • %%log.devname%% (device hostname).

 

Example script:

 

execute backup config ftp %%log.devid%%_%%log.devname%%_backup.conf 10.10.10.5 testuser testpassword

 

config system automation-action

edit "Config_Backup"

set action-type cli-script
set script "exe backup config ftp backup_%%log.devname%%_%%log.date%%_%%log.time%%.conf x.x.x.x user-name password"
set execute-security-fabric enable -> Enable/disable execution of CLI script on all or only one FortiGate unit in the Security Fabric.
set accprofile "super_admin"

next

end

set execute-security-fabric

 

After the automation triggers, the backup config file will have the device name and serial number:

 

backupwithname.PNG