Provider: Supabase (PostgreSQL)
Project ID: vjmjzavgjpjfhshqjfpk
Region: Supabase-managed
Supabase provides automated daily backups on Pro tier and above:
- Frequency: Daily at ~2:00 AM UTC
- Retention: 7 days (Pro tier), 30 days (Enterprise)
- Type: Full PostgreSQL pg_dump
- Location: Supabase infrastructure (same region)
- Go to Supabase Dashboard > Project Settings > Database
- Confirm "Backups" section shows recent backup timestamps
- Verify backup frequency matches expected schedule
PITR allows restoring the database to any second within the retention window.
- Supabase Dashboard > Project Settings > Addons
- Enable "Point in Time Recovery"
- Requires Pro plan or higher
- Go to Supabase Dashboard > Database > Backups
- Select "Point in Time Recovery"
- Choose target timestamp
- Confirm restore (creates new project or restores in place)
These tables contain irreplaceable data and MUST be backed up:
| Table | Records | Description |
|---|---|---|
manus_protocol_chunks |
~64,000 | EMS protocol content + embeddings |
manus_agencies |
~2,700 | LEMSA/agency registry |
county_agency_mapping |
~3,100 | County-to-agency jurisdiction mapping |
manus_users |
varies | User accounts |
search_history |
varies | Usage analytics |
For critical deployments or before major migrations:
# Export critical tables
pg_dump "$DATABASE_URL" \
--table=manus_protocol_chunks \
--table=manus_agencies \
--table=county_agency_mapping \
--format=custom \
--file=backup-$(date +%Y%m%d).dump
# Verify backup integrity
pg_restore --list backup-$(date +%Y%m%d).dump | head -20- Go to Supabase Dashboard > Database > Backups
- Select the backup to restore
- Click "Restore" and confirm
- Wait for restore to complete (may take 10-30 minutes for large databases)
- Verify data integrity:
SELECT COUNT(*) FROM manus_protocol_chunks;(expect ~64,000)
pg_restore --dbname="$DATABASE_URL" \
--table=manus_protocol_chunks \
--clean --if-exists \
backup-YYYYMMDD.dumpProtocol embeddings (~64,000 vectors) are expensive to regenerate:
- Model: Gemini Embedding 2 Preview
- Re-embedding time: ~3 hours at API rate limits
- Re-embedding script:
scripts/re-embed-all-gemini.ts
If embeddings are lost but text content is intact, run the re-embedding script. Ensure GOOGLE_API_KEY is configured.
After any restore:
- Verify row counts match expected values
- Run embedding health check: startup log should show "All chunks at current version"
- Test search: "cardiac arrest" with LA County → should return relevant results
- Verify auth: existing users can log in
- Check Stripe: subscription status matches Stripe dashboard
If data loss occurs:
- Stop all writes immediately (set Railway to maintenance mode)
- Contact Supabase support for assisted recovery
- Check PITR availability for the target timestamp
- Document the incident timeline
Last updated: 2026-03-19