Import/Export DLP, CCE, and Metadata Settings

The FIleCloud Import/Export Settings tool is available in FileCloud version 20.3 and later.

FileCloud's Import/Export Settings tool enables you to import or export content classification rules, DLP rules, and metadata set definitions.

Location and Syntax

The Import/Export Settings tool is located at C:\xampp\htdocs\resources\tools\ruleset\RuleSetTool.php.

The tool enables you to import and export the following collections:

Collection nameCollection in command line format Import/export file name

metadata set definitions

metadata_set_definitions
metadata_set_definitions.txt
content classification rules
content_classification_rules
content_classification_rules.txt
dlp rules
dlp_rules
dlp_rules.txt
search patterns
searchpattern
searchpattern.txt
search pattern groups
searchpattern_group
searchpattern_group.txt

On import, the file storing the collection must have the exact name specified in the table above under Import/export file name or the command will not know which file to import. On export, the tool will export to the specified filename.


The syntax for RulesSetTool is:

{-i|-e} -c COLLECTION,...  [-d "directory path"] [-o]

where:

ParameterFunctionNotes
-iimport the collections
-eexport the collections
-c COLLECTION,...A list of the collections to import or export.
Either in the format:
-c COLLECTION1 -c COLLECTION2 . . . 
Or:
-c COLLECTION1, COLLECTION2, . . . 

Specify one or more of the collections listed in the table above. You can also list the collection in its file format.

For example, both of the following are valid: 

-c searchpattern

or

-c searchpattern.txt
-d "directorypath"The directory path to export to or import from.Optional. If this is not included, the current directory is used.
-oUsed with -i (import) only.
Overwrite the existing collections of the same type in FileCloud.

Optional. 

If -o is not included, all rules and settings of the specified collections are added (so if you already have any of the rules or settings in FileCloud, after import you will have duplicates).

If -o is included, the rules and settings of the specified collections are deleted from FileCloud before the rules and settings of the collections from the files are imported.

See the recommended sequence below if you are importing updated collections that have duplicate rules or settings in your database.




Command examples


ActionCommandexample
Import a specific collection from the current directory to FileCloud
-i -c [collection]

php ./RuleSetTool.php -i -c metadata_set_definitions
OR
php ./RuleSetTool.php -i -c metadata_set_definitions.txt

Import metadata set definitions from the current directory to the FileCloud database.

Export a specific collection from FileCloud to the current directory
-e -c [collection]
php ./RuleSetTool.php -e -c content_classification_rules

Export content classification rules from the FileCloud database to the current directory.

Import multiple specified collections from the current directory to FileCloud. Include any number of collections.
-i -c [collection1],[collection2], . . . 

php ./RuleSetTool.php -i -c metadata_set_definitions,searchpattern,searchpatterngroup,content_classification_rules, dlp_rules 

Import all collections from the current directory to the FileCloud database.

Export multiple specified collections from FileCloud to the current directory. Include any number of collections.
-e -c [collection1],[collection2], . . . 
php ./RuleSetTool.php -e -c dlp_rules,content_classification_rules

Export DLP rules and CCE rules from the FileCloud database to the current directory.

Import the specified collection(s) from a specific directory to FileCloud.
-i -c [collection1],[collection2] , . . .  -d "directorypath"
php ./RuleSetTool.php -i -c metadata_set_definitions,searchpattern -d "C:/Users/joe/Desktop/rules"

Import metadata set definitions and searchpatterns from the directory C:/Users/joe/Desktop/rules to the FileCloud database.

Export specified collection(s) from FileCloud to a specific directory.
-e -c [collection1],[collection2] , . . . -d "directorypath"

php ./RuleSetTool.php -e -c dlp_rules,content_classification_rules -d "C:/Users/joe/Desktop/rules"

Export DLP rules and CCE rules from the FileCloud database to the directory C:/Users/joe/Desktop/rules.

Import specified collection(s) from the current directory to FileCloud and overwrite the existing collections (of the same type) in FileCloud.
-i -c [collection1],[collection2] , . . . -o
php ./RuleSetTool.php -i -c metadata_set_definitions -o

Import metadata set definitions from the current directory to the FileCloud database, but first delete the existing metadataset definitions in the FileCloud database.

Import specified collection(s) from a specific directory to FileCloud and overwrite the existing collections (of the same type) in FileCloud.
-i -c [collection1],[collection2] , . . . -d "directorypath" -o
php ./RuleSetTool.php -i -c dlp_rules,content_classification_rules -d "C:/Users/joe/Desktop/rules" -o

Import DLP rules and CCE rules from the FileCloud database to the directory C:/Users/joe/Desktop/rules, but first delete the existing DLP rules and CCE rules in C:/Users/joe/Desktop/rules.

Importing updated versions of collections

If you want to import an updated collection with rules or settings that are already in FileCloud, export the FileCloud collection first, and then import the updated collection with the overwrite parameter so you don't end up with duplicate entries. The overwrite parameter causes the tool to delete the collection in FileCloud before it imports the updated one.

For example, to update your DLP rules and CCE rules in FileCloud:

  1. Export your DLP rules and CCE rules from FileCloud by running:

    php ./RuleSetTool.php -e -c dlp_rules,content_classification_rules
  2. Update the collections that you just exported into your current directory (or replace the collections with updated files)
  3. Run the RuleSetTool with -o so that it deletes your FileCloud DLP rules and CCE rules, and then replaces them with the updated files:

    php ./RuleSetTool.php -i -c dlp_rules,content_classification_rules -o