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 https://develop.sentry.dev/self-hosted/backup/#quick-backup
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…
done.
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/list_resolver.py:3: DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ 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/memcache.py:1303: SyntaxWarning: “is” with a literal. Did you mean “==”?
if key is ‘’:
/usr/local/lib/python3.8/site-packages/memcache.py:1304: 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/options.py”, 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/json.py”, line 69, in Deserializer
yield from PythonDeserializer(objects, **options)
File “/usr/local/lib/python3.8/site-packages/django/core/serializers/python.py”, line 118, in Deserializer
field = Model._meta.get_field(field_name)
File “/usr/local/lib/python3.8/site-packages/django/db/models/options.py”, 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
sys.exit(main())
File “/usr/local/lib/python3.8/site-packages/sentry/runner/init.py”, line 188, in main
func(**kwargs)
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/sentry/runner/decorators.py”, line 29, in inner
return ctx.invoke(f, *args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/sentry/runner/commands/backup.py”, 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/json.py”, line 73, in Deserializer
raise DeserializationError() from exc
django.core.serializers.base.DeserializationError
ERROR: 1

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.