Skip to main content
LC-AT
New Member
May 3, 2022 5:22 PM UTC
Solved

Fortigate Automation backup

Hello,

newbie using Fortigate.

I created an automation sticth to upload a config backup to an SFTP server. I used the following CLI command

 

execute backup config sftp /path/firewall_backup.cfg SFTP_IP SFTP_user SFTP-password

 

If i run the above "CLI" command manually, file is created using the name I specify (in the example, firewall_backup.cfg)

 

if I run the same command via an automation stitch, filename is prefixed with the fortigate serial number (i.e. it becomes FG123456789_firewall_backup.cfg)

 

Of course such prefix doesn't disturb me, but I would like to understand WHY this prefix... Checked on documentation but since I'm a newbie on fortigate was unable to find the right point.

Can someone help me understanding this  behaviour?

Thanks in advance

kcheng
kchengAnswer
Staff & Editor
May 6, 2022 8:20 AM UTC

Hi LC-AT,

 

Thanks for your prompt response. I've tested the relevant on a Windows-based Open-SSH server, I do not see the same behavior. If this is an issue for you, I would suggest you to open a support ticket with us via https://support.fortinet.com. With a ticket opened, we can have more resources to perform the testing to look into your issue.

5 replies

Esteemed Contributor III
May 6, 2022 5:31 AM UTC

Hello LC-AT, 

 

Thank you for using the Community Forum. I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible. 

 

Thanks, 

   Fortinet Community Team 

Translate
kcheng
Staff & Editor
Staff & Editor
May 6, 2022 7:34 AM UTC

Hi LC-AT,

 

Good day to you. Can you let us know what is the firmware and what is the SFTP server that you are currently using? Would it be possible for you to send us the command that you configured in the automation stitch to further investigate? You may remove the SFTP IP and login credential accordingly. 

 

Translate
LC-AT
LC-ATAuthor
New Member
May 6, 2022 7:48 AM UTC

Hi KCheng,

thanks for investigating, these are the info

Current version

FortiOS v7.0.5 build0304 (GA)
 
SFTP server is the one provided by OpenSSH package on a Linux (debian based) distribution.
 
The automation action is this one

 

   edit "backup-cfg"         set action-type cli-script         set script "execute backup config sftp /fortigate/firewall01.cfg 10.x.y.z sftp-forti password_omitted"         set execute-security-fabric enable         set accprofile "super_admin"     next

 

 
on SFTP directory I get this
LCAT_0-1651823231983.png

 

Tried also removing "set execute-security-fabric enable" but no difference.

Thanks
 

@kcheng wrote:

Hi LC-AT,

 

Good day to you. Can you let us know what is the firmware and what is the SFTP server that you are currently using? Would it be possible for you to send us the command that you configured in the automation stitch to further investigate? You may remove the SFTP IP and login credential accordingly. 

 



Translate
kcheng
Staff & Editor
kchengAnswer
Staff & Editor
May 6, 2022 8:20 AM UTC

Hi LC-AT,

 

Thanks for your prompt response. I've tested the relevant on a Windows-based Open-SSH server, I do not see the same behavior. If this is an issue for you, I would suggest you to open a support ticket with us via https://support.fortinet.com. With a ticket opened, we can have more resources to perform the testing to look into your issue.

Translate
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024