Description |
This article describes the issue when automation action is not working caused of command failure.
Using the built-in automation feature of FortiGate to back up the configuration file, create a CLI script command within the action to verify that the command can correctly execute the backup command to the specified path. In the process of creating Action (CLI Script) → Trigger (Schedule) → Stitch for a FortiGate, the backup file is not generated correctly. |
Scope | FortiGate 7.2. |
Solution |
Through the debug commands below to check the details of the automation process.
diag debug reset
Output:
2024-08-09 09:36:11 pid:306-__handle_msg()-414: Subscriber:4 received package. pubid:0 pkgid:43502 pkg_index:189 2024-08-09 09:36:13 __cli_script_close()-121: cli script:
The error message above means the backup command 'execute backup config sftp /FortiGate/FG-400F-1-2024-08-09.conf acds.gosir.com fortiBek Passw@rd' cannot be recognized by FortiGate.
FortiGate supports the format below to backup configuration to the SFTP.
In this case, FortiGate has been configured multi-VDOM; the command needs to be run under Global VDOM, after adding the command 'config global' in front of the backup commands as below, then the automation action feature works.
config global execute backup config sftp /FortiGate/FG-400F-1-2024-08-09.conf acds.gosir.com fortiBek Passw@rd
In this case, FortiGate has been configured in an HA cluster, and the built-in MGMT port is configured as a dedicated HA port, the backup command will give the below error:
Send config file to sftp server via vdom root failed.
To fix this type of scenario, entering hidden vsys_mgmt vdom will make it possible to execute the backup job:
config vdom edit root execute enter vsys_hamgmt execute backup config sftp /FortiGate/FG-400F-1-2024-08-09.conf acds.gosir.com fortiBek Passw@rd
Sometimes the automation stitch fails with the error "The Current user does not have the permission to backup config".
This happens if the user profile selected is not the super admin. Make sure to select the super_admin profile under the Administrator Profile.
|
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.