Skip to content

Migrating from 2.2-95 to current version #316

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

Closed
Lett1 opened this issue Apr 12, 2020 · 4 comments
Closed

Migrating from 2.2-95 to current version #316

Lett1 opened this issue Apr 12, 2020 · 4 comments

Comments

@Lett1
Copy link

Lett1 commented Apr 12, 2020

Hey there, I'm running an old szurubooru instance on http://gondbooru.lett.at/ and I want to upgrade to the new docker version, my main question is: how do I migrate to the new version? Can I just point the docker container to the old postgres DB and have it migrate automatically? And if that's not possible, export and reimport all the posts/users and so on?

@sgsunder
Copy link
Collaborator

Yes. There are alembic migration scripts that are called on startup to migrate the database. I would still highly recommend making a database backup first, given how old the revision you are currently running is.

@Lett1
Copy link
Author

Lett1 commented Apr 12, 2020

I take it that this does migrate the data from elasticsearch as well?

@sgsunder
Copy link
Collaborator

It regenerates the image signature data again. It takes a bit of time and CPU to do, but is done when the site is online. No data is lost (elasticsearch didn't really store any data that couldn't be computed again) so you can safely delete the index even before the migration.

@Lett1
Copy link
Author

Lett1 commented Apr 12, 2020

Ok so I'm done, here's what I did:

  • Make a dump of the database
  • Follow INSTALL.md until you start the containers, at this point only start the sql container
  • Restore dump into the sql container
  • Continue setup, you might want to upgrade nginx

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