| Data | Store | Priority |
|---|---|---|
| Issues, events, users, projects, settings | PostgreSQL | Critical |
| Attachments, debug symbols, release artifacts | File storage | Important |
| Cache, queues | Redis | Optional |
PostgreSQL backup
Back up all databases
Usepg_dumpall to produce a complete backup of all databases:
Back up a single database
To back up only the Sentry database:Backup frequency recommendations
- Daily backups at minimum for production instances
- Before every upgrade — required, not optional
- Weekly full backups with daily incrementals for larger installs
File storage backup
What you need to back up depends on which file storage backend you’re using.- Local filesystem (default)
- S3-compatible storage
File uploads are stored in the Back up this directory on the same schedule as your PostgreSQL database.
/data volume inside the container, which maps to a Docker volume named sentry-data by default.To back up the data directory, copy the volume contents to a safe location:Redis backup (optional)
Redis stores ephemeral data: caches, rate limit counters, and task queues. Most of this data is safe to lose — it will be rebuilt automatically when services restart. Redis backup is optional and generally not required for most self-hosted installations. If you have very high event volume and want to avoid losing in-flight events during a failure, you can enable Redis persistence (AOF or RDB) in your Redis configuration.Example backup script
Save this script as/opt/sentry-backup.sh and schedule it with cron: