# Import and export

> Export rules as JSON files or a ZIP archive, and import them into the same or another store as inactive rules.

Source: https://backtrackhq.com/docs/building-rules/import-and-export/

Export saves your rules as files. Import reads those files back in. Use it
to back up rules, copy rules to another store, or share a setup with your
team.

## Export rules

1. **Open Rules, tick the rules you want and click Export.**

   **Export** is in the **...** menu of the bulk actions. The **Export rules** window opens.

   (Screenshot: The Rules list with one rule ticked and Export in the more actions menu)

2. **Choose a format and click Export.**

   - **ZIP archive**: one ZIP file with all the selected rules.
   - **Individual files**: one JSON file per rule, downloaded one at a time.

   (Screenshot: The Export rules window with ZIP archive and Individual files)

To export a single rule from its edit page, open **More actions** and click
**Export**.

## Import rules

1. **Open Rules and click Import.**

   The **Import rules** window opens.

   (Screenshot: The Rules page with the Import button)

2. **Drop your files in, or pick them, then click Import.**

   It accepts `.json` and `.zip` files. The window shows how many rules are
   ready to import. Click **Remove** to drop a file.

   (Screenshot: The Import rules window with files ready to import)

> **Note:** "All imported rules will be created as inactive for safety." Open
> each rule, check it, test it as a draft, then activate it.

## If an import fails

The window lists each file that failed and why:

- "Invalid JSON": the file is not valid JSON.
- "Invalid format": the file is JSON but not an AndOr rule export.
- "Failed to read ZIP file": the ZIP is damaged.

A rule that is too big is rejected on import, the same way it would be on
save. See [Rule size](https://backtrackhq.com/docs/building-rules/rule-size/).
