Hi @marc,
Skipping over major release versions for an in-place upgrade (i.e. using the same data files) is currently not supported. Any required changes to data files are performed as part of each major version upgrade.
If you want to perform an in-place upgrade from MongoDB 4.2 to MongoDB 5.0 you need to:
-
Upgrade MongoDB 4.2 to MongoDB 4.4 (note the important final step to Enable backwards-incompatible 4.4 features).
Per the MongoDB Production Notes, Ubuntu 20.04 is currently supported for MongoDB 4.4 and 5.0. Ubuntu 20.04 is a Long Term Support (LTS) Ubuntu release, so it won’t reach End-of-Life until April, 2025.
Regards,
Stennie