# Vault and storage

Locate the existing collection, understand retained records, and preserve its identity across changes.

The Vault is Vision's local collection and protected product state on your computer. Use the same Vault for the app, command line, agent connection, and background host when they are meant to work with the same information.

## Confirm the current Vault

Inspect the root you intend to use:

```sh
indra --root "/absolute/path/to/your/Vault" vault
```

The result identifies the store and reports retained records by source. If it is empty or differs from the view you expected, check the root and installed command before running onboarding or importing data.

`zortex` can use the installation's saved root binding. `indra` uses the explicit `--root` path for runtime commands. New-install defaults are `%LOCALAPPDATA%\Zortex\Indra` on Windows and `~/.zortex/indra-v2` on Unix. An existing installation can deliberately use another directory.

## What is retained

| Information | How to think about it |
| --- | --- |
| Collected source records | Context available through read-only Vault search. |
| Selected cached pages | Bounded records retained by a route that supports caching. |
| Connection and configuration state | The selected sources and product setup needed to resume. |
| Protected account credentials | Separate custody that is not exposed through public SQL. |
| Progress receipts | Evidence of jobs, attempts, and outcomes; not a copy of every provider payload. |

Current local provider Actions and `connector.read` results can be transient. A successful live read may therefore return useful information without increasing the Vault's search count. Remote `indra.read` caches only the returned page; full sync is a separate collection process.

## Inspect records safely

Start with counts, then a small selected sample:

```sh
indra --root "/absolute/path/to/your/Vault" search --sql 'SELECT source, COUNT(*) AS records FROM z_records GROUP BY source ORDER BY source'
indra --root "/absolute/path/to/your/Vault" search --json '{"sql":"SELECT id,source,source_id,title FROM z_records WHERE source = ? LIMIT 10","params":["gmail"]}'
```

Use [SQL reference](/docs/vision/reference/sql) for body reads and limits. The query interface excludes credentials and private state and cannot write or erase rows.

Counts can include revisions and bounded cached pages. Galaxy also shows a bounded drawing sample and full-sync counts with different meanings. Do not interpret every displayed count as unique current items or a complete account import.

## Preserve the collection during changes

When updating the package, keep the existing root and account bindings. Stop the previous host before switching an incompatible runtime, and retain the old entrypoint until shutdown is confirmed. Follow [Updates](/docs/vision/settings/updates).

Selecting a new `--root` does not move the old collection. Changing a source's account does not erase older retained records. A different computer may also lack the original machine's credential protection, so a directory copy alone does not prove that account access will work there.

For a migration or restoration, use a supported procedure for the installed version and verify the resulting Vault identity, selected sources, and a small read. Do not improvise a new import or SQL write command.

## Storage protection

Credential protection does not imply every retained record body is encrypted at rest. Protect the Vault directory with the computer's access controls and the backup policy appropriate for its contents.

Disabling a source retains its data. Revoking remote access closes that route. Publishing a share creates a separate static copy. These controls have different effects; see [Permissions](/docs/vision/settings/permissions) and [Privacy](/docs/vision/settings/privacy).
