server/.env
Secrets used to encrypt sessions and verify webhook HMACs. Tiny, irreplaceable.
A ReplayVOD install has three things worth backing up.
server/.env
Secrets used to encrypt sessions and verify webhook HMACs. Tiny, irreplaceable.
Database
SQLite file or Postgres DB. Holds schedules, video metadata, segment state, sessions.
Media
VIDEO_DIR and THUMBNAIL_DIR. Usually the largest data set.
Stop the recorder before copying the file — SQLite write-ahead-log files don’t copy atomically with cp.
docker compose stop replayvodcp data/replayvod.db /backup/replayvod-$(date +%F).dbdocker compose start replayvodOr use Litestream for continuous replication without stopping the recorder.
Use your normal Postgres tooling:
pg_dump -h localhost -U postgres replayvod > /backup/replayvod-$(date +%F).sqlVIDEO_DIR and THUMBNAIL_DIR are plain files. Any file-level backup tool works (restic, rsync, your filesystem snapshot tool, etc.).
Recordings are immutable once finalised, so incremental backups are efficient — only newly-finished VODs change between runs.
If you store media in S3, the bucket itself is your backup; replicate it to a second region or provider if you want belt-and-braces.
To restore a full install on a new host:
server/.env over the freshly-generated one.cp the SQLite file, or psql < dump.sql).VIDEO_DIR and THUMBNAIL_DIR.