> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tai42.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# tai backup

> Export and import server state.

Export and import server state.

```console theme={null}
$ tai backup [OPTIONS] COMMAND [ARGS]...
```

## `tai backup export`

Export the named sections as a backup document (printed to stdout).

Redirect stdout to save it: `tai backup export --section access_control &gt; backup.json`

```console theme={null}
$ tai backup export [OPTIONS]
```

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--section` `TEXT`     | A section to export (repeatable).      |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai backup import`

Import selected sections from a backup document file.

Example: `tai backup import backup.json --section access_control`

```console theme={null}
$ tai backup import [OPTIONS] FILE
```

| Argument | Description                          |
| -------- | ------------------------------------ |
| `FILE`   | A backup document file. *(required)* |

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--section` `TEXT`     | A section to import (repeatable).      |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai backup sections`

List the registered backup sections.

Example: `tai backup sections`

```console theme={null}
$ tai backup sections [OPTIONS]
```

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |
