<!-- SPDX-License-Identifier: Apache-2.0 -->

# Backups and recovery

Back up the complete runtime root while the runtime is stopped, or use a filesystem snapshot that preserves a consistent view of its SQLite data and files.

The runtime root contains:

- session databases (`agents/<slug>/sessions.db`) and persisted media (`agents/<slug>/media/`),
- cron state and scheduled jobs,
- host remote authority and recovery state (`state/remote.db`), backed up consistently with agent session databases,
- configuration, agent content, and plugin state,
- OAuth credentials under `config/` (including `config/openai-codex/`),
- logs under `logs/`.

Restore to a separate path first and run `cireilclaw --root <PATH> dry-run` before activating it.

Keep adapter pairing/state files and durable output receipts in the protected backup plan too; they live on the adapter and may be outside the harness runtime root. See [Remote sessions](remote-sessions.md#sessions-tools-and-recovery).

Use `repair` when a restored Discord session needs its historical media refreshed or its history reconciled.
