[Windows 10] When I was upgrading Mongo community(3.6 - 4.2), I had to clear data/db/ folder. So i lost all databases. Is there any way to prevent data loses? I know i can take backup using Studio 3T (Exporting and importing). But i dont want to do that because exporting and importing all dbs will really be a cumbersome. Suggest me something from which i can migrate 3.6 - 4.2. without clearing db folder. I have tried migrating to 4.2 on a different PC, now i want to do that with my system too.
Also tried this - db.adminCommand( { setFeatureCompatibilityVersion: "4.2" } ).