i've successfully exported a Sentry file using sentry export on the server.
Now im trying to import the sentry file via sentry import manually in the web_1 container but now im getting this error?
django.db.utils.IntegrityError: UniqueViolation('duplicate key value violates unique constraint "django_content_type_app_label_model_76bd3d3b_uniq"\nDETAIL: Key (app_label, model)=(sentry, activity) already exists.\n',)
SQL: UPDATE "django_content_type" SET "app_label" = %s, "model" = %s WHERE "django_content_type"."id" = %s
@ponxoxo What have you done to debug so far? What hypotheses do you have about why it is failing?
Hey @chadwhitacre
Sure mate, just some more info if it matters, Im trying to move our Sentry server from old one to a new one:
I debugged, trying to dump the postgres db from our old server and loaded up into the new server -> i then got errors saying tables were missing.
After that, i tried truncating the tables, django_content_type and sentry_organization as it was complaining about the contraints on these tables and then run the import again - nows give me this error:
django.core.serializers.base.DeserializationError: Expecting value: line 1 column 2 (char 1): (sentry.apitoken:pk=2) field_value was '['event:admin', 'event:read', 'member:read', 'org:read', 'project:read', 'project:releases', 'team:read', 'project:write', 'team:write', 'project:admin', 'team:admin', 'member:write', 'org:write', 'member:admin', 'event:write', 'org:admin']
I have also tried moving back to python2 (as the old server is using it) and installing Sentry 10 - these also didnt work.
Any suggestions on how to move forward would be greatly appreciated! Thanks mate
i then followed this guide
I hadn't seen this ... nice!
Im trying to move our Sentry server from old one to a new one
Right so I'm still fuzzy. You have two servers, an old one that was on Sentry 10.x.x but is now on Sentry 20.12.1, and a new fresh clean one that is on ... 20.12.1? Or ... ?
@chadwhitacre absolutely correct! Both servers are 20.12.1, old one upgraded from 10.x.x
What i also did notice with restoration of sql dump + inport of the sentry file (even if it failed with the above latest error) the projects and DSN are present in the GUI.
So im considering using it like this but im not sure if the apitoken field_value error is critical and if there are anymore errors after it.
It feels to me like either your SQL dump/restore missed certain things (permissions etc too?) or our import/export stuff is missing some important models. Both sound equally plausible.
Thanks guys - i ended up just moving the sentry-postgres volume across to the new server and ran the install - i skipped the Sentry import step.
Seems to be running ok to me, it has existing logins, DSN and projects which i needed.
many thanks for your help guys!
Glad you got it sorted!
Most helpful comment
Thanks guys - i ended up just moving the sentry-postgres volume across to the new server and ran the install - i skipped the Sentry import step.
Seems to be running ok to me, it has existing logins, DSN and projects which i needed.
many thanks for your help guys!