Backups
What to back up
| What | Why |
|---|---|
| PostgreSQL database | Accounts, groups and encrypted location history. |
| Picture bucket | Profile and group pictures. |
BETTER_AUTH_SECRET | Changing it signs everyone out. |
Redis only holds short-lived data such as rate limits, so it doesn't need backing up.
Back up the database before every upgrade.
Moving to new hardware
Restore the database and keep BETTER_AUTH_SECRET. People's recovery phrases keep working after a move, as long as the database, and the account IDs in it, come across unchanged.
Backups contain the same data the server holds: encrypted locations it can't read, plus the information listed in What your server can see. Protect them like the server itself.