Skip to main content
mbenvenuti
Staff
Staff
January 29, 2025

Technical Tip: How to extract customized rules

  • January 29, 2025
  • 0 replies
  • 271 views
Description This article describes how to extract customized rules.
Scope FortiSIEM.
Solution

For backup purposes or to share the customized rules to another FortiSIEM, it can be useful to extract all the customized rules.

 

Follow these steps:

 

From the super CLI as root:

 

echo "<Rules>" > /tmp/customized_rules.xml

psql -U phoenix phoenixdb -tc "select rule_xml from ph_drq_rule where creation_type=1" | sed "s# *+##g" >> /tmp/customized_rules.xml

echo "</Rules>" >> /tmp/customized_rules.xml

 

Now list of all the customized rules are stored in this /tmp/customized_rules.xml.

To make sure the XML format content is correct to be re-imported, next command will show any error within the file:

 

xmllint --noout /tmp/customized_rules.xml

 

If no error is displayed, it means that file can be transferred with WinSCP and then imported from the GUI in Resources -> Rules -> More -> Import.

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!