You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4dc4080
Browse filesBrowse the repository at this point in the historyBrowse files
Archive `create` and `verify`, plus SQLite `create`, `list`, `verify`, and
32
32
`restore`, accept `--json` for one machine-readable result on stdout.
33
33
34
-
OpenClaw does not currently provide an `openclaw backup restore` command. Restore is a manual copy-back flow guided by the embedded `manifest.json`. See [Restore from an archive](#restore-from-an-archive).
34
+
OpenClaw does not currently provide an `openclaw backup restore` command. Follow [Restore a full archive](/install/backups#restore-a-full-archive) for the manual, manifest-driven copy-back flow.
35
35
36
36
## Notes
37
37
@@ -125,93 +125,6 @@ For a partial backup in that situation, rerun with `--no-include-workspace`: it
125
125
126
126
`--only-config` also works when the config is malformed, since it does not parse the config for workspace discovery.
127
127
128
-
## Restore from an archive
129
-
130
-
OpenClaw does not currently provide an `openclaw backup restore` command. Archives are plain `.tar.gz` files, and the embedded `manifest.json` records the source paths and archive paths needed for a manual restore.
131
-
132
-
Start only from an archive you created or otherwise trust. `openclaw backup verify` checks archive structure and payload layout, but it does not authenticate the archive or make untrusted content safe.
133
-
134
-
### Inspect and stage the archive
135
-
136
-
Verify the archive before extracting it, then extract into a private temporary directory. The block sets `set -euo pipefail` so a failed `openclaw backup verify` stops the script before any extraction:
Treat the restore directory as sensitive. It may contain credentials, auth profiles, sessions, and workspace data from the archive. Remove it when you are done inspecting or restoring; the `trap` in the example handles cleanup when the shell exits.
155
-
156
-
The manifest reports `archiveRoot`, `paths.stateDir`, `paths.configPath`, `paths.oauthDir`, `paths.workspaceDirs`, and an `assets[]` list. Each asset includes its `kind`, original `sourcePath`, and `archivePath` inside the tarball. Use those manifest fields as the source of truth before copying anything back.
157
-
158
-
Do not derive the archive root from the `.tar.gz` filename. `openclaw backup create --output` can write to a custom filename while the embedded `archiveRoot` remains timestamp-derived.
159
-
160
-
### Archive layout
161
-
162
-
The archive stores the manifest and payload under one root directory:
For example, a POSIX source path like `/home/alex/.openclaw` is stored under `<archive-root>/payload/posix/home/alex/.openclaw`. The manifest asset's `archivePath` contains the exact path to copy from, so prefer that over reconstructing paths by hand.
172
-
173
-
### Restore selected paths
174
-
175
-
Before overwriting a live install:
176
-
177
-
- Stop the Gateway and any node hosts that use the files you are restoring.
178
-
- Make a fresh backup of the current state, or move the current directories aside.
179
-
- Restore the smallest set of paths needed, such as only the config asset for a config rollback.
180
-
- Use `manifest.json` to map each asset's `archivePath` to the target path you want to restore.
181
-
- Restart OpenClaw and run `openclaw doctor` after the restore.
182
-
183
-
For example, to restore the state asset into the current user's default state directory:
cp -a "$restore_dir/$state_archive_path"/. "$state_target"/
203
-
204
-
openclaw doctor
205
-
openclaw gateway start
206
-
openclaw status
207
-
```
208
-
209
-
For a same-machine restore, the manifest `sourcePath` values are usually the intended targets. For a new machine or different home directory, choose the new target paths first, then copy only the matching asset payloads into those locations.
210
-
211
-
For a full local restore, the usual targets are the state directory, active config file, credentials directory, and any workspace directories listed in the manifest. Do not restore onto a running service.
212
-
213
-
Before a full restore, review [What gets backed up](#what-gets-backed-up): archives intentionally omit volatile files, plugin dependency trees, and installer-managed runtime roots such as state-local `tmp/`. Recreate those artifacts after restore.
214
-
215
128
## Size and performance
216
129
217
130
OpenClaw does not enforce a built-in maximum backup size or per-file size limit. An archive write that produces no data for five minutes fails and removes its partial temporary file instead of hanging indefinitely. Practical limits otherwise come from:
@@ -229,3 +142,4 @@ Large workspaces are usually the main driver of archive size. Use `--no-include-
229
142
230
143
-[CLI reference](/cli)
231
144
-[Migrating an OpenClaw install](/install/migrating)
145
+
-[Restore a full archive](/install/backups#restore-a-full-archive)
0 commit comments