You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
`npm run backup` ran scripts/backup.mjs, which read process.env.DATABASE_URL
directly and exited when it was unset. On the production box DATABASE_URL is NOT
exported -- the connection is resolved (D19) -- so the backup command could never
reach the real data.
The dump now lives in apps/hq (src/backup.ts + a thin scripts/backup.ts CLI, the
same split the other maintenance scripts use, so it is typechecked and unit
tested) and resolves its target through the shared resolveDbUrl. It logs the
resolved host/db -- never the password -- before pg_dump runs, and a SQLite
outcome is a loud error naming backup-hq.sh instead of a dump of nothing.
Behaviour otherwise unchanged: -Fc dump under ./backups (or HQ_BACKUP_DIR),
rotation to the newest HQ_BACKUP_KEEP (default 14), same pg_dump discovery.
The .mjs entry could not import the TS resolver, and duplicating the resolution
would have re-introduced the copy of the production connection string that
|
1 day ago | |
|---|---|---|
| .. | ||
| api.ts | 1 day ago | |
| audit.ts | 3 days ago | |
| auth.ts | 2 days ago | |
| aws-costs.ts | 4 days ago | |
| backup.ts | 1 day ago | |
| bounces.ts | 4 days ago | |
| crypto.ts | 3 days ago | |
| db-pg.ts | 1 day ago | |
| db.ts | 1 day ago | |
| gmail.ts | 4 days ago | |
| import-apex-full.ts | 1 day ago | |
| import-apex.ts | 4 days ago | |
| migrate-onboarding-templates.ts | 1 day ago | |
| migrate-plaintext.ts | 3 days ago | |
| migrations-pg.ts | 1 day ago | |
| pdf.ts | 4 days ago | |
| rate-limit.ts | 4 days ago | |
| reminder-templates.ts | 5 days ago | |
| repos-amc.ts | 4 days ago | |
| repos-aws.ts | 4 days ago | |
| repos-branches.ts | 4 days ago | |
| repos-clients.ts | 2 days ago | |
| repos-dashboard.ts | 4 days ago | |
| repos-documents.ts | 2 days ago | |
| repos-email.ts | 4 days ago | |
| repos-employees.ts | 2 days ago | |
| repos-interactions.ts | 4 days ago | |
| repos-login-events.ts | 2 days ago | |
| repos-milestones.ts | 1 day ago | |
| repos-mis.ts | 3 days ago | |
| repos-modules.ts | 1 day ago | |
| repos-payments.ts | 2 days ago | |
| repos-pipeline.ts | 4 days ago | |
| repos-rate-card.ts | 4 days ago | |
| repos-recurring.ts | 4 days ago | |
| repos-reminders.ts | 4 days ago | |
| repos-renewals.ts | 2 days ago | |
| repos-reports.ts | 3 days ago | |
| repos-search.ts | 3 days ago | |
| repos-shares.ts | 4 days ago | |
| repos-sms.ts | 2 days ago | |
| repos-tickets.ts | 1 day ago | |
| scheduler.ts | 3 days ago | |
| seed.ts | 1 day ago | |
| send-reminder.ts | 4 days ago | |
| series.ts | 4 days ago | |
| server.ts | 1 day ago | |
| sms-gateway.ts | 3 days ago | |
| templates.ts | 2 days ago | |