<!-- 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>/images/`),
- cron state and scheduled jobs,
- 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.

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