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

Upgrade from 9.3 to 9.4 #8

Closed
Zren opened this issue Jul 22, 2015 · 5 comments
Closed

Upgrade from 9.3 to 9.4 #8

Zren opened this issue Jul 22, 2015 · 5 comments
Labels

Comments

@Zren
Copy link

Zren commented Jul 22, 2015

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

@Flink
Copy link
Owner

Flink commented Jul 23, 2015

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

One way to do it I think is this:

  • stop your dokku applications
  • dump all your databases then destroy them
  • stop the PG container then destroy it
  • delete the ~dokku/.psql-sc directory
  • change the base image for the plugin to PG 9.4
  • start the new PG container
  • recreate databases for your applications
  • restore your databases from your dumps

So beware and backup your data! 😁

@Flink Flink added the question label Jul 23, 2015
@henrik
Copy link

henrik commented Aug 30, 2015

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
Copy link

henrik commented Aug 30, 2015

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
Copy link
Owner

Flink commented Aug 31, 2015

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

@henrik
Copy link

henrik commented Sep 2, 2015

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

@Flink Flink closed this as completed Sep 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants