Description | This article describes how to back up FortiOS & YAML format configuration files using TFTP service as a TFTP server on Linux Mint 21.1 Vera. |
Scope | FortiGate version 7.2.3 or earlier. |
Solution |
1) On Linux Mint, open a terminal tab and type the following command:
# sudo apt update
2) Install TFTP service:
# sudo apt install tftpd-hpa
3) Verify that the TFTP services are already running:
# sudo systemctl status tftpd-hpa
4) Once the last step is done, it will be possible to configure the TFTP file of the service.
Access the file and edit it:
# sudo nano /etc/default/tftpd-hp
Change the TFTP directory path and TFTP options only:
Before:
TFTP_DIRECTORY=”/var/lib/tftpboot” TFTP_OPTIONS=”—secure”
After:
Then it is possible to save the changes made before by pressing Ctrl + O -> press S --> Ctrl + X (to exit).
5) Now it is necessary to create a new folder in order to match the path configured before.
# sudo mkdir /tftp # sudo chown tftp:tftp /tftp -> This command changes the ownership of the folder.
6) Restart the service and check that is running properly.
# sudo systemctl restart tftpd-hpa # sudo systemctl status tftpd-hpa
Now go to FortiGate-VM 64 (in this case FortiOS 7.2.3 build 1262 is used).
As an example:
# execute backup yaml-config tftp backup_test_yaml.conf 10.124.100.12 # execute backup config tftp backup_test_FortiOS.conf 10.124.100.12
YAML:
FortiOS:
Notes: Consider that the TFTP Server should be reachable by FortiGate. For more details, check the following link : https://docs.fortinet.com/document/fortigate/7.2.3/administration-guide/702257/configuration-backups |