docs: packages need nothing for backups; handbook, tools and install words without git

The Linux packages, the AUR recipe and the rpm metadata no longer depend on
another program for backups (WB-pkg-4 is replaced); the Windows host's PATH no
longer carries Git for Windows; the handbook an assistant reads, the
tool descriptions, the install notes and the site say plain folders. A test
adopts a clone of an old backup as the docs describe.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 17:54:32 -07:00
1 parent 4313464bd7
commit 91d88dcee7
21 files changed
+277 -208

No files matched your search

+2 -3
View File
@@ -487,9 +487,8 @@ already running with other flags keeps them; on a self-host machine
`serve` is the unit's only holder.
The unit sets `IPAddressDeny=any` and `IPAddressAllow=localhost`: the
server reaches nothing out. A book whose backup target is a remote git
repository therefore needs that host allowed in a drop-in (D-31 backups
still run on the server). The recipe, the head check for the move and the
server reaches nothing out. Backups go to a folder on the machine's own
disks and need no network (D-91). The recipe, the head check for the move and the
two-account CI job are in `deploy/README.md`, `deploy/wanderbooks-server.service`
and `.github/workflows/two-user.yml`; the checks are
`crates/ledger-cli/tests/two_user.rs`.
+7 -6
View File
@@ -23,8 +23,8 @@ close the window: that quits Wanderbooks fully and closes your books.
Where things are: the program is in `%LOCALAPPDATA%\Programs\Wanderbooks`; your
books, keys and backups are in `%LOCALAPPDATA%\wanderbooks`.
Backups need Git for Windows (https://git-scm.com/download/win, or `winget
install --id Git.Git -e`); without it Wanderbooks works and says so.
Backups need nothing installed: choose a backup folder in Wanderbooks
(another disk, or a folder your cloud drive keeps in sync).
## macOS
@@ -38,8 +38,9 @@ install --id Git.Git -e`); without it Wanderbooks works and says so.
remove it, drag it to the Trash. Neither touches your books.
Your books, keys and backups are in `~/Library/Application Support/wanderbooks`.
Backups need git: run `xcode-select --install` in Terminal (or `brew install
git`).
Backups need nothing installed: choose a backup folder in Wanderbooks
(another disk, or a folder iCloud, Dropbox, OneDrive or Google Drive keeps in
sync).
## Linux
@@ -48,8 +49,8 @@ Ubuntu), the `.rpm` (Fedora), the Arch package, or the AppImage (one file: mark
it executable, keep it where you put it, and run it). Open **Wanderbooks** from
the menu. To update, install the newer package, or replace the AppImage. Your
books are in `~/.local/share/wanderbooks` and are never touched by a package.
Backups need git (`sudo apt install git`, `sudo dnf install git`,
`sudo pacman -S git`).
Backups need nothing installed: choose a backup folder in Wanderbooks
(another disk, or a folder your sync program keeps).
## After it is installed
+71 -78
View File
@@ -378,27 +378,21 @@ didn't open, with why). Protocol version 1: the requests are new, the
(a drill, or a format upgrade not yet journaled, is stopped when the
close begins, at its next look, so it never takes the last backup's
turn; its scratch clone is removed and the books are unchanged):
a backup still running after that is stopped (git is sent SIGTERM, which
makes it remove its own lock files, and killed with all it started only
if it hasn't ended after 5 seconds) and waited for to end. The program
never writes to or deletes from a backup folder (it is the owner's, and
may be shared with other computers or a sync program): a lock git left
there when it had to be killed is left in place, recorded in
`ops/backup.jsonl` as `lock_left` with its whole path, and the target's
backup is marked failed with words naming the file and saying to remove
it only when nothing else is using the backup folder (`books.backup`
and the close's answer say the same; the next backup that finds the
lock gone goes on). In the book's own archive (`archive.git`, private to
the program; running git by hand inside it is unsupported) it removes
only the locks its own stopped git made, and, at open and when a backup
begins, locks older than ten minutes, each recorded `lock_removed`;
a backup still running after that is stopped (its copy of files
stops at the next piece, or the next 64 KiB of one) and waited for to
end. The program never rewrites or deletes anything in a backup folder
(it is the owner's, and may be shared with other computers or a sync
program): a backup stopped part way leaves pieces no manifest names and
the folder proves whole at its previous manifest, so there is nothing to
clean up and nothing to remove by hand.
**What a close stops, and what it waits for.** At its start a close
stops the calls and jobs that can do long I/O or loop over a book's
whole journal or files, each at its next look: `books.back_up_now` and
a backup a timer asked for (git is stopped; the call answers that it was
stopped because the books are closing, its access record says
a backup a timer asked for (its copy is stopped; the call answers that it
was stopped because the books are closing, its access record says
`refused: stopped_by_close`, and nothing it was doing is recorded as done;
a commit it had made stands), `books.verify` (once per journal line and
what it had written stands, and the folder still proves whole at its
previous manifest), `books.verify` (once per journal line and
per stored file; a heal of a drifted database is begun only if no stop
was asked before it, then finishes), `books.export_cpa_package` (once per
stored file, unless it has journaled a decision, below), a drill, and a
@@ -1329,75 +1323,74 @@ through the policy.
## Tools — backups
Books back themselves up (plan 3.7, D-30,
D-31): each keeps `archive.git`, a bare repository whose commits are its
journal, stored files, vault, keys and access log as they were (one
commit per backup, made under the store's lock, its message
`seq N head H` and, below, `book <id>`), pushed fast-forward only to the targets the settings
name: `backup.git_remote` (the owner's private repository) and
`backup.folder` (a repository `<book>.git` in a folder on another disk).
Not encrypted: the destinations keep it private. Backups run a little
after the books are last written (`--backup-quiet`, 30 s), when they
open, before they close, and on request; a failed one is retried after
15 minutes. Each target is drilled weekly: cloned, its chain replayed,
every stored file re-hashed, every TIN record the books name there with
its key, its head the one its commit records, its journal a byte prefix
of the live one (a failed drill is tried again at the server's next
hourly look, once 15 minutes have passed). A backup's tree is checked
before any of it is written out: plain files under the backed-up paths
only, never a link or a submodule. git runs with no hooks (in a
repository on this computer it pushes to as well), no ignore or
attributes rules of anyone's (a `.gitattributes` in a book's folder
refuses the backup) and no command-running transports; a repository on
this computer is used only if plain (a bare repository at that very
path, no settings of its own but where a copy came from, nothing sending
git elsewhere, no link where it or its parts are), and a backup folder that took backups and is gone is
reported as a disk not connected, never made again (restored books count
the backups of the books they were). Books restored beside the books they
were (under another id) don't push to those books' repository, which
would stop theirs: `books.backup` says it is paused for them until
another is named. A damaged backup record is set aside and begun again;
it never keeps the books shut. One book's drill holds the others'
backups until it ends (a backup at close waits at most a minute for
it). A target
whose push failed is left out of the backups after writes for 15
minutes, then tried again, written to or not; the other targets don't
wait for it. Every
commit, push and drill is a record in the book's `ops/backup.jsonl` (a
chain log; a backup never moves the books' head), each target's records
keyed by the target itself. Setting `backup.*` (books.set_setting) needs
books:admin, as
backing up does: a backup is the whole book, its vault and key included.
Books back themselves up (plan 3.7, D-91, D-92): to the folder the settings
name, `backup.folder` (a folder on another disk, or one a sync service
keeps), as plain files written once (docs/backups.md): a folder for the
books holding a read-me, a `manifests/` folder, and the pieces the manifests
name, the journal and the access log as numbered segments, an index of the
stored files and the files themselves under their hash, the vault and keys
by content hash. The manifest is written last and makes a backup complete;
nothing in the folder is ever rewritten or deleted. Taking a backup holds
the store's lock only to cut the books (the journal's length and head, the
vault, the keys); the files are written after it. With a passphrase (D-92,
set up in the window; off by default) every file is sealed with
XChaCha20-Poly1305, the key derived with Argon2id (64 MiB, 3 passes, 1
lane), names say no more than counts and sizes, and the key is kept on this
computer only. Backups run a little after the books are last written
(`--backup-quiet`, 30 s), when they open, before they close, and on request;
a failed one is retried after 15 minutes. The folder's backup is drilled
weekly: its books built and proven whole, every stored file re-hashed, every
TIN record the books name there with its key, its head the one its manifest
records, its journal a byte prefix of the live one (a failed drill is tried
again at the server's next hourly look, once 15 minutes have passed). A
backup is written only onto a folder whose newest whole manifest is a point
on the live journal; one holding other books, another history, or more than
these books have is said, and nothing is written. A backup folder that took
backups and is gone is reported as a disk not connected, never made again
(restored books count the backups of the books they were). Books restored
under another id back up to a folder of their own in the same place. A
damaged backup record is set aside and begun again; it never keeps the books
shut. A folder whose write failed is left out of the backups after writes
for 15 minutes, then tried again. Every cut, write and drill is a record in
the book's `ops/backup.jsonl` (a chain log; a backup never moves the books'
head), the folder's records keyed by the folder and the passphrase. Setting
`backup.*` (books.set_setting) needs books:admin, as backing up does: a
backup is the whole book, its vault and key included. Books that still name
a private repository (`backup.git_remote`, an older kind of backup) work as
ever; `books.backup`'s `note` says it is no longer used, and an older backup
history in the book's folder is left alone and said once.
- `books.backup {}` (books:read) → `{ head_seq, targets: [{ target:
"repository" | "folder", at, last_ok_at, through_seq, stale,
last_error, last_drill_at, drill_error, paused }], note }`. `paused`:
not backed up there, these books being restored as a copy of others
(its `last_error` says so). `stale`: the target
"folder", at, last_ok_at, through_seq, stale, last_error,
last_drill_at, drill_error, sealed, disconnected }], note }`.
`sealed`: protected by a passphrase. `disconnected`: its disk isn't
there. `stale`: the target
lacks the head, and the first try to back up what it lacks (since its
last good backup, or ever) is more than a day old. `last_error`: its
last push's, or a later failed commit's. `note`
says what to set when no target is. `books.start` adds a next step when
none is set up, or one is stale, failing, paused or failed its drill.
last write's, or a later failed cut's. `note`
says what to set when no folder is, and what older settings or history are
no longer used. `books.start` adds a next step when none is set up, or the
folder is stale, failing or failed its drill.
- `books.back_up_now { new_disk? }` (books:admin) → the same, after
backing up to every target now. `new_disk`: the backup folder's disk is
backing up to the folder now. `new_disk`: the backup folder's disk is
new, so a folder that took these books' backups and holds none now is
begun again (otherwise it is a disk not connected). The one tool whose
`openWorldHint` is true. A target paused for books restored as a copy
of others shows `paused` (and is no failure to retry).
`openWorldHint` is true.
Restoring is the owner's, from a terminal: `wanderbooks books restore
BACKUP [--id ID] [--replace] [--yes]` (the admin socket's `restore`,
previewed then confirmed against the previewed head; without `--id`, the
books keep the id of the books the backup holds, which the preview names,
else the repository's name; under another id they are a copy, and don't
push to those books' repository). The backup is
cloned into the root, proven whole as a drill proves it (but for the
live-journal check: there may be no live books), and built as an
adoption builds; it arrives as new books, or replaces books (`--replace`,
which are let go and moved whole into `legacy/<id>-<time>/`). The
restored books keep the backup's history, so their next backups carry
on from it.
Restoring is the owner's, in the window (Restore...) or from a terminal:
`wanderbooks books restore BACKUP [--id ID] [--replace] [--yes]` (the admin
socket's `restore`, previewed then confirmed against the previewed head;
without `--id`, the books keep the id of the books the backup holds, which the
preview names). BACKUP is the backup folder, the folder of one set of books in
it, or a backup file (`.wbbackup`); a sealed one asks for its passphrase
(unechoed at a terminal, never on the command line). The backup is built in
the root, proven whole as a drill proves it (but for the live-journal check:
there may be no live books), and built as an adoption builds; it arrives as
new books, or replaces books (`--replace`, which are let go and moved whole
into `legacy/<id>-<time>/`). If the newest backup in the folder is damaged,
the newest whole one is the one previewed, and the preview says so. A sealed
backup's restored books keep backing up sealed, to the same folder, from this
computer.
## Tools — payouts
+2 -26
View File
@@ -280,7 +280,7 @@ entry, icon, licences).
| Books | `%LOCALAPPDATA%\wanderbooks` | `~/Library/Application Support/wanderbooks` | `~/.local/share/wanderbooks` (unchanged) |
| Removal leaves the books | the uninstaller names no data folder | dragging to Trash runs nothing | no package script runs |
| No console window | built for the GUI subsystem; attaches to a terminal for commands | n/a | n/a |
| Without git | says how to get Git for Windows | says `xcode-select --install`; the system's stub is not taken for git | says the package manager's command |
| Backups | plain files; nothing to install | plain files; nothing to install | plain files; nothing to install |
**Why NSIS written by hand, not cargo-packager's.** The installer's rules
(per user, one program, an uninstaller that can never reach the books) are
@@ -320,30 +320,6 @@ icon);
`wanderbooks.cmd`/PATH setup so a terminal waits for a command on Windows (a
GUI-subsystem program returns the prompt at once); a macOS refusal for a program
run from a mounted disk image (a path under `/Volumes` may be a real install on
another disk); bundling git on Windows and macOS (the owner's decision, below); the signed `manifest.json` of the earlier self-update
another disk); the signed `manifest.json` of the earlier self-update
(needs the release key, Q-4).
### Bundling git (an owner decision, not made here)
Backups run the system's git. **Linux:** the packages now depend on git, so the
package manager fetches it (nothing is bundled). **Windows and macOS:** the app
detects a missing git and says how to get it (WB-pkg-4); nothing is bundled.
What bundling would mean. Git is GPL-2.0-only free software. Shipping an
unmodified git as a separate file that our program starts as its own process
(never linked) is what the GPL calls aggregation: our MIT OR Apache-2.0 code is
unaffected, and AGENTS.md's clean-room rule (never copy GnuCash's code) is not
touched, since nothing of git is copied into ours; `deny.toml` governs Rust
crates only and does not see it. It still requires, for each release that
carries git: git's GPL text and copyright notices beside it (Git for Windows'
MinGit adds the notices of the components it carries: OpenSSL/curl, the MSYS2
runtime); the corresponding source of exactly that git, or a written offer for it
valid three years (GPLv2 section 3), most simply the git version's source
archive attached to the same release; no term of ours that forbids the
recipient what the GPL permits; and a note of any change if git were modified.
`THIRD-PARTY-NOTICES.txt` (cargo-about) covers Rust crates only, so it would
need an addition. On Windows the candidate is MinGit from Git for Windows
(about 40 MB, unpacked beside the program; `Git::find` would look there first);
on macOS Apple's command line tools' git is Apple's and cannot be bundled, so
it would be a build of our own (Homebrew's, or from source), universal, signed
inside the app, with the same obligations.
+14 -13
View File
@@ -28,19 +28,20 @@ easily backupable, journable":
journals a `journal.tail_repaired` line; `books.digest` reports it.
Damage before the last newline is corruption and refuses to open: that
is for a human, never repaired automatically. The server does better
(plan 3.7): it commits the journal, the blobs, the vault, its key and
the access log to each book's own git repository (the blobs staged
ahead, the commit under the store's lock) and pushes it to the
owner's private repository and backup folder, versioned and
deduplicated, with full history (docs/mcp-interface.md, "Tools —
backups"). The program stops its git gently (SIGTERM first, so git
removes its own lock files, and a kill only after 5 seconds), and never
writes to or deletes from a backup folder, which is the owner's (shared,
perhaps, with another computer or a sync program): a lock git left
there after a kill is reported with its path, never removed. The book's
own archive (`archive.git`) is private to the program; there it removes
only the locks its own stopped git made, and locks older than ten
minutes found when the books open or a backup begins.
(plan 3.7, D-91): it backs the journal, the stored files, the vault, its
key and the access log up to a folder the owner chooses, as plain files
that are written once and never changed or deleted (docs/backups.md, and
docs/mcp-interface.md, "Tools — backups"): the journal and the access log
as numbered segments, each stored file once under its hash, and a
manifest, written last, that says which pieces make a backup whole. The
books' lock is held only to take a cut of the journal's length and the
vault; the files are written after it. With a passphrase (D-92) every file
is sealed. Nothing is installed for it, and nothing in the backup folder
is ever deleted or rewritten by the program, which is the owner's (shared,
perhaps, with another computer or a sync program). The book's own
folder keeps a local backup of the same form (`local-backup/`) made
before a format upgrade. The old history older versions kept in the book's
folder is left where it is, unread and unwritten.
- **Journable.** It literally is a journal: `{seq, ts, type, payload, prev}`.
Greppable, diffable, replayable. The audit trail isn't a feature bolted
on — it's the storage format.
+8 -15
View File
@@ -88,21 +88,14 @@ earlier staged update still works; no release key exists yet, so today none does
`update.rs` (`a_macos_app_is_never_updated_in_place`); `ledger-gui`
`tests/update_notice.rs` (`a_newer_version_is_told_with_where_to_get_it`).
**WB-pkg-4 Without git, backups are off and the person is told how to get
it.** Backups run the system's git; the program carries none. With no git found, a
backup says so in plain words for the system it runs on (Git for Windows or winget; Apple's
command line tools or Homebrew; the package manager) and the books work as
ever; the next backup looks again, so installing git needs no restart. On a Mac
without the developer tools, the stub at the system's git path is not taken for a
git. Whether to ship a git with the app is the owner's decision, since git is
GPL-2.0-only free software and shipping it carries a source offer and notices.
*Enforced:* `ledger_store::backup::how_to_get_git`,
`ledger_store::backup::Git::find`.
*Checked:* `ledger-store` unit tests in `backup.rs`
(`a_missing_git_says_how_to_get_it`,
`the_mac_stub_is_not_a_git_until_the_developer_tools_are_there`);
`ledger-cli` `tests/packaging.rs`
(`the_linux_packages_depend_on_git_and_none_carries_one`).
**WB-pkg-4 Backups need nothing installed.** A backup is a folder of plain files
the program writes itself (WB-backup-1), so no package depends on another program
for it, none carries one, and no backup asks the person to install anything. This
replaces the rule that backups ran the system's git and said how to get it (D-91).
*Enforced:* `deploy/packaging/packager.toml`, `deploy/packaging/aur/PKGBUILD` and
`crates/ledger-cli/Cargo.toml` name no such dependency.
*Checked:* `ledger-cli` `tests/packaging.rs`
(`no_package_depends_on_another_program_for_backups`).
**WB-pkg-5 The Connect page can write a one-click Claude desktop extension
for a company.** The "Claude desktop app" row has one button. It makes the