dow-prod-tracker/scripts
DJP 307619ffe6 Nightly pg_dump backups + admin "Export Full XLSX" button
Two complementary safety nets for the business-critical DB:

1. Host-side nightly backup
   - scripts/backup-db.sh drives pg_dump through docker compose exec,
     gzips to /srv/backups/dow-prod-tracker/, auto-prunes >30 days.
     Env-overridable (BACKUP_DIR / RETAIN_DAYS / COMPOSE_DIR / PGUSER
     / PGDATABASE) for anyone running a different layout.
   - Runs from host cron at midnight; crontab snippet + restore
     procedure + optional off-site (S3 / rsync) pattern documented
     in DEPLOY.md.

2. On-demand admin XLSX export
   - New GET /api/projects/export?format=xlsx — ADMIN-only; builds a
     two-sheet workbook via new buildFullExportWorkbook():
       - "Job Tracker": one row per project, header strings chosen to
         round-trip through the Dow bulk-import endpoint so a dump can
         be re-ingested in a worst case. Owner / Risk / OMG Number /
         Team / etc., mirroring the importer's fuzzy HEADER_MATCHERS.
       - "Deliverables": one row per deliverable with project OMG #,
         status, priority, dates, CMF/SKU, current stage, assignees,
         notes — enough to reconstitute pipeline state.
     Respects visibility scoping (ADMIN sees everything).
   - Dashboard shows an "Export Full XLSX" button in the header for
     admins; streams the workbook with a date-stamped filename using
     the standard blob-download pattern from ExportButton.

Both are additive — no schema, no migration, no deploy breakage.
2026-04-21 16:53:49 -04:00
..
backfill-embeddings.ts Phase 0: fork rebrand from hp-prod-tracker 2026-04-20 18:21:39 -04:00
backfill-org-ids.ts feat: add pipeline stage resolver and organization access control 2026-03-14 22:43:43 -05:00
backup-db.sh Nightly pg_dump backups + admin "Export Full XLSX" button 2026-04-21 16:53:49 -04:00
clean-slate.ts Phase 1: Dow-customized Prisma schema + strip HP-only features 2026-04-20 18:35:14 -04:00
migrate-to-dynamic-pipelines.ts feat: add pipeline stage resolver and organization access control 2026-03-14 22:43:43 -05:00
seed-dates-catalog.ts feat(calendar): implement calendar view with event filtering and detail display 2026-03-12 21:20:11 -05:00
seed-dates.ts feat(calendar): implement calendar view with event filtering and detail display 2026-03-12 21:20:11 -05:00