Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
NetworkTeamATS
New Contributor

Backup Fortigate config to specific folder on SFTP server

Hello all...

We are looking to organize our config repository and wanted to have our FortiGates backup their configs to their respective "device" folders...and not just land them all at the root of our FTP server.

Our current script line looks like this:

 

execute backup config sftp Fw1-confg.txt our.ftpserver.local backupuser passsword

 

If I simply append a folder name to the server path...it fails

execute backup config sftp fw1-confg.txt our.ftpserver.local/FW1 backupuser passsword

 

Am I missing something is this not possible to do in this way (??)

Appreciate any insight you may have...!

Thanks in advance and look forward to your response ! 

 

 

1 Solution
abarushka
Staff
Staff

Hello,

 

You may try the sample command below:

 

execute backup config sftp /Backup/backup.conf 192.168.55.4 testuser testpassword

 

https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-send-automated-backups-of-the-confi...

 

'/Backup/backup.conf' assigns this file name and path to the backup on the FTP server. Note that if the folder path does not have '/backup/' specified, the FTP server will save the file into the "default" ftp folder. Optionally, add the variable %%date%% to name the backup with the current date stamp. For example: 'backup-%%date%%.conf' would be saved as backup-2023-01-11.conf

FortiGate

View solution in original post

2 REPLIES 2
abarushka
Staff
Staff

Hello,

 

You may try the sample command below:

 

execute backup config sftp /Backup/backup.conf 192.168.55.4 testuser testpassword

 

https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-send-automated-backups-of-the-confi...

 

'/Backup/backup.conf' assigns this file name and path to the backup on the FTP server. Note that if the folder path does not have '/backup/' specified, the FTP server will save the file into the "default" ftp folder. Optionally, add the variable %%date%% to name the backup with the current date stamp. For example: 'backup-%%date%%.conf' would be saved as backup-2023-01-11.conf

FortiGate
NetworkTeamATS
New Contributor

Abarushka....that looks like it will do it. Simple enough! Thanks much for your quick reply !

Labels
Top Kudoed Authors