Skip to main content
LC-AT
New Member
May 3, 2022
Solved

Fortigate Automation backup

  • May 3, 2022
  • 2 replies
  • 7307 views

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

Best answer by kcheng

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.

2 replies

Contributor
May 6, 2022

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 

kcheng
Staff & Editor
Staff & Editor
May 6, 2022

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. 

 

LC-AT
LC-ATAuthor
New Member
May 6, 2022

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. 

 



kcheng
Staff & Editor
kchengAnswer
Staff & Editor
May 6, 2022

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.