getsentry / getsentry/self-hosted
Add more details on full backup
- Dominant language
- Shell
- Stars
- 9.6k
- Forks
- 2k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 12
Description
### Problem Statement
Hi,
We're interested in full backups of Sentry. While the docs lists volumes that should be backed up, I feel it lacks some details.
A high-level workflow would be appreciated
### Solution Brainstorm
Can the volumes be backed-up while Sentry is running? (That is probably no the case for `sentry-postgres`, and maybe `sentry-redis`?)
What containers needs to be down while each volume is being backed-up?
Exemple (but probably false) workflow that I am expecting:
> The following volumes hold critical long-term data and are prefixed with `sentry-`:
> * `sentry-data`
> * `sentry-postgres`
> * `sentry-redis`
> * `sentry-zookeeper`
> * `sentry-kafka`
> * `sentry-clickhouse`
> * `sentry-symbolicator`
>
> Of these, the following volumes can be backed-up without downtime:
> * `sentry-data`
> * `sentry-zookeeper`
> * `sentry-clickhouse`
> * `sentry-symbolicator`
>
> For these, you can mount the volume in another container and read the data from it. For example, to backup the `sentry-data` volume:
> ```shell
> $ docker run --rm -v sentry-data:/data -v $(pwd):/dest alpine:latest tar -cpzf /dest/sentry-data.tar.gz /data
> ```
> PostgreSQL data can be backed-up while Sentry is running using `pg_dump`:
> ```shell
> $ docker compose exec postgres pg_dump -U postgres --clean --if-exists postgres | bzip2 - > sentry-postgres.sql.bz2
> ```
> Redis and Kafka needs to be down before they can be backed up. Doing so will make Sentry inaccessible:
> ```shell
> $ docker compose down kafka clickhouse symbolicator
> $ docker run --rm -v sentry-kafka:/data -v $(pwd):/dest alpine:latest tar -cpzf /dest/sentry-kafka.tar.gz /data
> $ docker run --rm -v sentry-redis:/data -v $(pwd):/dest alpine:latest tar -cpzf /dest/sentry-redis.tar.gz /data
> ```
Contributor guide
Research direction
Start by reviewing the current Sentry self-hosted backup documentation and the listed sentry-* volumes. Verify the running-container and downtime requirements for each service, including the docker compose and pg_dump examples in the issue. Done means the documentation provides a high-level full-backup workflow with accurate commands and clearly states when Sentry or individual containers must be stopped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clickhouse, docker, docker-compose, kafka, postgresql, redis, shell
- Domain
- databases, devops, documentation, infrastructure
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100