Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
ahp
New Contributor

Automatic scheduled backup TFTP

Hello, I'm trying to run an automatic scheduled backup of configuration on FortiSwitch 124E v6.2.1 via TFTP. I found manual only for FortiGates, where it says to use "auto-script", but my FortiSwitch haven't option like that.

 

I tried one time execution and it works fine with this command: "execute backup config tftp filename server_ip".

 

Have someone set up auto-backup on Switch?

2 REPLIES 2
Ricardo_Tomas
New Contributor III

I have several Forti equipments and I'm not aware of the existence of the auto-script outside the fortigates.

To do backups I use a linux cron to execute a batch script.

 

 

Something like this

#! /usr/bin/expect -f

 

set timeout 8000

set date [clock format [clock seconds] -format {%Y%m%d}]

 

spawn ssh <user>@<switch>

expect "password: "

send "<password>\r"

expect "<switch alias name> # "

send "execute backup config tftp $date-filename server_ip\r"

expect "# "

send "exit\r"

ahp

Great!

So simple and so efficiently.

Works perfect with my switches.

Thank you very much!

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors