docker icon indicating copy to clipboard operation
docker copied to clipboard

Upgrading from mattermost-docker

Open craph opened this issue 4 years ago • 3 comments

Hello @jasonblais , @mrckndt As mentioned in https://github.com/mattermost/mattermost-docker/pull/529 I did my tests to migrate from MM 5.31 to 5.32.1 with the migration script.

I have few remarks about the script :

  1. When he try to get the POSTGRES_OLD_VERSION from the docker container he gets : 9.4.21 instead of 9.4 so when you try to find the docker image it results in :
docker: Error response from daemon: manifest for tianon/postgres-upgrade:9.4.21-to-13 not found: manifest unknown: manifest unknown.

So I suggest that the version must be fixed in the script or export before running it.

  1. Same for the MM_VERSION when we do the docker-compose build. When the version is commented like that # - MM_VERSION=5.31 in the docker-compose.yml and in the Dockerfile you have : ARG MM_VERSION=5.31.0 the sed command will write 5.32.1.0 instead of 5.32.1

so what do you think about reading the value directly from the Dockerfile instead of the docker-compose.yml file ?

Then the last step, when the migration is done, how to swith from the old directories/files structures to the new one with the new repo ? Is it possible to change the path for the volume directly in the .env file and that's all ?

Thank you very much.

Best regards,

craph avatar Sep 20 '21 13:09 craph

Hello, I had pretty same issues. my environment is below

Postgres old version: 9.4.26                                                                                          
Postgres new version: 13                                                                                              
Postgres alpine docker tag including python3-dev: 13.2-alpine                                                         
Postgres old Dockerfile: FROM postgres:9.4-alpine                                                                     
Postgres new Dockerfile: FROM postgres:13.2-alpine                                                                    
Postgres upgrade-line matches a folder here - https://github.com/tianon/docker-postgres-upgrade: 9.4.26-to-13         
Mattermost old version: 5.31                                                                                          
Mattermost new version: 5.32.1

and got error on cloning tianon/docker-postgres-updated

Unable to find image 'tianon/postgres-upgrade:9.4.26-to-13' locally                                                   │
docker: Error response from daemon: manifest for tianon/postgres-upgrade:9.4.26-to-13 not found.  

Thankyou :>

juicycool92 avatar Sep 23 '21 08:09 juicycool92

I've provided another way to migrate from mattermost-docker. Please take a look on the #42 and feel free if there are any issues inside.

cobenash avatar Sep 26 '21 07:09 cobenash

Hey, i had similar issue, but i was coming from PG 10.8, If you have solid backup, simply try to overwrite upgrade-line form 9.4.26-to-13 to 9-to-13 (you can do it inside script), and simply rename volumes/db/9.4.26 to volumes/db/9, and then re-run the script. It worked for me.

ghost avatar Sep 28 '21 10:09 ghost