Backuppo is a web-based application created with the simple idea ( for my needs ) of saving a FortiGate configuration using a secure method.
Few things to keep in mind:
- I'm not developer and i have ZERO programming skills, i'm very able to do copy / paste. ( Maybe i can make it appear an "Hello World" message on a linux terminal )
- I used my friend ChatGPT to do that.
- I know, i don't think is a quality code.
- Apparently seems to be working!
- Save a FortiGate configurations in secure mode. RestAPI with HTTPS secure communication
- Schedule a cron to plan when to do the backup. ( Daily, Weekly or Monthly )
- Download the last backupped configuration
- View the job's log
- All the features are able to do done through web interface
I appreciate if someone wants to introduce new features, fixing or something else...
Anyway, if you have the same needs as me, just download and use it!
- [Apache]
- [PHP]
- [Python]
- [SQLLite]
- [Bootstrap]
Installation tested on Linux Ubuntu 22.04
Make sure have update the system:
apt update
apt upgrade -y
reboot
Install the dependencies and components:
apt install apache2 php libapache2-mod-php php-mysql
apt install sqlite3 php-sqlite3 dbus python3-pip libapache2-mod-python
pip3 install requests
Enable apache module for run correctly a python script
a2enmod cgi
Clone repository to home folder
apt install git
git clone https://github.com/danieledfr/backuppo-fortigate.git
Move the contents into www apache folder
cd backuppo-fortigate/
mv * /var/www
If exist html folder in /var/www then remove
cd /var/www
rm -R html/ ( only if html folder are exist )
Modify Apache index folder
nano /etc/apache2/sites-enabled/000-default.conf
modify DocumentRoot /var/www/html in /var/www
systemctl restart apache2
Make the database
python3 /var/www/cgi-bin/createdb.py
Assign a privileges for the application to write in a various folders
chown -R www-data:www-data /var/www
Open your new, fresh, simple, wonderful configuration repository of your FortiGate devices.
http://yourserveripaddress/
If the first time you don't see anything in the Device Page, run this follow:
cd /var/www/cgi-bin
python3 createdb.py
Run ls -lrt in /var/www/cgi-bin and make sure the devices.db file have more then 0B size.
This app was not designed to run on a public network, please not expose it.
Want to contribute? Great!
Maybe one day...
MIT
Free Software, Hell Yeah!