Content
You are here:
Upgrade Docker installation 7.3.2 to 7.4
Added by David Camilo over 6 years ago
Hello,
I´m using the OP CE docker image since version 6. I could always upgrade to each new version without any problem.
This time, when I tried to upgrade I couldn´t log in. It’s seems to be that something with the database does not work.
I have read that OP 7.4 uses Postgre9.5+. I suppose that is the reason. I have found help post for how to upgrade the database for OP CE package installation, but i did not found anything to do with the Docker installation.
Please could anybody help my to upgrade from 7.3 to 7.4 using Docker?
I have installed it like you recommend for using in production, soy hay have always a back up of the database.
Thanks.
Replies (10)
Hi David,
I have the same problem Upgrading to 7.4 and I was hoping, someone would help in this thread…
Did you found a solution?
Regards,
Markus
I’m still not having the solution. I’m already trying to migrate OP to a different environment (VPS), and I’m also having problems to restore my data to version 7.3.2. When I start the container I receive this message:
——-> Database cluster already exists, not modifying.
Starting PostgreSQL 9.4 database server: mainError: Config owner (postgres:106) and data owner (root:0) do not match, and config owner is not root … failed!
failed!
I’d tested for some months OP with docker mac desktop version. Now i´m trying to install it on my VPS so all the team can access openproject, but for the moment i don’t reach it. I’ll write again in the forum.
As soon as I can solve it, I write you.
I cannot find the solution
I’m still having this message
——-> Database cluster already exists, not modifying.
Starting PostgreSQL 9.4 database server: mainError: Config owner (postgres:106) and data owner (root:0) do not match, and config owner is not root … failed!
failed!
I ran the container like it’s recommended on the install instructions for Docker
sudo mkdir -p /var/lib/openproject/{pgdata,logs,static}
docker run -d -p 8080:80 —name openproject -e SECRET_KEY_BASE=secret \
-v /var/lib/openproject/pgdata:/var/lib/postgresql/9.4/main \
-v /var/lib/openproject/logs:/var/log/supervisor \
-v /var/lib/openproject/static:/var/db/openproject \
openproject/community:7.3
I restored my old data before running the container using this command
cp -arv backup/openproject /var/lib/
Could sombody help me to solve it?
Thanks.
I cannot find the solution
I’m still having this message
——-> Database cluster already exists, not modifying.
Starting PostgreSQL 9.4 database server: mainError: Config owner (postgres:106) and data owner (root:0) do not match, and config owner is not root … failed!
failed!
I ran the container like it’s recommended on the install instructions for Docker
sudo mkdir -p /var/lib/openproject/{pgdata,logs,static}
docker run -d -p 8080:80 —name openproject -e SECRET_KEY_BASE=secret \
-v /var/lib/openproject/pgdata:/var/lib/postgresql/9.4/main \
-v /var/lib/openproject/logs:/var/log/supervisor \
-v /var/lib/openproject/static:/var/db/openproject \
openproject/community:7.3
I restored my old data before running the container using this command
cp -arv backup/openproject /var/lib/
Could sombody help me to solve it?
Thanks.
Hi !
Postgres wants that the cluster files have a specific owner inside the container.
Check if the 9.4 directory and all its content have “postgresql” as owner.
If not correct it within the container with
chown -R postgres 9.4
Hope its working.
Regards.
Hello Johann,
thanks for your quick answer.
When I run the container it has mounted the folder openproject/pgdata as a volume on /var/lib/postgresql/9.4/main, isn’t it?
I’m trying to restore my database from other environment. so I have copied the folders from my backup under root login on my VPS. I suppose all this data copied to my server has “root” as owner.
If I understand it correctly, I must change the ownership of the folder openproject/pgdata (my backup) and all its subfolders with the command you describe.
chown -R postgres openproject/pgdata
I guess next time I relaunch the container, the 9.4 directory will have all its content with “postgres” as owner.
I’ll try, and write you if thats solves my problem
Thanks again.
Best regards.
I have tried what i post on my las comment but it still doesn’t work. I receive this message, data owner change to “app”, but I don’t know what does it mean
——-> Database cluster already exists, not modifying.
Starting PostgreSQL 9.4 database server: mainError: Config owner (postgres:106) and data owner (app:1000) do not match, and config owner is not root … failed!
failed!
Maybe i did not understand your comment Johann, Where should I execute the command you mentioned.
chown -R postgres 9.4
Thanks.
Hi !
Sorry, maybe my description wasn’t precise enough.
When your container is running, open a bash into it with
docker exec -it [Name of you container] /bin/bash
then change to the place where Postgres stores its data
cd /var/lib/postgresql
and do a
ls -l
Now you will see something like that depending on your Postgre version
You maybe will see that the owner of the directory with the version number is not
postgres
. Maybe something withinn the directory has not the correct owner.To ensure that you can execute that
chown
command (when your are in/var/lib/postgresql
).I my case it would be
chown -R postgres 9.6
In your caswe it could be something else depending on the version.
Hope this helps.
Regards.
Hello,
obviously I had a different problem than David, but here is my solution that worked for migration from 7.3.2 to 7.4.2 with a Docker-Installation:
1. In the Docker-Container with 7.3.2:
- installing PostgreSQL 9.6: apt-get -y install postgresql-9.6
- upgrading to 9.6: (as User postgres) pg_upgradecluster -v 9.6 9.4 main
- Create Full DB-Dump
2. stop and remove Docker-Container with 7.3.2
3. start Docker-Container “latest” (7.4.2)
4. import DB-Dump
Hope this helps, if someone needs more information how I made the changes please let me know.
Regards,
Markus
Hello Markus,
Thanks for your answer.
I finally migrate from docker mac desktop to packaged installation on my new VPS. I could restore the database but exporting it from the container under 9.4 version importing it on the server and upgrading it to 9.6 before connecting to Openproject 9.4.2. I´ll report the steps i have followed on Johann’s post.
Regards,
David.