Restore sentry 9.1.1 DSN and projects on sentry 21.11

Hi, I have a sentry v 9.1.1 and I did an export as described here
And now I’m moving to sentry v 21.11 and I want to restore DSN and projects from old sentry. It is not working with import command. Is there any other chanse to restore data ?

My error during import:

docker-compose run --rm -T web import /etc/sentry/backup.json

Starting sentry_onpremise_clickhouse_1 … done
Starting sentry_onpremise_zookeeper_1 … done
Starting sentry_onpremise_redis_1 … done
Starting sentry_onpremise_symbolicator_1 … done
Starting sentry_onpremise_memcached_1 … done
Starting sentry_onpremise_smtp_1 … done
Starting sentry_onpremise_postgres_1 … done
Starting sentry_onpremise_kafka_1 … done
Starting sentry_onpremise_snuba-outcomes-consumer_1 … done
Starting sentry_onpremise_snuba-sessions-consumer_1 … done
Starting sentry_onpremise_snuba-replacer_1 … done
Starting sentry_onpremise_snuba-subscription-consumer-events_1 … done
Starting sentry_onpremise_snuba-consumer_1 … done
Starting sentry_onpremise_snuba-api_1 … done
Starting sentry_onpremise_snuba-transactions-consumer_1 … done
Starting sentry_onpremise_snuba-subscription-consumer-transactions_1 … done
Creating sentry_onpremise_web_run … done
Updating certificates in /etc/ssl/certs…
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d…
09:22:47 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
09:22:51 [INFO] sentry.plugins.github: apps-not-configured
/usr/local/lib/python3.8/site-packages/sentry/utils/email/ DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘’ is deprecated since Python 3.3, and in 3.10 it will stop working
from collections import Mapping
/usr/local/lib/python3.8/site-packages/ SyntaxWarning: “is” with a literal. Did you mean “==”?
if key is ‘’:
/usr/local/lib/python3.8/site-packages/ SyntaxWarning: “is” with a literal. Did you mean “==”?
if key_extra_len is 0:
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/django/db/models/”, line 565, in get_field
return self.fields_map[field_name]
KeyError: ‘name’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/django/core/serializers/”, line 69, in Deserializer
yield from PythonDeserializer(objects, **options)
File “/usr/local/lib/python3.8/site-packages/django/core/serializers/”, line 118, in Deserializer
field = Model._meta.get_field(field_name)
File “/usr/local/lib/python3.8/site-packages/django/db/models/”, line 567, in get_field
raise FieldDoesNotExist("%s has no field named ‘%s’" % (self.object_name, field_name))
django.core.exceptions.FieldDoesNotExist: ContentType has no field named ‘name’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/bin/sentry”, line 8, in
File “/usr/local/lib/python3.8/site-packages/sentry/runner/”, line 188, in main
File “/usr/local/lib/python3.8/site-packages/click/”, line 829, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/click/”, line 782, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.8/site-packages/click/”, line 1259, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.8/site-packages/click/”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.8/site-packages/click/”, line 610, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/click/”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/sentry/runner/”, line 29, in inner
return ctx.invoke(f, *args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/click/”, line 610, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/sentry/runner/commands/”, line 19, in import

for obj in serializers.deserialize(“json”, src, stream=True, use_natural_keys=True):
File “/usr/local/lib/python3.8/site-packages/django/core/serializers/”, line 73, in Deserializer
raise DeserializationError() from exc

Thanks in advance!

FWIW, I performed a PSQL dump of an ancient 8.22.0 instance, restored it to a new PGSQP 9.6 database, installed/configured on-prem Sentry 9.1.2 on a new EC2 instance, and begun the installation.

I proceeded to successfully upgrade to each successive version listed below (right ← left):

21.11.0 ← 21.10.0 ← 21.9.0 ← 21.8.0 ← 21.7.0 <+ 21.6.3 <+ 21.5.0 ← 21.4.0 ← 21.3.0 ← 21.2.0 ← 21.1.0 ← 20.12.1 <+ 9.1.2 <+ 8.22.0

Excessive, ¯_(ツ)_/¯ but it worked and I preserved all of the previous event data on two separate, migrated instances.