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 9.6 to 10 : invalid PG_VERSION path #12

Closed
LudovicSoltysOAB opened this issue Dec 4, 2018 · 2 comments
Closed

Upgrading from 9.6 to 10 : invalid PG_VERSION path #12

LudovicSoltysOAB opened this issue Dec 4, 2018 · 2 comments

Comments

@LudovicSoltysOAB
Copy link

Hello,

I'm a beginner to docker and to postgres as well. I've been asked to upgrade postgres from 9.6 to 10. So thank you very much for this image !

In my case, all the data is in 9.6/main, instead of 9.6/data. When i try to upgrade postgres, i get the following message :
`$ sudo docker run --rm -v /etc/postgresql/9.6/main:/var/lib/postgresql/9.6/main -v /etc/postgresql/10/main:/var/lib/postgresql/10/main tianon/postgres-upgrade:9.6-to-10 --link

...
Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/10/data -l logfile start

could not open version file: /var/lib/postgresql/9.6/data/PG_VERSION
Failure, exiting`

Can you help me ?

Best regards,
Ludovic

@tianon
Copy link
Owner

tianon commented Dec 4, 2018

Using --link will not work with two separate -v mounts (re-read through https://github.com/tianon/docker-postgres-upgrade#readme, which explains this).

Additionally, if your data is not under /data, you either need to rename your folder to get it there, or you need to follow the alternate instructions (so that it's /data inside the container), which will be slower than doing the rename, using a single -v, and using --link.

@tianon tianon closed this as completed Dec 4, 2018
@tianon
Copy link
Owner

tianon commented Dec 4, 2018

In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

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

2 participants