Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from mattermost-docker #40

Open
craph opened this issue Sep 20, 2021 · 3 comments
Open

Upgrading from mattermost-docker #40

craph opened this issue Sep 20, 2021 · 3 comments

Comments

@craph
Copy link
Contributor

craph commented Sep 20, 2021

Hello @jasonblais , @mrckndt
As mentioned in mattermost/mattermost-docker#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,

@juicycool92
Copy link

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 :>

@cobenash
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Sep 28, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants