Skip to content

Add more details on full backup #2883

Open
@Mika56

Description

@Mika56

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:

$ 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:

$ 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:

$ 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status

      No status
    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions