-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I backup Sentry 10+? #364
Comments
If you back up all the named volumes defined in the install script here: you should be good. The critical ones there are |
cc @mattrobenolt in case I'm missing anything. |
Seems reasonable. |
@nogweii I tried everything for a week but it still fails with this error
Thanks in advance for your help. |
Here are the steps for anyone trying to integrate Sentry SAML with Keycloak. Keycloak 1-create client, Clients -> Create 2-edit the client created in #1 and set 3-Remove Client Scopes 4-add username Mapper 5-add email Mapper Sentry 1-Register Identity Provider -> IdP Data 2- Entity ID 3- Single Sign On URL = 4- x509 public certificate 5- Attribute Mappings |
The list provided by @BYK is helpful: But as far as I understand docker, this is not the full story. Backing up docker volumes usually seems to happen by mounting that volume in a container that writes the contents of some mounted folder to the host filesystem. In order to properly backup the data inside those volumes, one has to look through
|
Backing up to hostfile system should be done temporary only and then files should be moved to network or cloud storage. I've created a helper to push the files directly from container to s3. But backup files isn't the right way for databases. Maybe it works for Redis with AOF, but I'm sure that this breaks for postgres. Except the database is offline. From my point of view, usage of specialized tools is always better. So, to backup sentry online is a very complex task. I'm not even sure if it's possible to create a consistent backup in this case. |
Oh yes, that is of course correct. I implicitly assumed that the backup would be done when Sentry is down. Otherwise one has to somehow coordinate the state of the different data storages and should probably use the dedicated tools like |
Docker folks recommend the "extract from container" method here: https://docs.docker.com/storage/volumes/#backup-restore-or-migrate-data-volumes We can obviously improve this but don't have the resources to invest into it currently. If anyone is willing to give a helping hand, we'd definitely review and guide the patch. |
Are these assumptions true?
Trying to figure out what makes sense for a periodic backup with some tolerance for in-flight event loss. Assuing the above are true, seems like |
Only the following two are not correct/accurate:
Now the stats are also held in Clickhouse. Redis holds in-flight or pending job data and some other stuff like sessions etc. You may still lose things if you don't restore this but it is likely that they won't be disastrous.
Kafka is now the main communication pipeline between services so it holds any in-flight data between these. These can be events to be processed, events to be post-processed, event outcomes, and soon session information for release health. None of this data should be terrible to lose but again, you may lose some real data if these are purged. |
Perfect, thanks for the quick feedback! |
Hey, Does anyone did a "persistent postgresql backup by calling pg_dump or such before backing up" (pot same for redis with a BGSAVE)? and could share the "commands" to be executed when sentry is used/started via docker? |
I mounted volumes in directory for easing backups. But it looks like using volumes for The issue was that the post processors showed errors when following these steps: #478 (comment) |
This is most probably due to some permission or user id conflicts. We'll be having a back-up and restore guide in the coming months. |
#364 (comment) Do the containers need to be stopped before creating the backups of the volumes? Or do you think it's fine to keep them running? I'm just asking because I'm a little bit afraid of data corruption if there are new events during the backup process |
To be safe, yeah, they should be stopped. |
Is there any good solution to backup clickhouse while the contaimers are running? postgres is no problem |
Can anyone tell methe command to do a postgrest backup to another directory... for sentry? |
We use |
it is not clear, how to backup all configuration and login information, without exact data. |
I've just finished setting up Sentry 10.1.0.dev0 (1713221b5d6f182853c0d71f51100464ceada7de) today, along with SAML authentication with my Keycloak server. This is all very nice and awesome, so I'd like to keep it around, even in the case of server failure.
Which leads me to the question in the title: With the new architecture with Kafka, Snuba, etc, what do I need to include in my backups? A postgres dump is already included, is there anything more?
The text was updated successfully, but these errors were encountered: