FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
jkubesa
Staff
Staff
Article Id 372387
Description This article describes the process of copying a policy package containing one or more policy blocks from one FortiManager to another.
Scope FortiManager.
Solution
  1. Review the policy package on existing FortiManager, it may look similar to the following example, containing a policy block with 1 policy:

Snímek obrazovky 2025-01-24 140632.png

 

  1. Run the following command:

 

execute fmpolicy print-adom-policyblock ?

 

After, follow the options to select the corresponding ADOM, policy block and all relevant policy types. Additionally, print the general settings.


Snímek obrazovky 2025-01-24 142031.png

 

  1. Optionally use the following command to print the content of the policy package that contains the policy block:

 

execute fmpolicy print-adom-package ?

 

Note that the policy block is referenced using the ID of the object.

 

Snímek obrazovky 2025-01-24 144127.png

 

  1. On the destination FortiManager, create an empty policy block.

  2. Under Device Manager-Scripts create a new Script, select Run Script On Policy Package or Device database. Paste the contents of the policy block print from the source FortiManager as script content.


Snímek obrazovky 2025-01-24 144909.png

 

  1. Run the script on the target policy block. If the steps were followed correctly, script will execute and contents of the policy block will be the same on both FortiManager devices.

  2. To assign the policy block to corresponding packages, this can be done manually from the GUI or if step 3 was followed, a script can be prepared and executed against the policy package referencing the policy block:


Snímek obrazovky 2025-01-24 150554.png

 

Note: Because the policy block is referenced in the policy package by ID only, it is necessary to reference the policy block ID on the destination FortiManager. In this example, the old ID was 6066 and the new ID is 6061,
A list of policy block IDs can be obtained by using the following command:

 

execute fmpolicy print-adom-policyblock ?

 

  1. After executing the second script against the policy package, verify that the content of the policy package on the source and destination FortiManager is identical.


Snímek obrazovky 2025-01-24 150718.png