Skip to content

TODO §7 MED (all six): backup chains, prune, update --pkg-only, warm restart, clean lock, top — 1.1.69 - #260

Merged
click0 merged 1 commit into
mainfrom
claude/analyze-test-coverage-nCOJW
Oct 28, 2026
Merged

click0 merged 1 commit into
mainfrom
claude/analyze-test-coverage-nCOJW

Conversation

@click0

@click0 click0 commented Oct 28, 2026

Copy link
Copy Markdown
Owner

1.1.69 — TODO §7 MED, all six items in one release

Backup / replicate chain

crate backup and crate replicate shared the backup-* snapshot family and each --auto-incremental took the newest local one, so a file backup between two replications became the base of a zfs send -i the remote could not apply ("incremental source does not match"), and a replicate snapshot could become the base of a file backup no .zstream holds.

  • Replicate snapshots are now repl-<utc-time>; with --auto-incremental the base is the newest snapshot present on both sides (zfs list -d 1 locally and over the same ssh hop, ZfsDatasetPure::pickLatestCommonSuffix); nothing in common → full stream with a warning.
  • Base lookup is -d 1 and pinned to <dataset>@<prefix> (it was -r with an unpinned regex: a child dataset's snapshot could be chosen).
  • A failed replicate destroys its snapshot (as 1.1.48 did for backup); template warm and the run-time base_container / cow / --warm-base clones destroy their snapshot when zfs clone fails.

backup-prune and chained incrementals

Only a kept FULL counted as a base, so with --auto-incremental (F ← inc1 ← inc2) inc2 was always an "orphan" and --delete-orphans deleted it. Now an incremental is kept when its base is kept, full or incremental (oldest-first transitive walk).

crate update --pkg-only

crate create deleted pkg(8), emptied /var/db/pkg and trimmed /usr/sbin/pkg, so the 0.8.41 upgrade path ended in ENOENT on every crate that installs packages. New pkg/keep-pkg (default true) keeps pkg, its database and the stub; false gives the old smaller image. crate update checks the jail first and names what is missing and why.

crate restart of a --warm-base run

The spec registry gained <name> warm-base=<dataset> entries (written by crate run --warm-base … --name); restart replays --warm-base/--name. SpecRegistry::lookup returns "" for them, so crated's control-socket start of a warm-base container stays unsupported (noted in TODO).

crate clean vs a run in progress

New lib/dir_lock: crate run flock(2)s its jail directory (close-on-exec, held through teardown) and crate create its chroot-create-* directory; clean skips a held directory ("in use … — skipped") and now also sweeps dead chroot-create-* directories.

crate top

The DISK column was RCTL writebps, a rate, shown as usage. Now WRITE/s rendered as 12.5 MB/s; CPU% from RCTL pcpu when present, the cputime fallback holds its baseline for 5 s instead of quantising to 0/100/200 %.

Docs / tests

crate.5 (clean, restart, top, backup, backup-prune, replicate, update, pkg/keep-pkg), README en/uk, runbook §4l, CHANGELOG, TODO, VERSION / PORTVERSION 1.1.69.
make test-unit on Linux: 1590/1590 passed (+7 cases: prune chain, pinned/common suffixes, repl prefix, warm-base registry entries, top pcpu/rates). make check-version, make check-kyuafile, mandoc lint (pre-existing style warnings only). zfs(8), flock on jail directories, pkg inside a jail and the ssh remote are runbook §4l.


Generated by Claude Code

…lean lock, top (1.1.69)

- replicate gets its own repl-<ts> snapshot family and bases an
  --auto-incremental send on the newest snapshot present on BOTH sides
  (remote listed over the same ssh hop); base lookup is `-d 1` and pinned
  to <dataset>@<prefix>; a failed replicate / template warm / run-time
  clone destroys its snapshot.
- backup-prune keeps an incremental whose base is a kept incremental
  (transitive chain), not only a kept full.
- pkg/keep-pkg (default true): create keeps pkg(8), /var/db/pkg and the
  /usr/sbin/pkg stub so `crate update --pkg-only` can work; update
  explains a missing pkg/database instead of ENOENT.
- spec registry "<name> warm-base=<dataset>" entries; `crate restart`
  replays --warm-base/--name.
- DirLock: run/create flock their jail/chroot directory; clean skips a
  held one and sweeps dead chroot-create-* directories.
- top: WRITE/s column (writebps is a rate), CPU% from RCTL pcpu, 5 s
  baseline for the cputime fallback.
- crate.5, README en/uk, runbook §4l, CHANGELOG, TODO, VERSION 1.1.69.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
@click0
click0 merged commit 552599b into main Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants