Migration from 8.xx to 20.xx

Hello

I inherited a really old sentry cluster, it’s running 8.22. What would be the optimal way to migrate to the latest version?

What new components will be required to introduce when taking a step this huge?
Can this be done in inplace, going by major versions to major versions, so I would need to upgrade at least 3 times?

Alternatively, can I install a fresh version and import my current db to keep the history?
Again, what new components I need to onboard to get this working?

As helm/stable/sentry will not be updated in the future, will there be any official helm chart in the future?

Thank you in advance!

Hi,

There are a lot of new services that need to run, see https://github.com/getsentry/onpremise/blob/245ae95a6ad55690a22a7f00f5f3eefdf46683ad/docker-compose.yml for a full list.

The recommended way is to use the repo above but if you are coming from a non-Docker based setup, you’d need to migrate it to this setup first. This should be fairly easy by simply making sure the volume names align with what we use in the repo.

The ideal migration path would be 8.22 -> 9.1.2 -> 20.11.0 (out next Monday) so you only need 2 upgrades.

For Helm charts, https://github.com/sentry-kubernetes/charts is not official but pretty high quality. Still, we don’t support it so you are relying on the repo maintainers.

Thanks!

I have a docker-based setup.
So this k8s repo is/will be supporting the latest version in the future?

How should I set up snuba, kafka, and all the new services? Should they work out-of-box using the docker-compose you linked?

How should I migrate the old postgres DB to the new instance?

thanks!

They’ve been following us pretty closely but again, it is maintained by the community so better ask there than here.

Yup.

We have an install script that handles everything. See https://develop.sentry.dev/self-hosted/#upgrading for more information. As long as your Postgres DB volume has the name sentry-postgres, the script should be able to take it from there.

No matter what make sure you back up your old data before proceeding.

We have an install script that handles everything. See https://develop.sentry.dev/self-hosted/#upgrading for more information. As long as your Postgres DB volume has the name sentry-postgres , the script should be able to take it from there.

Yes, but let’s say I would prefer using a dump of that DB in a new instance. In this case can I just simple load the old dump into the new one?

Hey @xilaf
No you cant. we did kind of this migration 2-3 weeks ago (from 9.12 (not containerized) ->20.10.1)
9.12 and lower versions store all data (including events) in postgres but in last versions there is additional DB (clikhouse) where all events are stored.

Our workflow looked like
1)in parallel with existing not containarized setuip install new server with 9.12 containizared
2)dump existing postgres and restore in new 9.12 containizared setup
3)switch 9.12 containizared branch to 20.10.0
4)run ./install.sh which did all upgrade/migrations instead of you

If you have any questions regarding this, welcome

1 Like

Thanks for your response!
I mentioned I have a docker based setup, so that part shouldn’t be a problem I guess.

Hi @xilaf xilaf, have u had to upgrade your 8.xx to 9.12 (non docker based) setup before migrating to 9.1.2 dockerized solution? I have exactly same issue. Honestly, for me it would be enough to migrate projects/users, i could survive without moving historical data.

@Zilionis did you try upgrading? How did it go?

yep, took a bit time but finally i did migration.
We had 8.2.2. old school non dockerized sentry.
i created new 9.1.2 dockerized instance, exported postgres dump from old instance and imported into new instance postgres (as new database).
Configurated docker-compose to use that database instead of defaut postgres. Started docker-compose, when executed “sentry upgrade” under web container. After that i had working 9.1.2 instance with migrated users&projects etc.
Then, I couldn’t upgrade directly to newest version, so i did couple upgrades in between till managed to upgrade to newest one. Finally got it working, the only thing to mention, that application’s have to use newer version of sentry library, as there was changes in sentry api.

1 Like

Thank you so much for sharing you experience @Zilionis!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.