Add built-in backup of the data folder (BL-0044)

The reader owns a scheduled backup into BACKUP (Compose: BACKUP_PATH mounted at
/backup, off when unset). A run pauses the scraper queue through its control
API, waits (bounded) until no job is active, writes a verified tar.gz of DATA
with db.json from memory and scraper/queue.json stored paused, excludes
runtime/lock/pid/temp files, resumes only a queue it paused, then applies
count- or day-based retention to its own archive names only. Schedule,
retention, "Back up now" and last result live in Settings > Service health.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MaashkinoozheandClaude Opus 5.5 committed 2026-10-22 18:03:21 +02:00
1 parent fcc50d576c
commit 086f6353f8
15 files changed
+904 -11

No files matched your search

+7
View File
@@ -36,10 +36,17 @@ services:
source: ${DATA_PATH:-./data}
target: /data
bind: {create_host_path: false}
# Built-in backups (docs/backup.md). The folder must exist and be writable by
# uid 1000; backups stay off unless BACKUP_PATH is set.
- type: bind
source: ${BACKUP_PATH:-./backup}
target: /backup
bind: {create_host_path: false}
environment:
PORT: "8080"
DATA: /data
LIBRARY: /library
BACKUP: ${BACKUP_PATH:+/backup}
TZ: ${TZ:-Europe/Berlin}
SIGNUP: closed
SCAN_INTERVAL: "10"