Database
Database & backups
Безопасный production-groundwork: пока приложение работает на SQLite, здесь видны backup status, restore check и план перехода на PostgreSQL без внезапного cutover.
Backup status
SQLite path: /opt/guru-send/data/guru_send.sqlite3
Backup dir: /opt/guru-send/data/backups
Latest backup: guru-send-backup-20260630T170720Z.sqlite3
Latest backup size: 278528
restore_check=ok
table_count=34
PostgreSQL readiness
configured=False
status=not_configured
dsn=
Здесь только readiness/plan. Автоматический cutover не выполняется без отдельного подтверждения.
Restore check
{"ok": true, "quick_check": "ok", "table_count": 34}
Cutover plan
- Announce maintenance/read-only window and pause workers.
- Create a fresh SQLite backup and verify restore_check=ok.
- Provision PostgreSQL and set GURU_POSTGRES_URL/DATABASE_URL.
- Run schema migration and data copy from SQLite into PostgreSQL.
- Run smoke tests against PostgreSQL, then switch app config.
- Restart web/worker, verify /health and admin/database status.
- Keep the SQLite backup for rollback until production checks pass.