Code Monkey home page Code Monkey logo

Comments (5)

davidbartonau avatar davidbartonau commented on August 24, 2024

I am getting the same issue with 10-to-13 while upgrading a Mattermost setup.

could not open version file "/var/lib/postgresql/10/data/PG_VERSION": No such file or directory

from docker-postgres-upgrade.

davidbartonau avatar davidbartonau commented on August 24, 2024

The directory /var/lib/postgresql/10/data/ is empty inside the container. Although so is /var/lib/postgresql/13/data/

It seems like the postgres cluster has not been initialised? My database is small enough that I think a pg_restore is my best option.

from docker-postgres-upgrade.

snspinn avatar snspinn commented on August 24, 2024

P.s. Also fails with...

$ docker run --rm \
-v $PWD/data/postgres:/var/lib/postgresql/11/data \ 
-v $PWD/data/12/postgres:/var/lib/postgresql/12/data \
tianon/postgres-upgrade:11-to-12

from docker-postgres-upgrade.

snspinn avatar snspinn commented on August 24, 2024

@davidbartonau what base does your container image use (i.e. debian, alpine, etc?).

The other thread mentioned that permission issues as a possible root cause, but a different directory stucture could be to blame also(?)..

from docker-postgres-upgrade.

snspinn avatar snspinn commented on August 24, 2024

Re-arranging the bind volume directory structure, so that it matched the first example in the README, worked for me.
i.e. ...

$ find $DIR -mindepth 2 -maxdepth 2
$DIR/11/data
$DIR/12/data

so I could run the upgrade with:

docker run --rm \
        -v "$DIR:/var/lib/postgresql" \
        "tianon/postgres-upgrade:11-to-12" \
        --link

(Replacing $DIR as appropriate in both snippets of course).

Don't know if there is an issue with the implementation when using the method I used above (mounting two seperate bind points) or I was just using it wrong. Either way, I will close this.

from docker-postgres-upgrade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.