Created on
09-09-2024
12:32 AM
Edited on
01-05-2026
02:17 AM
By
Jean-Philippe_P
| Description |
This article describes the issue when the automation action is not working, caused by a 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 v7.2. |
| Solution |
Through the debug commands below to check the details of the automation process.
diagnose 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 back up the configuration to the SFTP.
In this case, FortiGate has been configured with multiple VDOMs; the command needs to be run under the 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 following 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.
Ensure that the automation script includes two carriage returns after the 'config global' command to allow proper execution.
|
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 2026 Fortinet, Inc. All Rights Reserved.