Flink / dokku-psql-single-container

Plugin for dokku that provides a Postgresql server in a single container
MIT License
51 stars 9 forks source link

Upgrade from 9.3 to 9.4 #8

Closed Zren closed 9 years ago

Zren commented 9 years ago

Is there a recommended way to do this or should I experiment?

Flink commented 9 years ago

No there isn’t one, an issue is opened about upgrades between major version of PG when using the docker image: https://github.com/docker-library/postgres/issues/37

One way to do it I think is this:

So beware and backup your data! :grin:

henrik commented 9 years ago

I'll sneak this other question in here if you don't mind, since it's related:

PG stores its data inside the container, right? So if the image restarts, there's a chance of losing the data? I'm not clear on whether or not data persists during restarts. http://stackoverflow.com/questions/19585028/i-lose-my-data-when-the-container-exits made me a little worried :) I ask because it would be good to know if you risk data loss if the image is restarted (perhaps as part of upgrading the plugin) or if the host system restarts (perhaps due to maintenance).

henrik commented 9 years ago

Tried running a DB backup, then rebooting my host system. No data loss, so I guess that answers it :) For plugin upgrades I guess it's a good idea to do a backup first anyway, so that's less of a worry.

Flink commented 9 years ago

yes data are stored outside of the container (~dokku/.psql-sc/data by default).

henrik commented 9 years ago

@Flink Oh, that's great. Thank you!