Skip to main content
MarioZ
New Member
March 16, 2022
Solved

Backup command works in CLI, but not when started as automation stitch

  • March 16, 2022
  • 2 replies
  • 2702 views

Hello

i try to setup automatic backup over automation.
I use the cli command:

execute backup full-config ftp /Netdevice-BCK/BU-FWZ/BU-FWZ-test.cfg server user password

Executed in cli, it works fine.

 

When i try to start the command as automation stitch, the backup is not uploaded to the ftp server.
What am i missing?

Regards

Mario

-> Debug output when testing automation stitch:

 

0: config global
0: config system auto-script
0: edit "autod.858"
0: set script "execute backup full-config ftp /Netdevice-BCK/BU-FWZ/BU-FWZ-test.cfg server user password"
0: end
0: end
-1: execute backup full-config ftp /Netdevice-BCK/BU-FWZ/BU-FWZ-test.cfg server user password

Best answer by bpozdena_FTNT

Example on how to use automation stitches for scheduled backups can be found at https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-send-automated-backups-of-the-configuration/ta-p/198364 .

 

Also don't forget to switch to global context if you have VDOMs enabled. 

set script " config global execute backup full-config ftp /Netdevice-BCK/BU-FWZ/BU-FWZ-test.cfg server user password"

2 replies

Debbie_FTNT
Staff & Editor
Staff & Editor
March 17, 2022

Ah - I think you have VDOMs enabled?
In that case, your automation stitch script needs to look like this:

 

config global

execute backup full-config ftp /Netdevice-BCK/BU-FWZ/BU-FWZ-test.cfg server user password
-> or 'config vdom/edit <vdom>/exe backup [...]'

bpozdena_FTNT
Staff
Staff
March 17, 2022

Example on how to use automation stitches for scheduled backups can be found at https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-send-automated-backups-of-the-configuration/ta-p/198364 .

 

Also don't forget to switch to global context if you have VDOMs enabled. 

set script " config global execute backup full-config ftp /Netdevice-BCK/BU-FWZ/BU-FWZ-test.cfg server user password"
Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT