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 e41d949
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/channels/irc.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,11 @@ IRC does not provide a replayable delivery ID or resend messages missed by a dis
60
60
|`realname`|`OpenClaw`| Realname/GECOS field |
61
61
|`password` / `passwordFile`| none | Server password; file must be a regular file |
62
62
|`channels`| none | Channels to join (`["#openclaw"]`) |
63
+
|`replyToMode`|`all`| Reply-reference mode: `off`, `first`, `all`, or `batched`|
63
64
|`accounts` / `defaultAccount`| none | Multi-account setup; env vars fill only the default account |
64
65
66
+
Named accounts inherit the channel-wide reply mode; override it with `channels.irc.accounts.<id>.replyToMode`.
67
+
65
68
## Security defaults
66
69
67
70
- IRC uses raw TCP/TLS sockets outside OpenClaw operator-managed forward proxy routing. In deployments that require all egress through that forward proxy, set `channels.irc.enabled=false` unless direct IRC egress is explicitly approved.
-`channels.nextcloud-talk.replyToMode`: reply-reference mode (`off | first | all | batched`; default: `all`). Named accounts can override it with `channels.nextcloud-talk.accounts.<id>.replyToMode`.
Copy file name to clipboardExpand all lines: docs/cli/backup.md
+66-20Lines changed: 66 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Archive `create`, `verify`, and `restore`, plus SQLite `create`, `list`, `verify
42
42
43
43
## Notes
44
44
45
-
- The archive embeds a `manifest.json` with the resolved source paths and archive layout.
45
+
- The archive embeds a schema-version-1 `manifest.json` with the resolved source paths and archive layout. Additive ownership metadata records configured agent ids and roots, including agent roots already covered by another asset; existing archive layout and older archives remain supported.
46
46
- Default output is a timestamped `.tar.gz` archive in the current working directory. Timestamped filenames use your machine's local timezone and include the UTC offset. If the current working directory is inside a backed-up source tree, OpenClaw falls back to your home directory for the default archive location.
47
47
- Existing archive files are never overwritten. Output paths inside the source state/workspace trees are rejected to avoid self-inclusion.
48
48
-`openclaw backup verify <archive>` checks that the archive contains exactly one root manifest, rejects traversal-style archive paths, unsafe symbolic links, and SQLite sidecars, confirms every manifest-declared payload exists, validates every SQLite snapshot's file shape, and runs full integrity and role checks on canonical OpenClaw databases. Dedicated plugin schemas remain opaque because they may require owner-defined SQLite capabilities. `openclaw backup create --verify` runs that validation immediately after writing the archive.
@@ -153,7 +159,7 @@ scope. With `--all`, it validates every existing entry under `agents/` before
153
159
removing stale backup-owned agent scopes, so an unowned entry aborts the cleanup
154
160
before anything is deleted.
155
161
156
-
You can also select `--global`, repeat `--agent <id>`, or combine the shared database with selected agents. Snapshot creation uses the same online backup, sanitizer, `VACUUM`, owner validation, and integrity checks as `backup sqlite create`; it never reads live SQLite files directly. Rows and schema entries have deterministic ordering, and integers and blobs use lossless encodings. The command creates one commit named `openclaw backup <ISO8601>`. If the database content is unchanged, it prints `no changes` and creates no commit.
162
+
You can also select `--global`, repeat `--agent <id>`, or combine the shared database with selected agents. Explicit agent selections, `--all`, and scheduled backups resolve each database from its configured `agentDir`; historical artifact verification and restore use the artifact's recorded agent id without requiring that agent to remain in the current configuration. Snapshot creation uses the same online backup, sanitizer, `VACUUM`, owner validation, and integrity checks as `backup sqlite create`; it never reads live SQLite files directly. Rows and schema entries have deterministic ordering, and integers and blobs use lossless encodings. The command creates one commit named `openclaw backup <ISO8601>`. If the database content is unchanged, it prints `no changes` and creates no commit.
157
163
158
164
Git staging is restricted to the backup-owned `global` and `agents` paths;
159
165
unrelated files elsewhere in an adopted repository are never staged.
@@ -237,13 +243,27 @@ Every real archive, SQLite snapshot, and Git create attempt records a compact ou
237
243
- The state directory (usually `~/.openclaw`)
238
244
- The active config file path
239
245
- The resolved `credentials/` directory when it exists outside the state directory
246
+
- Every configured agent directory, including custom `agentDir` roots outside the state directory
240
247
- Workspace directories discovered from the current config, unless you pass `--no-include-workspace`
241
-
242
-
Auth profiles and other per-agent runtime state live in SQLite under the state directory (`agents/<agentId>/agent/openclaw-agent.sqlite`), so they are covered by the state backup entry automatically.
243
-
244
-
`--only-config` skips state, credentials-directory, and workspace discovery and archives only the active config file path.
245
-
246
-
OpenClaw canonicalizes paths before building the archive: if config, the credentials directory, or a workspace already live inside the state directory, they are not duplicated as separate top-level backup sources. Missing paths are skipped.
248
+
- Durable resources declared by effectively activated, loadable plugin manifests
249
+
250
+
Auth profiles and other per-agent runtime state live in
251
+
`<agentDir>/openclaw-agent.sqlite`. The default agent root is
252
+
`<stateDir>/agents/<agentId>/agent`, but a custom root remains authoritative
253
+
whether it is outside the state directory, inside a workspace, or nested under
254
+
an otherwise regenerable managed state root. `--no-include-workspace` omits
255
+
ordinary workspace sources, not configured agent directories.
256
+
257
+
`--only-config` skips state, agent, credentials-directory, workspace, and
258
+
plugin-resource discovery and archives only the active config file path.
259
+
260
+
OpenClaw builds one immutable, configuration-derived ownership inventory before
261
+
planning sources, SQLite snapshots, exclusions, results, and the embedded
262
+
manifest. Paths are canonicalized: config, credentials, workspaces, and agents
263
+
already covered by another included root are not duplicated as top-level
264
+
sources. A custom agent root becomes a distinct `agent` asset only when no
265
+
existing asset covers it; the manifest still records its agent id and root when
266
+
another asset contains it. Missing paths are reported as skipped.
247
267
248
268
During archive creation, OpenClaw excludes known live-mutation paths before `tar` reads them. This avoids races between a file's recorded size and concurrent writes. The filter applies these state-relative rules under each backed-up state directory:
249
269
@@ -263,7 +283,16 @@ These rules do not filter workspace files outside the state directory. They also
263
283
264
284
Chromium singleton entries coordinate one running browser on one host and are recreated when that profile starts; the rest of the profile's `user-data/` remains in the archive. Sandbox skills workspaces are generated copies of current skill sources and are materialized again when OpenClaw prepares the next sandbox context after restore; adjacent sandbox registry and other durable state remain included.
265
285
266
-
SQLite databases under the state directory are captured with SQLite's online backup API and compacted offline with `VACUUM` so deleted-page remnants do not enter the archive, and live WAL/SHM files are not copied. A plugin-owned database that requires unavailable owner-defined SQLite capabilities fails closed rather than falling back to a direct file copy. SQLite files included through workspace backups are copied as workspace files and are not covered by the compaction guarantee.
286
+
SQLite databases owned by the state directory or any configured agent directory
287
+
are captured with SQLite's online backup API and compacted offline with
288
+
`VACUUM`, including custom agent roots covered by a workspace or managed state
289
+
asset. Committed WAL changes are included, deleted-page remnants and transient
290
+
leases are removed, sidecars are omitted, and canonical OpenClaw databases must
291
+
match their expected role and agent owner. Unsafe aliasing or an owner mismatch
292
+
fails closed. A plugin-owned database that requires unavailable owner-defined
293
+
SQLite capabilities also fails closed rather than falling back to a direct file
294
+
copy. Other workspace SQLite files outside configured agent roots remain raw
295
+
workspace files and do not receive the SQLite snapshot or compaction guarantee.
267
296
268
297
Installed plugin source and manifest files under the state directory's `extensions/` tree are included, but their nested `node_modules/` dependency trees are skipped as rebuildable install artifacts. After restoring an archive, use `openclaw plugins update <id>` or reinstall with `openclaw plugins install <spec> --force` if a restored plugin reports missing dependencies.
269
298
@@ -273,15 +302,32 @@ Agent-scoped temporary trees under `agents/<agentId>/agent/**/{tmp,.tmp}/` are a
273
302
274
303
Symbolic links are archived as link metadata and are never followed. Relative links are retained only when both the link and its lexical target remain within backup assets declared in `manifest.json`; links between declared assets and dangling links within an asset are allowed. Absolute links, links containing backslashes, and links escaping the archive root or every declared asset are rejected during both creation and verification.
275
304
276
-
Installer-managed and rebuildable runtime roots under the state directory are also skipped: `dev/`, `git/`, `npm/`, legacy `npm-runtime/`, `tmp/`, and `tools/`. These contain managed checkouts, package trees, compiler caches, temporary files, and downloaded runtimes rather than authoritative user state; reinstall or update the corresponding runtime or plugin after restore. An explicitly configured config file, credentials directory, or workspace inside one of these roots remains included.
305
+
Installer-managed and rebuildable runtime roots under the state directory are
306
+
also skipped: `dev/`, `git/`, `npm/`, legacy `npm-runtime/`, `tmp/`, and
307
+
`tools/`. These contain managed checkouts, package trees, compiler caches,
308
+
temporary files, and downloaded runtimes rather than authoritative user state;
309
+
reinstall or update the corresponding runtime or plugin after restore.
310
+
Effectively activated, loadable plugins can declare additional durable or
311
+
regenerable state- or agent-relative roots through
312
+
[`backupResources`](/plugins/manifest#backupresources-reference). Disabled or
agent, and plugin-included paths override exclusions, and any excluded parent
315
+
remains traversable to reach those protected descendants. Names such as `tmp`
316
+
and `.tmp` are not blanket exclusions in custom agent directories; only an
317
+
applicable owner declaration can omit their durable-looking siblings.
277
318
278
319
Local edits inside a managed `dev/` checkout are developer source, not OpenClaw product state, and are not included. Commit and push those edits or copy the checkout separately before relying on a state backup.
279
320
280
321
## Invalid config behavior
281
322
282
323
`openclaw backup` bypasses the normal config preflight so it can still help during recovery. Workspace discovery depends on a valid config, so `openclaw backup create` fails fast when the config file exists but is invalid and workspace backup is still enabled.
283
324
284
-
For a partial backup in that situation, rerun with `--no-include-workspace`: it keeps state, config, and the external credentials directory in scope while skipping workspace discovery entirely.
325
+
For a partial backup in that situation, rerun with
326
+
`--no-include-workspace`: it keeps state, config, and the external credentials
327
+
directory in scope without workspace discovery. Because malformed configuration
328
+
also prevents resolving custom agent ownership and effectively activated plugin
329
+
resources, the result records those unresolved scopes as skipped diagnostics;
330
+
do not treat that recovery archive as a complete backup.
285
331
286
332
`--only-config` also works when the config is malformed, since it does not parse the config for workspace discovery.
0 commit comments