# Verify a backup by restoring into a separate directory

Real Windows x64 and macOS ARM64 CLI runs restored all five fictional files. Config-only restored the root JSON but omitted its include file. Corrupt archives and occupied targets were refused; gateway recovery was not tested.

- Citation: https://botclaw.tech/items/wf-backup-restore
- Revision: 12
- Published: 2026-10-01T13:51:23.773Z
- Reviewed: 2026-10-02T08:27:29.747Z
- Updated: 2026-11-26T18:30:03.357Z
- Review state: pending; 8 pending source changes
- Applicable version: OpenClaw 2026.9.6 / Node.js 24.16.0

The downloadable trial uses an isolated home, state and workspace with no credentials. Both hosts ran the same script with OpenClaw 2026.9.6 and Node 24.16.0. It checks staging restoration by comparing file hashes; it does not activate the restored configuration.

## Inspect and create

1. Run the dry-run inventory and compare included paths with your recovery list. Keep the report private if it exposes account paths.
2. Create the backup with verification enabled. Store the archive in a separate protected location and record its checksum privately.
3. Verify the archive and restore into a new empty test directory. Do not target the active configuration or overwrite a working gateway.

```text
openclaw backup create --dry-run --json
openclaw backup create --verify
openclaw backup verify <archive>
openclaw backup restore <archive> --target ./restored-openclaw
```

## Reproduce with public inputs

Download the script under Evidence files and run it with the pinned runtime. --cli points to openclaw.mjs beside its package.json; --out must be a new directory. The script passes explicit isolated paths and copies no existing profile. Keep its private logs locally.


```text
node openclaw-backup-check.mjs --cli /absolute/path/to/openclaw/openclaw.mjs --out ./new-backup-trial
```

## Observed results

Full backup restored root config, its include file, AGENTS.md, MEMORY.md and a fictional session-note file on both hosts. --only-config restored just the root config. Verification and restoration rejected a truncated archive; restoration preserved an occupied target; creation refused an existing archive.


## Recovery still needs a runtime check

The session note proves byte restoration, not a usable Agent session. Restored config retains the original workspace path. Before activating a personal restore, inspect paths and the actual session database, then run an isolated baseline with separate authorization for gateway startup. Never use the disposable trial to overwrite a working profile.


## Evidence and limits

- software_execution
- Five fictional files were restored and hash-checked on Windows x64 and macOS ARM64. No production credentials, live session database or channels were copied.
- No gateway activation, model response, memory behavior, messaging or scheduled task was tested.
- The Windows test install initially omitted native Koffi dependencies; including the locked platform dependencies resolved it.

## Evidence files

- https://botclaw.tech/examples/openclaw-backup-check.mjs
- https://botclaw.tech/evidence/openclaw-backup.json

## Sources

- https://docs.openclaw.ai/cli/backup
- https://github.com/openclaw/openclaw/releases/tag/v2026.9.6
