S3-compatible off-volume backup uploads (completes audit H4) #15
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/backup-s3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes H4 — the same-volume baseline shipped in #12, this adds the off-volume copy you asked for (S3-compatible).
What it does
VACUUM INTOsnapshot,pnpm db:backupuploads it to an S3-compatible bucket whenBACKUP_S3_*is set (Cloudflare R2 / AWS S3 / Backblaze B2 / MinIO via customendpoint).@aws-sdk/client-s3is lazy-imported inside the upload fn, so the boot/migrate path (which importsbackupDatabase) never loads it and its only pulled in when off-volume backups are enabled.BACKUP_KEEP.BACKUP_S3_*vars, lifecycle retention, and restore.Verified: local snapshot + "S3 not configured" path works; SDK import + client/command construction verified;
pnpm typecheck/lint/test(40/40) pass. (A real upload needs a bucket — not exercised in CI.)Operator TODO after merge: set
BACKUP_S3_*+ a dailynode scripts/backup.mjsDokploy task + a bucket lifecycle rule.