Skip to content

Backups & Restore

All persistent Quibble state lives in Postgres. Redis holds only ephemeral game state — active games in progress — and does not need to be backed up.

DataLocationRequired
Question banks and questionsPostgresYes
Quizzes and roundsPostgresYes
Game history and answersPostgresYes
User accountsPostgresYes
Active game stateRedisNo (ephemeral)
Terminal window
pg_dump "${DATABASE_URL}" \
--format=custom \
--no-acl \
--no-owner \
-f quibble-$(date +%Y%m%d-%H%M%S).dump
Terminal window
pg_restore \
--no-acl \
--no-owner \
-d "${DATABASE_URL}" \
quibble-20260101-120000.dump

If you’re using a managed Postgres service, enable automated backups in the provider’s dashboard:

  • Neon: point-in-time restore is available on all plans
  • DigitalOcean Managed Postgres: daily backups with 7-day retention
  • AWS RDS: automated backups + manual snapshots

For in-cluster backups using a scheduled Kubernetes job:

apiVersion: batch/v1
kind: CronJob
metadata:
name: quibble-backup
namespace: quibble
spec:
schedule: "0 3 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: backup
image: postgres:16-alpine
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: quibble-secrets
key: databaseUrl
command:
- /bin/sh
- -c
- |
pg_dump "$DATABASE_URL" \
--format=custom \
-f /backup/quibble-$(date +%Y%m%d-%H%M%S).dump
volumeMounts:
- name: backup
mountPath: /backup
volumes:
- name: backup
persistentVolumeClaim:
claimName: quibble-backup-pvc
restartPolicy: OnFailure