quak backup saves each original twice and fills the per-user cache while doing it.
runBackup gets each original through lib.original() (src/backup.ts:365-366). The content cache writes it into CACHE/originals/ (src/library/content.ts:469-474), and copyAtomic then copies it into DIR/originals/. A 500 GB account means 1 TB written, and up to 100 GiB of copies left in the per-user cache.
backupCommand opens the library with the default precache (src/cli-commands.ts:346-350). So a backup also downloads every thumbnail in the account, plus the favorites and last-week originals, into the cache. The one-shot commands turn this off on purpose (src/cli-commands.ts:94-105).
Definition of done
During a backup, an original that is not already present is written straight into DIR/originals/ by the atomic writer. No second copy is made in the cache's originals directory. The cache still counts it as present, as it already does for backup files (src/library/content.ts:455-467).
quak backup opens the library with the thumbnail and originals precache off.
A test backs up N files with a counting byte source and shows one fetch per file, an empty cache originals/ directory afterwards, and every original in the backup tree.
README lib.backup() text updated to match.
make check green; TODO.md updated in the same commit.
Model: opus-5-5
## Problem
`quak backup` saves each original twice and fills the per-user cache while doing it.
- `runBackup` gets each original through `lib.original()` (`src/backup.ts:365-366`). The content cache writes it into `CACHE/originals/` (`src/library/content.ts:469-474`), and `copyAtomic` then copies it into `DIR/originals/`. A 500 GB account means 1 TB written, and up to 100 GiB of copies left in the per-user cache.
- `backupCommand` opens the library with the default precache (`src/cli-commands.ts:346-350`). So a backup also downloads every thumbnail in the account, plus the favorites and last-week originals, into the cache. The one-shot commands turn this off on purpose (`src/cli-commands.ts:94-105`).
## Definition of done
1. During a backup, an original that is not already present is written straight into `DIR/originals/` by the atomic writer. No second copy is made in the cache's originals directory. The cache still counts it as present, as it already does for backup files (`src/library/content.ts:455-467`).
2. `quak backup` opens the library with the thumbnail and originals precache off.
3. A test backs up N files with a counting byte source and shows one fetch per file, an empty cache `originals/` directory afterwards, and every original in the backup tree.
4. README `lib.backup()` text updated to match.
5. `make check` green; `TODO.md` updated in the same commit.
Model: opus-5-5
clawbot
self-assigned this 2026-09-23 05:34:58 +02:00
Built in #124: a backup now writes each fetched original straight into its own originals/ (the cache records it there, no second copy), and quak backup runs with the precache off.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/quak/pulls/124: a backup now writes each fetched original straight into its own `originals/` (the cache records it there, no second copy), and `quak backup` runs with the precache off.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
quak backupsaves each original twice and fills the per-user cache while doing it.runBackupgets each original throughlib.original()(src/backup.ts:365-366). The content cache writes it intoCACHE/originals/(src/library/content.ts:469-474), andcopyAtomicthen copies it intoDIR/originals/. A 500 GB account means 1 TB written, and up to 100 GiB of copies left in the per-user cache.backupCommandopens the library with the default precache (src/cli-commands.ts:346-350). So a backup also downloads every thumbnail in the account, plus the favorites and last-week originals, into the cache. The one-shot commands turn this off on purpose (src/cli-commands.ts:94-105).Definition of done
DIR/originals/by the atomic writer. No second copy is made in the cache's originals directory. The cache still counts it as present, as it already does for backup files (src/library/content.ts:455-467).quak backupopens the library with the thumbnail and originals precache off.originals/directory afterwards, and every original in the backup tree.lib.backup()text updated to match.make checkgreen;TODO.mdupdated in the same commit.Model: opus-5-5
Built in #124: a backup now writes each fetched original straight into its own
originals/(the cache records it there, no second copy), andquak backupruns with the precache off.Model: opus-5-5