self-hosted
self-hosted copied to clipboard
Migrate data from a single org deployment of Sentry to a multi-org one
Problem Statement
Is it possible to migrate data from completely separate single-org Sentry instances into a single, multi-org Sentry deployment? I checked sentry export and sentry import commands but they seem to work nicely only with single-org deployments.
Solution Brainstorm
No response
The problem is that we have created (at CERN) several instances of Sentry 9 for different projects. Now, while preparing for the upgrade to Sentry 20.x we have noticed a drastic increase in the resources that a single instance of Sentry requires for proper operation. Therefore, we thought that maybe migrating all these instances into separate organizations within a single Sentry deployment would be much more efficient. But the problem is that I can't find a way to migrate data between Sentry deployments in such case.
Hrm, your use case seems reasonable but yes, I'm not surprised that you've found the import/export commands to be designed for one-to-one. Have you scoped out what it would take to modify these commands?
Hrm, your use case seems reasonable but yes, I'm not surprised that you've found the import/export commands to be designed for one-to-one. Have you scoped out what it would take to modify these commands?
Yup. Had a quick look at the export command (https://github.com/getsentry/sentry/blob/master/src/sentry/runner/commands/backup.py#L126=) and maybe one option would be to simply exclude SentryOrg model from the final export? However, does the import command preserve primary keys etc? If not, then maybe export/import workflow shoud suffice in the end.
@chadwhitacre what do you think? ;)
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
@chadwhitacre any feedback on this?
My use-case is very similar in that I have several instances of Sentry and would like to combine them into one multi-org instance of Sentry.
In general our import/export code is under-maintained. I'm putting this on the backlog so stalebot leaves it alone. I want to get to this but can't promise when. If you all make progress keep us posted! 🐭