I have an install of 3.6 server with 4.2 tools etc and I am trying to get to a 6.0 version to support the latest release of graylog.
The docs say I can’t get to 4.2 without going to 4.0 first and I can’t do that because it requires libcurl3 7.16.2 or lower. I tried installing via deb and forcing it but it won’t even start.
The upgrade should have been stepped though on the supported OS version(s).
Debian 9 would have allowed an upgrade to version 5.0
As for options:
A) Copy the database to a Debian 9 system and upgrade it through to 5.0 then bring it back over and then go to 6.0
B) Do it in Docker. docker run --name upgmongo --rm -v /var/lib/mongodb:/data/db mongo:4.0 docker exec -it upgmongo mongosh … do additional upgrade steps. Then repeat for 4.2, 4.4, 5.0
As 6.0 is this system then complete the 6.0 step
C) Do it in a Debian 9 chroot, bind mount the database directory in it. (I prefer doing it on Docker, but I just tried this, Strech chroot on Ubuntu 20.04 )
D) Get the existing datafiles running however and mongoexport/mongoimport. Not a “supported” method but it could save you a few upgrade steps if it does work.
Obligatory back up your data before doing anything.
You mongoexport from the old and mongoimport into the new, you can even pipeline it.
But if I understand the situation you have a set of datafiles you can’t currently start a database with, so getting back to your base case of 3.6 running will be needed.
I ended up using mongodump as somewhere else somebody said it was better and using this I was able to jump from 3.6 all the way to 6.0.
For anyone else that comes across this thread I was being held back by the unifi package for ubiquiti unifi network management and the newest version of graylog requires 5.0 or greater.