Closed ryansch closed 2 months ago
@ryansch thanks for this! It's a shame that you weren't able to do an in-place upgrade, but it's probably for the best (letting the users control it). It's also a shame that Ubiquiti chose MongoDB, and that they don't support a modern version of it.
I did the upgrade and had zero issues. Took 5 minutes total. For anyone who finds this and wants to upgrade, here is what I did:
.unf
file)cp -pr
) the old volume (just to be safe)docker compose down -v
docker compose up -d
This is from inside the container. Shiny new MongoDB:
root@54551b684b16:/var/lib/unifi# mongod -version
db version v3.6.23
...
...
root@54551b684b16:/var/lib/unifi# cat /var/lib/unifi/db/WiredTiger.turtle
Compatibility version
major=3,minor=0
WiredTiger version string
WiredTiger 3.1.1: (July 12, 2018)
...
...
I'm going to keep an eye out for issues in the next few days, but so far, so good! Thanks again!
@ryansch FYI that 7.5.172
requires MongoDB 3.6 or newer.
@loganmarchione I'm finally dealing with this.
@ryansch Do you need any help with this? I'm keen to get onto 8.1.
EDIT: reading the post above from @loganmarchione, it seems that a simple backup/upgrade/restore cycle is the process to move onto Mongo 3.6?
I just tried shipping mongo 7 only to find that only pi 5s can run it. That's not going to work for a more general purpose docker container.
It looks like we'll need to work with 4.4.
I just shipped 8.1 with mongo 4.4.18. Works on my pi4.
Backed up my UniFi config and volumes, followed @loganmarchione 's steps above, and everything seems to work fine. It automatically restarted and seemed no worse for wear; devices were adopted correctly and all functionality seems to be present. This was an update from 8.0.7 to 8.2.93.
@ryansch Thank you so much for continuing to maintain this, and taking steps like this to keep up to date.
Why?
We have to upgrade mongo because we can't get packages for the incredibly old 2.x series any longer. This is also why I had to drop support for 32-bit rasperry pis (arm32).
We are able to grab packages from Ubuntu Xenial for mongo 3.6 so that's the way forward. (Many thanks to
GLENNR
on the unifi forums! Website here: https://glennr.nl)How?
First we're now spitting out this message when you upgrade the container from a version running mongo 2.4 to one running 3.6:
This puts the power to schedule the upgrade in the hands of the end user. If you're here because of that message, you can pin the previous working version in
compose.yml
and bring your controller back up.If you're ready to upgrade, you need a recent backup generated by the unifi controller. If you need to download one, pin the last working version and bring the controller back up to generate and download said backup.
Once you have your backup in hand, run
docker compose down -v
from your unifi directory. This will DELETE ALL OF YOUR DOCKER VOLUMES for unifi. Please only do this step once you're ready.Next bring the new version of the controller up and instruct the setup wizard to restore from backup.
If you're having issues or have helpful information, please post it below!