Monday, February 9, 2015

Simple script to backup Fortinet hardware.


I have a bunch of Fortinet equipment installed and I needed an easy way to backup my configurations. This is a windows command line script that requires putty and an ftp server. When a new unit is installed, just add one line to this script.


bkup.bat

echo execute backup config ftp  /unit-123 ftp.example.com  user pass >bkup.tmp
c:\putty 10.123.1.1 -l admin -pw pass -m bkup.tmp

echo execute backup config ftp  /unit-124 ftp.example.com  user pass >bkup.tmp
c:\putty 10.124.1.1 -l admin -pw pass -m bkup.tmp

...

No comments: