# State portability & trust

Keep synchronization, state export, verification and governed recovery distinct.

Canonical page: /docs/state-and-trust

## Choose the operation for the job

Record synchronization exchanges accepted records and definitions with a shared service. Ledger export/import preserves permitted history and creates a read-only replica on import. It does not move authority. Whole-state export creates a separate recovery snapshot. State import replaces local state through the governed recovery path; it is not a merge or a way around ledger authorization.


## Inspect before changing state

Schema and permission diagnostics report the current host state. Explicit repair, migration and import can change files. Follow the operation’s authority and confirmation requirements rather than treating inspection as permission to mutate.

```shell
op-sys state permissions
op-sys schema database
```

- [State operations](/docs/reference#state)

## Integrity and trust answer different questions

A valid signature shows integrity under a key. It does not by itself establish that you trust the key or that the signer was authorized. The runtime reports cryptographic validity, trust and signer status separately.

Public key exports are secret-free. Keep private signing material outside prompts and source-controlled examples. Rotation, revocation and removal have different effects on historical verification.

- [Trust and key operations](/docs/reference#trust)

## Keep replacement offline

Stop every process that can write to the target state root for the full import. Keep verified backups and recovery receipts. If the runtime reports bundle_restore_recovery_required, leave writers stopped and follow explicit recovery instead of repeating the import.

Review the restore requirements for your operating system and installation. Preserve the original data and recovery receipts until you have checked the restored state.

- [Detailed bundle and recovery contract](/docs/raw/manuals/bundle-v2.md)

## Related guides

- [Service installation](/docs/raw/deployment.md)
- [Troubleshooting](/docs/raw/troubleshooting.md)
- [API conventions](/docs/raw/api-conventions.md)
