I am planning to upgrade existing MongoDB installations from 3.6 (or 4.0 depending on the needs) and I find that it is necessary that you do incremental updates during the process, that is you need to upgrade to 3.4 to 3.6 then to 4.0. The process looks tedious and I would like to know if there is a way to migrate the existing data between versions especially for cases such as 3.4 to 4.0 or <3.4 to 3.6 (i.e. one or more version in between).
For example, would dumping the data via mongodump
from the older version and restoring it in the new version via mongorestore
would work and preserve information such as indexes in the process?