README: running quak backup from cron, and its exit codes (closes #170) #180

Merged
clawbot merged 1 commits from issue-170-backup-cron into next 2026-10-07 00:47:38 +02:00
Collaborator

Implements #170, the last unit of #162.

README.md gains "Running the backup from cron": log in once as the job's user, a crontab that backs up every night with --verify on Sundays and appends all output to a log file, and what cron's environment needs to find the saved session. An exit-code table read from backupCommand and run: 0, complete; 1, files in failures.json or another error; 2, another backup of the directory is running; 3, no saved session, a corrupt one, or a 401 on the refresh. The introduction, the Backup layout tree and the lib.backup() entry now say what the backup keeps for each file, EXIF and XMP for an image and dimensions for a JPEG only.

Not visible in the diff:

  • Every exit code of backupCommand is already pinned in test/cli/commands.test.ts, so no test changed.
  • An original that a --verify run could not read, or put back still mismatched, stays in place; the next run without --verify takes it out of failures.json and can exit 0. The README says so.

Disclosures:

  • Judgement call: the --verify run takes Sunday's slot rather than a second job that night, since an overlapping run exits 2.
  • Judgement call: the crontab names ~/bin/quak, where make install puts it, since cron's PATH is short.
  • Not verified on this host: the cron environment notes are standard cron behaviour.

Model: opus-5-5

Implements https://git.eeqj.de/sneak/quak/issues/170, the last unit of https://git.eeqj.de/sneak/quak/issues/162. `README.md` gains "Running the backup from cron": log in once as the job's user, a crontab that backs up every night with `--verify` on Sundays and appends all output to a log file, and what cron's environment needs to find the saved session. An exit-code table read from `backupCommand` and `run`: 0, complete; 1, files in `failures.json` or another error; 2, another backup of the directory is running; 3, no saved session, a corrupt one, or a 401 on the refresh. The introduction, the Backup layout tree and the `lib.backup()` entry now say what the backup keeps for each file, EXIF and XMP for an image and dimensions for a JPEG only. Not visible in the diff: - Every exit code of `backupCommand` is already pinned in `test/cli/commands.test.ts`, so no test changed. - An original that a `--verify` run could not read, or put back still mismatched, stays in place; the next run without `--verify` takes it out of `failures.json` and can exit 0. The README says so. Disclosures: - Judgement call: the `--verify` run takes Sunday's slot rather than a second job that night, since an overlapping run exits 2. - Judgement call: the crontab names `~/bin/quak`, where `make install` puts it, since cron's `PATH` is short. - Not verified on this host: the cron environment notes are standard cron behaviour. Model: opus-5-5
clawbot added the needs-review label 2026-10-06 22:10:10 +02:00
clawbot self-assigned this 2026-10-06 22:10:10 +02:00
Author
Collaborator
  • README.md line 14, the introduction: "For each file it persists … and its original's EXIF, XMP and dimensions" promises all three for every file. The backup reads them only from an image (for a live photo, its image), records dimensions only for a JPEG, and stores none of them for a video. Acceptable: say they are kept for images, with dimensions for a JPEG only, as the imageMetadata paragraph under "Backup layout" already says. The Backup layout tree and the lib.backup() entry in the API reference use the same words; fix them the same way.

Model: opus-5-5

- `README.md` line 14, the introduction: "For each file it persists … and its original's EXIF, XMP and dimensions" promises all three for every file. The backup reads them only from an image (for a live photo, its image), records dimensions only for a JPEG, and stores none of them for a video. Acceptable: say they are kept for images, with dimensions for a JPEG only, as the `imageMetadata` paragraph under "Backup layout" already says. The Backup layout tree and the `lib.backup()` entry in the API reference use the same words; fix them the same way. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-06 23:22:48 +02:00
clawbot added 1 commit 2026-10-06 23:49:04 +02:00
A new README section shows how to run quak backup unattended: log in once
as the job's user, a crontab with a backup every night and --verify on
Sundays, output appended to a log file, and the HOME and XDG_DATA_HOME the
job needs to find the saved session. A table gives each exit code as the
code returns it, and says which failures the next run retries. The
introduction now lists everything the backup keeps for each file. It, the
backup layout tree and the lib.backup() entry say EXIF and XMP are kept for
an image only, and dimensions for a JPEG only.

Judgement call: the --verify run takes Sunday's slot rather than a second
job that night, since an overlapping run would exit 2.

Model: opus-5-5
clawbot force-pushed issue-170-backup-cron from 934d32c7bd to 5176b18779 2026-10-06 23:49:04 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-06 23:49:17 +02:00
Author
Collaborator

Rebased onto next. The introduction, the Backup layout tree and the lib.backup() entry now say EXIF and XMP are kept for an image (for a live photo, its image), dimensions for a JPEG only, and none of these for a video, as the imageMetadata paragraph says.

Model: opus-5-5

Rebased onto `next`. The introduction, the Backup layout tree and the `lib.backup()` entry now say EXIF and XMP are kept for an image (for a live photo, its image), dimensions for a JPEG only, and none of these for a video, as the `imageMetadata` paragraph says. Model: opus-5-5
Author
Collaborator
  • PR body: it runs to about 280 words, over the limit of about 250. The "Must merge after" paragraph is now stale (#179 has merged) and "What changed" repeats the commit message. Acceptable: trim the body to about 250 words or fewer, keeping the disclosures and the Model: line.

Model: opus-5-5

- PR body: it runs to about 280 words, over the limit of about 250. The "Must merge after" paragraph is now stale (https://git.eeqj.de/sneak/quak/pulls/179 has merged) and "What changed" repeats the commit message. Acceptable: trim the body to about 250 words or fewer, keeping the disclosures and the `Model:` line. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-07 00:32:27 +02:00
clawbot merged commit 2402ec97f7 into next 2026-10-07 00:47:38 +02:00
clawbot deleted branch issue-170-backup-cron 2026-10-07 00:47:38 +02:00
Sign in to join this conversation.