> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/cs-govern/common-tasks/export-csguardian-rules-to-another-database.md).

# Export CS:Govern Rules to Another Database

CS:Govern supports migrating protection and user access rules from one CopyStorm instance to another via its export and import subsystems.

![](https://869259762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyE2QoOSmKpot88Q3kHGR%2Fuploads%2Fgit-blob-3236c0be7548c6fa1a53dd74f8584140f5e6ccbb%2F5fcf6d03-Govern-Banner.png?alt=media)

## Export CS:Govern Protection Rules

To export the current CS:Govern protection rules use the application menu bar *File => Export Protection Rules* operation.

* A normal File Save dialog will be opened.
* A file of configuration rules will created (.csGovernRules extension).

The exported rule file is an XML file that can be viewed (and edited if required). It will look like:

```
<CSGovern>
   <Field sfTable="Contact" sfField="FirstName" maskingRule="Asterisks">
      <AccessCategory name="PII"/>
   </Field>
   <Field sfTable="Contact" sfField="Email" maskingRule="Random">
      <AccessCategory name="PII"/>
   </Field>
   <Field sfTable="Account" sfField="Description" maskingRule="Lorem Ipsum">
      <AccessCategory name="Public"/>
   </Field>
   <Field sfTable="Contact" sfField="LastName" maskingRule="Asterisks">
      <AccessCategory name="PII"/>
   </Field>
   <User name="KNEEDEEP-CAPSTO\greg" active="true" databaseRole="false">
      <AccessCategory name="Public"/>
   </User>
   <User name="sa" active="true" databaseRole="false">
      <AccessCategory name="PII"/>
      <AccessCategory name="Public"/>
   </User>
</CSGovern>
```

## Import CS:Govern Protection Rules

Importing previously export CS:Govern protection rules into a CopyStorm database is a three step process:

1. Use the File => Import Protection Rules into CS:Govern.
2. Verify the list of rules imported from a dialog CS:Govern displays.
3. Deploy the updated rules using the *Save & Protect* button.

#### Open a CS:Govern Rule File

![](https://869259762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyE2QoOSmKpot88Q3kHGR%2Fuploads%2Fgit-blob-c04dbfdfaf545b488951b614f9c81ad1f90e2077%2Fa9d585ec-SelectImportRulesFile.png?alt=media)

#### Review Imported Protection Rules

![](https://869259762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyE2QoOSmKpot88Q3kHGR%2Fuploads%2Fgit-blob-d0bd11bda93a69e24ec0a6461aea54e8f7891ef3%2F3d5dd986-ImportSummary.png?alt=media)

#### Deploy Protection: Save & Protect

![](https://869259762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyE2QoOSmKpot88Q3kHGR%2Fuploads%2Fgit-blob-49279145de265d9474515a09df6b9c9b7f75c516%2F6c689bc5-ImportedRules.png?alt=media)
