Add database backup script

Add scripts/backup-db.sh for backing up the embedded PostgreSQL database
with support for custom (.dump) and plain SQL formats, auto-detection of
the configured port, and pruning of backups older than 30 days.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Forgotten
2026-02-19 13:11:26 -06:00
parent 6adc453068
commit 61db74d525
2 changed files with 86 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
"test:run": "vitest run",
"db:generate": "pnpm --filter @paperclip/db generate",
"db:migrate": "pnpm --filter @paperclip/db migrate",
"db:backup": "./scripts/backup-db.sh",
"paperclip": "node cli/node_modules/tsx/dist/cli.mjs cli/src/index.ts"
},
"devDependencies": {