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 1ce2407
Browse filesBrowse the repository at this point in the historyBrowse files
Adds a "Restore from a backup archive" section to docs/cli/backup.md
covering:
- How to inspect a backup with verify + reading the embedded manifest.json
- Archive payload layout (<archive-root>/payload/posix/<abs-path>/...)
- Same-machine restore via tar -xzf back to original paths
- New-machine / different-path restore via staging directory + cp -a
- Pointer to /install/migrating for guided cross-machine flows
OpenClaw does not currently ship `openclaw backup restore`, so the docs
explicitly call that out and explain the manual `tar` extract guided by
the manifest. Frontmatter `read_when` is extended to cover restore.
Closes#77849
OpenClaw does not currently ship an `openclaw backup restore` subcommand. Restore is a manual `tar` extract guided by the embedded `manifest.json`. See [Restore from a backup archive](#restore-from-a-backup-archive) below.
25
+
23
26
## Notes
24
27
25
28
- The archive includes a `manifest.json` file with the resolved source paths and archive layout.
@@ -90,6 +93,83 @@ Large workspaces are usually the main driver of archive size. If you want a smal
90
93
91
94
For the smallest archive, use `--only-config`.
92
95
96
+
## Restore from a backup archive
97
+
98
+
`openclaw backup` does not yet provide a paired `openclaw backup restore` subcommand. Archives produced by `openclaw backup create` are plain `.tar.gz` files, and the embedded `manifest.json` records each backed-up source path so you can extract the right pieces back to the right place.
99
+
100
+
### Inspect the archive first
101
+
102
+
Before extracting anything, verify the archive and read the manifest so you know which paths it contains:
The manifest reports `paths.stateDir`, `paths.configPath`, `paths.oauthDir`, and `paths.workspaceDirs` — these are the absolute paths the archive was created from. The `assets[]` array lists every backed-up source plus its `archivePath` inside the tarball.
113
+
114
+
### Archive layout
115
+
116
+
Inside the tarball, every backed-up tree is rooted under:
(or `<archive-root>/payload/windows/<DRIVE>/<rest>/...` on Windows). The `<archive-root>` is the timestamped directory that matches the archive basename, for example `2026-03-09T00-00-00.000Z-openclaw-backup`. There is also a top-level `<archive-root>/manifest.json`.
123
+
124
+
### Restore on the same machine (paths unchanged)
125
+
126
+
If you are restoring to the same machine and the original absolute paths still exist, stop the gateway, then extract the relevant payload subtrees back to their original locations. For example, to restore the state directory only:
# Extract just the state-directory payload back to /.
139
+
# (-C / + the encoded "posix/<abs-path>" layout puts files back at their original paths.)
140
+
tar -xzf "$ARCHIVE" -C / --strip-components=3 \
141
+
"$ROOT/payload/posix${STATE_DIR}"
142
+
143
+
openclaw doctor
144
+
openclaw gateway start
145
+
openclaw status
146
+
```
147
+
148
+
Repeat for `configPath`, `oauthDir`, and any `workspaceDirs` you want to restore. Use the `assets[]` entries from the manifest to confirm the exact `archivePath` for each tree before extracting.
149
+
150
+
### Restore on a new machine or to a different path
151
+
152
+
If the original absolute paths do not exist (new machine, new home directory, or you want to inspect first), extract into a staging directory and then copy the trees you want into place:
153
+
154
+
```bash
155
+
mkdir -p /tmp/openclaw-restore
156
+
tar -xzf ./2026-03-09T00-00-00.000Z-openclaw-backup.tar.gz -C /tmp/openclaw-restore
157
+
158
+
# Read /tmp/openclaw-restore/<archive-root>/manifest.json to map archived paths
159
+
# to where you want them on the new machine, then move trees individually, e.g.:
160
+
mkdir -p "$HOME/.openclaw"
161
+
cp -a /tmp/openclaw-restore/2026-03-09T00-00-00.000Z-openclaw-backup/payload/posix/Users/old-user/.openclaw/. "$HOME/.openclaw/"
162
+
163
+
openclaw doctor
164
+
openclaw gateway restart
165
+
openclaw status
166
+
```
167
+
168
+
After any restore, run `openclaw doctor` so it can apply config migrations and repair services. The state directory's `extensions/` tree is restored without nested `node_modules/`; if a restored plugin reports missing dependencies, run `openclaw plugins update <id>` or reinstall it with `openclaw plugins install <spec> --force`.
169
+
170
+
If you are migrating to a new machine and want a guided end-to-end flow rather than manual `tar` commands, see [Migrating an OpenClaw install](/install/migrating).
171
+
93
172
## Related
94
173
95
174
-[CLI reference](/cli)
175
+
-[Migrating an OpenClaw install](/install/migrating)
0 commit comments