FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
awasfi_FTNT
Staff
Staff
Article Id 351447
Description This article describes how to export metadata variables from an old configuration/FortiManager and import them to the new configuration/FortiManager from CLI.
Scope FortiManager.
Solution

Metadata variables can be exported from a previous configuration or FortiManager and imported to a new configuration or FortiManager from the CLI. Create a script and run it on a Policy Package or ADOM Database to create them on the new configuration/FortiManager.

 

Steps:

  1. Use the following command to view the metadata variables configuration:


execute fmpolicy print-adom-object <ADOM_ID> <Category name or Category_ID> +all

 

For example, the ADOM ID is 4997 and the category name is 'fmg variable'. So it can be used as follows:

 

execute fmpolicy print-adom-object 4997 "fmg variable" +all

 

Alternatively, category ID can be used as follows:


execute fmpolicy print-adom-object 4997 3200 +all

 

  1. Copy the results of the command:

 

Copy.jpg

  1. Browse to Device Manager -> Scripts and create a new CLI script to run it on a Policy Package or ADOM Database as highlighted below and paste the output from step (2) in the Script Details.

 

Create_Script.jpg

  1. Run the Script.

 

run.jpg

 

  1. Select any policy package.

 

run_2.jpg

 

  1. Once the script has been completed successfully, confirm the metadata variables created.

 

created.jpg