[SOLVED] Upgrade path from 3.2.5

When things don't work as they should.
Post Reply
dusbus
Posts: 7
Joined: Sun Jun 16, 2019 6:34 pm

[SOLVED] Upgrade path from 3.2.5

Post by dusbus »

I'm currently running 3.2.5 via Docker on a postgres 9.5. A few months ago I tried upgrading via the usual procedure (deleted the container while preserving the volumes) but unfortunately it didn't quite work out. It seems that the upgrade to postgres 9.6 had broke something, so I decided to dump the volumes as well and install a fresh instance, importing my SQL backup + copying the documents back into place. Sadly this didn't work either so after a little bit of fiddling and troubleshooting I had to roll everything back to 3.2.5 and 9.5.

Since I got some time to spare I'd like to give the upgrade another shot, but I'm not quite sure what the ideal upgrade path to the most recent version would be. Before I start wasting time on things that are likely to fail, I'd very much appreciate some advice.

Thank you for your time! :)
User avatar
rssfed23
Moderator
Moderator
Posts: 213
Joined: Mon Oct 14, 2019 1:18 pm
Location: United Kingdom
Contact:

Re: Upgrade path from 3.2.5

Post by rssfed23 »

When you tried again recently to 3.3, did you update all your environment variables at the same time?
A few of them have changed since 3.2.5, most notably MAYAN_BROKER_URL is now MAYAN_CELERY_BROKER_URL and a couple of others.
I strongly recommend reading the release notes over at https://docs.mayan-edms.com/releases/3.3.html and the versions inbetween your old and newest version to get a full picture of the changes and any changes to your configuration that might result.

But yes; you'll need to update your database to postgres 9.6 or later. Version 12 isn't yet compatible, but everything up to and including 11 is. I've seen many reports of users with problems running 9.5 on the later versions.
Importing a backup into 9.6 is the main way to do it if you're using docker. We can't use the normal built in pg_migrate commands as that requires both versions to be installed in parallel then migrating the tablespaces, so a dump and load is the most reliable way.

There's nothing stopping you upgrading from 3.2.5 to the very latest 3.3.9 version. Any schema migrations that are required will happen when the new version first launches. But this is dependent on using the newer versions of various environment variables.
Once you've read the release notes to identify any changes or potential differences, have a look at the latest docker install instructions or the latest docker compose file if you're using compose and treat it as if you're doing a new install using those commands but change the value of any variables to be what you need (for things like DB passwor etc). There's a lower risk of a variable being missed that way.
Also, you'll need to run your own dedicated Redis container now as Mayan doesn't bundle Redis within it anymore (you'll notice this in the install instructions/release notes).
It's definitely possible to go from 3.2.5 > 3.3.9. The hardest bit is the DB migration which it sounds like you've got covered already.
Please bear with us during the current global situation. The team all have families and local communities to look after as well as the community here. Responses may be delayed during this time, but rest assured we will get to your query eventually.
dusbus
Posts: 7
Joined: Sun Jun 16, 2019 6:34 pm

Re: Upgrade path from 3.2.5

Post by dusbus »

Thanks a bunch for all that helpful information, much appreciated.. I'll take some time to study the release notes as well as following the upgrade path you've described. Hopefully this weekend I'll be able to give this another spin. I'll let you know how it turned out.

Thanks again!
dusbus
Posts: 7
Joined: Sun Jun 16, 2019 6:34 pm

Re: Upgrade path from 3.2.5

Post by dusbus »

Just worked through the update, 3.3.12 is up and running like a charm.

Thanks again for the advice!
User avatar
rssfed23
Moderator
Moderator
Posts: 213
Joined: Mon Oct 14, 2019 1:18 pm
Location: United Kingdom
Contact:

Re: Upgrade path from 3.2.5

Post by rssfed23 »

Great to hear :)
Please bear with us during the current global situation. The team all have families and local communities to look after as well as the community here. Responses may be delayed during this time, but rest assured we will get to your query eventually.
Post Reply