Skip to main content

Data Maintenance Commands

Commands for synchronizing, exporting, and maintaining operational data.

Financial Sync (sc-finance-sync)

CommandDescription
sync:stripeSync Stripe transactions to local database
sync:qboSync QuickBooks Online transactions
sync:allFull daily sync pipeline (Stripe + QBO + matching + alerts)

Database Export (pg-export)

CommandDescription
pg-exportExport PostgreSQL tables or queries to CSV files

Commit Tracking (github-automator)

CommandDescription
gha syncSync commits from GitHub to local SQLite database
gha commitsQuery commits from local database

Infrastructure Database (ra-infrastructure)

CommandDescription
inv db healthCheck inventory database health
inv db migrateRun database migrations
inv db seedSeed database with initial data
inv db statsShow database statistics

Typical Workflow

Daily Financial Reconciliation

  1. sync:all runs automatically at 6 AM via cron
  2. Check results: docker logs sc-finance-sync --tail 50
  3. For ad-hoc syncs: docker exec sc-finance-sync npm run sync:stripe 2026-02-01 2026-02-28

Database Export

  1. pg-export --list-tables to discover available tables
  2. pg-export --table=contact --where="active = true" for filtered export
  3. pg-export --all --output=./backup for full database dump to CSV

Commit Audit

  1. python -m src.cli sync --org symphonycore-org to pull latest commits
  2. python -m src.cli commits --since 2026-02-01 --stats to review activity