FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
farhanahmed
Staff
Staff
Article Id 287021
Description

 

This article explains how to use a script to upload the configuration of FortiGate devices to FortiManager. The script can be executed for multiple FortiGates simultaneously, enabling bulk retrieval.

 

Bulk retrieval may be necessary if a large-scale disconnection occurs between FortiGate devices and FortiManager, and local changes made to the firewalls need to be synchronized back to FortiManager.

 

Warning:

  • Running this process for a large number of FortiGates may result in high bandwidth consumption and performance issues.

  • After retrieving the configuration, the policy package status will change to unknown.

  • To minimize performance impacts, it is recommended to run the script for a maximum of 200 devices at a time.

 

Scope

 

FortiManager.

 

Solution

 

  1. Create a script in FortiManager -> Device Manager -> Scripts -> Create New.

 

2.png

 

 

  • Type: CLI Script.
  • Run script on: Remote FortiGate Directly (via CLI):

 

diagnose fdsm cfg-upload 'comment' <----- Any comment can be set, it will be used to identify the retrieve in the revision history.

 

  • Select OK to save.

 

Note:

For FortiGates with VDOMs enabled, the script should be modified to this:

 

config global

diagnose fdsm cfg-upload 'comment'

 

 

3.png

 

 

  1. Running the script on all FortiGates:
 

4.png

 

 

  • Select the FortiGates and select the right arrow:
 

5.png

 

 

  • Select Run:

 

run_now.png

 

 

  • Select OK:

 

click_ok.png

 

 

  • The script will start running:

 

start_run.png

 

run_success.png

 

  1. Go to Device Manager, and the configuration status of FortiGates should show synchronized. If any FortiGate is not showing synchronized, right-click on the device and select 'Refresh Device'.

 

sunc.png

 

  1. In the Total Revisions for each FortiGate, there will be a 'Retrieve' entry with the 'comment' in the comments section.

 

11.png

 

 

Note 1:

Script Status/logs can also be checked from: System Settings -> Task Monitor:

 

 

TM.png

 

Note 2:

Bulk retrieval can also be done by selecting the notification icon on the top, but it only works if the devices are either in a 'conflict' or 'out-of-sync' state.

 

13.png

 

Related articles:

Troubleshooting Tip: FortiGate is Out-of-sync in the Device Manager

Technical Tip: Error code: 2 Protocol error while uploading FortiGate configuration managed by Forti...

Technical Tip: Bulk retrieve device configuration from managed devices

Technical Tip: Retrieve configuration file using GUI or CLI from a FortiManager