Upgrade from Sentry9 to latest master: how to define data storage without loosing current data?



today i wanted to upgrade my sentry installation, but i wonder if i can keep my current data.
Here is my installation:

  • /home/sentry/onpremise
  • docker-composer.yaml:
      - ./data/sentry:/var/lib/sentry/files

When i want i upgrade i copy the .env.example to .env (with the current secret) and i also tryed to check the new docker-compose.yml but if i change the folowing lines to my old then i got error:

#original volumes lines in new version
   - sentry-data:/var/lib/sentry/files
#error when i run  docker-compose run --rm web upgrade
ERROR: Volume sentry-data declared as external, but could not be found. Please create the volume manually using `docker volume create --name=sentry-data` and try again.

I wonder how to configure ‘volumes’ node to use my current folder : ./data/sentry
If i run docker volume create --name=sentry-dat i fear to loose all my data.

Thanks for help