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

# Snapshot & restore

> Back up and restore all of Crew's state. Memory, crons, skills, config, and agent settings. Move between machines or recover from issues.

Snapshots let you back up everything Crew knows and does (memory, crons, skills, config, agent settings) into a single portable file. Use them to move to a new machine, recover from a problem, or keep two instances in sync.

**ℹ️ Info:** Snapshot-to-S3 (`--to s3://...`), `--aws-profile`, and the `s3://` fetch path are retired in 0.5. Cloud backup moves to the [AWS Control](https://kiro.dev/docs/crew/apps/aws-control.md) app.

## Create a snapshot

### From the CLI

```bash
kirocrew snapshot                           # → ~/.kiro/crew/snapshots/
kirocrew snapshot ~/my-snapshots --keep 3   # custom dir, prune to 3
kirocrew snapshot --list                    # list existing snapshots
```

## What's included

| Component | What it covers |
|---|---|
| **Memory** | `memory.db`, `memory_index.db`, preferences, projects, history, and the knowledge library (`workspace/memory/` and `workspace/knowledge/`) |
| **Workspace** | The full `workspace/` and `plan_memory/` trees, including the memory subtrees when selected |
| **Crons** | All scheduled jobs |
| **Config** | Settings, session map, hooks, project/workspace paths |
| **Skills** | Custom skill definitions |
| **Notifications** | Dashboard notification history |
| **Security** | `telemetry_salt` only. The audit signing key (`sel_hmac.key`) is never included; it is regenerated on restore so audit-log HMACs stay bound to the host that wrote them. |

## Restore from a snapshot

Stop the Gateway before restoring. `kirocrew restore` refuses to run while a Gateway is listening because it could write over the restored state. Use `--force` only when you know the listener on that port belongs to a different instance.

### From the CLI

```bash
kirocrew stop
kirocrew restore snapshot.tar.gz                     # auto-detect mode
kirocrew restore snapshot.tar.gz --components memory,crons  # selective
kirocrew restore snapshot.tar.gz --dry-run           # preview without writing
kirocrew restart
```

**⚠️ Warning:** On platforms that cannot perform descriptor-pinned traversal, snapshot and restore refuse by default. `--allow-unpinned-staging` opts into weaker path-based traversal; snapshots record this mode in `MANIFEST.json`.

### Two restore modes

- **Replace:** overwrites live state with snapshot contents for the selected components
- **Merge:** adds snapshot data without overwriting data that already exists

The mode is auto-detected from whether the destination has `memory.db`: an existing database selects Merge; its absence selects Replace. Override with `--mode replace` or `--mode merge`.

### Replace-mode recovery

In Replace mode, Crew moves the state being overwritten into a `pre-restore-<timestamp>/` folder inside the data home before applying the snapshot. If the restore fails after changes begin, Crew attempts to restore the previous state automatically. If that recovery is incomplete, the command names the saved folder and the items that need manual recovery.

## Schedule your own snapshots

Local snapshots are not automatic. Schedule `kirocrew snapshot --keep 7` yourself if you want routine local backups, then verify that archives are being created with `kirocrew snapshot --list`. AWS Control runs its own nightly off-host backup after you configure it.

**⚠️ Warning:** Snapshots contain sensitive data, including `telemetry_salt` and other configuration. Treat snapshot files like credentials: store them with restrictive permissions and don't share them over insecure channels.

## Common patterns

### Move to a new machine

```bash
# On the source
kirocrew snapshot ~/migrate

# Copy the tarball to the new machine, then:
kirocrew restore ~/migrate/kirocrew-snapshot-*.tar.gz
kirocrew doctor
```

### Point-in-time recovery

```bash
kirocrew snapshot --list
kirocrew restore ~/.kiro/crew/snapshots/kirocrew-snapshot-2026-08-15.tar.gz --mode replace
```

### Selective restore

Only want the crons from a snapshot, not the memory?

```bash
kirocrew restore snapshot.tar.gz --components crons
```

## Cloud backup

For continuous cloud backup, use the [AWS Control](https://kiro.dev/docs/crew/apps/aws-control.md) app. It stores snapshots in a private, versioned, owner-only S3 bucket. To restore one, download the archive from the Backup view and run `kirocrew restore <path>` with the local file.

## What snapshots don't cover

Some things live outside the data home and aren't included:

- **`kiro-cli` credentials** — log in on the target machine separately
- **AWS credentials** — `~/.aws/*`
- **Slack/Discord/Telegram app definitions** — regenerated per workspace
- **Installed apps** — their state files are covered, but app code needs to be re-installed via the App Store

For a full migration: snapshot + `kirocrew setup` on the new machine + re-install apps.
