quak backup writes the account and album records backup-metadata writes #175

Merged
clawbot merged 1 commits from issue-166-backup-account-and-album-records into next 2026-10-06 07:13:26 +02:00
Collaborator

Implements #166, part of #162.

quak backup <dir> now keeps what backup-metadata keeps about the account and each album:

  • <dir>/account.json with email and userID.
  • Each collections/<name>.json gains ownerID, isShared, updationTime, and the album's magicMetadata, pubMagicMetadata and sharedMagicMetadata when present. id, name, type and files stay.
  • Each file's JSON gains updationTime.

The field names and order are those of backup-metadata's account.json, _collection.json and per-file JSON. BackupLibrary gains whoami(), which Library.backup() passes through from its client. README "Backup layout" and TODO.md are updated.

Not visible in the diff:

  • account.json is written only after the refresh succeeds, so a failed refresh still leaves the directory untouched. It is written on every run, an onlyAlbumNames run included.
  • A file's updationTime comes from the album entry the backup already picks for the file (the one updated last), the same entry the rest of its JSON comes from.
  • Code outside this repo that implements BackupLibrary must now add whoami().

Model: opus-5-5

Implements https://git.eeqj.de/sneak/quak/issues/166, part of https://git.eeqj.de/sneak/quak/issues/162. `quak backup <dir>` now keeps what `backup-metadata` keeps about the account and each album: - `<dir>/account.json` with `email` and `userID`. - Each `collections/<name>.json` gains `ownerID`, `isShared`, `updationTime`, and the album's `magicMetadata`, `pubMagicMetadata` and `sharedMagicMetadata` when present. `id`, `name`, `type` and `files` stay. - Each file's JSON gains `updationTime`. The field names and order are those of `backup-metadata`'s `account.json`, `_collection.json` and per-file JSON. `BackupLibrary` gains `whoami()`, which `Library.backup()` passes through from its client. README "Backup layout" and `TODO.md` are updated. Not visible in the diff: - `account.json` is written only after the refresh succeeds, so a failed refresh still leaves the directory untouched. It is written on every run, an `onlyAlbumNames` run included. - A file's `updationTime` comes from the album entry the backup already picks for the file (the one updated last), the same entry the rest of its JSON comes from. - Code outside this repo that implements `BackupLibrary` must now add `whoami()`. Model: opus-5-5
clawbot added the needs-review label 2026-10-06 06:21:23 +02:00
clawbot self-assigned this 2026-10-06 06:21:23 +02:00
clawbot added 1 commit 2026-10-06 06:21:23 +02:00
quak backup now writes account.json with the account's email and user ID,
adds each album's ownerID, isShared, updationTime and, when present, its
magicMetadata, pubMagicMetadata and sharedMagicMetadata to the album's
JSON, and adds updationTime to each file's JSON. The fields and their order
match backup-metadata's account.json, _collection.json and per-file JSON.
The interface runBackup drives gains whoami, which the library passes
through from its client.

Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 2483c85321 into next 2026-10-06 07:13:26 +02:00
clawbot deleted branch issue-166-backup-account-and-album-records 2026-10-06 07:13:27 +02:00
Sign in to join this conversation.