precious-sync — grow the NVMe copy of the photos and projects, then verify a sample¶
Nightly, as angel, after Immich's 02:00 dump. Copies (never deletes), verifies a random sample, pushes its own Kuma heartbeat. First Sunday of the month it hashes every file instead.
Input → Movement → Output¶
Reads /mnt/storage/immich/{library,upload,backups,profile}, the DB-derived motion-photo originals under encoded-video/, and /mnt/storage/EmbeddedEra/. rsyncs without --delete into ~/precious/. Output: the copy, a log line === precious-sync complete: ok N files SIZE verify=sample warn=0 ===, a heartbeat.
Why this shape¶
A deletion (bad restore, bug, accident) is the event this copy exists to survive, so the copy only grows and pruning is a human act. Source and destination must be different block devices — device independence is the whole point (precious-sync.sh:107-111).
Steps¶
- Guards (
:98-111): not root;/mnt/storageis a mountpoint; both source trees exist;dfsource ≠ destination device. - Query
immich-postgresfor assets whose only original is underencoded-video/(:14-16). - rsync each tree; then verify: sampled (nightly) or full sha256 (
--verify-full). - Write the log; push
PRECIOUS_KUMA_PUSH_URL.
Last run 09-08 02:20: ok, 21,166 files, 92 G, warn=0. Other modes: --verify-only, --report-extra (files in the copy not in the source — the prune list).
If you change this¶
- Hits: free space on
/· the 02:00 → 02:20 ordering with Immich's dump ·RESTORE.txtif paths move. - Does not hit: the array, parity, rsnapshot.
See¶
- Objects: precious-copy
- Source:
/usr/local/bin/precious-sync.sh·crontab -l