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

#1

Hello,

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:
volumes:
      - ./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
  volumes:
   - 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

0 Likes

#2

Hi Rebolon,
I successfully renamed Sentry Volumes on my environment last week.

Redis and PostgreSQL Volumes too.

First, I found this post:

It points to gdiepen’s scripts on:

So I did it. :slight_smile:

Summarized steps are:

  • Stop current containers.
  • Clone old volume (using gdiepen’s scripts to gather info about containers and volumes binded).
  • Rename your stopped containers.
  • Create new containers pointing to use new volumes (created on clone step).

Hope that it could help.

Good luck!

1 Like