Upgrade from v3.6 to v4.0 on Debian 10

Hello,

I am currently running MongoDB version 3.6 on Debian 10 and intend on upgrading to MongoDB version 4.2. However, the docs (https://www.mongodb.com/docs/manual/release-notes/4.2-upgrade-standalone/) state that MongoDB must first be upgraded to version 4.0 as an intermediate step. My issue is that there appears to be no MongoDB 4.0 package for Debian 10 (it appears that 4.2 is the oldest release available).

Is there a known solution to this issue?

Thanks,
Greg

Debian 10 was not a supported platform until 4.2.1 it is an interesting quirk that 3.6 does happen to run on it.

It may be possible to cobble the dependencies together and install using the earlier Debian version packages but using the supported OS is the best way.

Using a containerized version of debian 9 (docker/lxc) will allow the upgrade of the database and leave the host OS in a good state.

Another option is mongodump/mongorestore. A dump restore can be completed between versions with some possible limitations.

:information_source: You can restore the BSON files generated from mongodump into MongoDB deployments running the same or newer version as the source deployment.

This guarantee does not apply to metadata, archive, or oplog replay files. If you try to restore these files using different source and destination deployment versions, the mongorestore process could result in failure, silent failure, or corrupted metadata.

https://www.mongodb.com/docs/database-tools/mongodump/#restore-to-matching-server-version

Thanks, @chris! I will attempt the containerized option.

Greg

1 Like