Skip to main content
ahp
New Member
Feb 26, 2020 12:48 PM UTC
Question

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

    Ricardo_Tomas
    New Member
    Feb 26, 2020 1:46 PM UTC

    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
    ahpAuthor
    New Member
    Feb 27, 2020 12:49 PM UTC

    Great!

    So simple and so efficiently.

    Works perfect with my switches.

    Thank you very much!

    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