Ticker

6/recent/ticker-posts

How to backup one or more devices Fortigate with Python

                                       
Automated backup in one or more devices Fortigate using ssh.
You can schedule a daily task in Linux or Windows, to have a history of changes in the configuration.



Requeriments.

pip install lib_sysblack
pip install paramiko
pip install unipath

Download binary for windows.

https://github.com/sistemasnegros/forti_backup/blob/master/dist/forti_backup.exe

Config params connection SSH in the file: forti_backup.csv

#ip,port,user,password,name
192.168.1.254,  22,  admin,  password,  Fortigate Master

Build for windows

pyinstaller main.spec

Example uses

Test mode.

python python main.py -v -d -t

Basic mode.

python python main.py -v 

Basic mode in windows.

forti_backup.exe -v 

Note important

 

When the backup is to retored, you must manually edit and delete the promt at beginning and end of the file, example:

miforti#.......
....... 
......
miforti#.....






Reacciones:

Post a Comment

0 Comments