Steven P
Steven P

Reputation: 305

Using postgresql database files version 8.4 with Docker postgresql 10

I have a Docker image for postgresql that is 10.4. I have old database files that are postgresql 8.4. I want to upgrade these to use in 10.4 but don't really have a good way to do this. Is it possible to use the Docker image and upgrade the old files?

Upvotes: 0

Views: 559

Answers (1)

user3309314
user3309314

Reputation: 2543

I think you can run the postgres:8.4 image, execute pg_dumpall inside it and save the result to the host using, for example, a volume or docker cp command.

After that you can run postgres:10 image, provide the result file to it (a volume or docker cp again) and restore the data.

Upvotes: 1

Related Questions