Mongo DB - update server to a new version

Dani_S 5,581 Reputation points

Hi,

1.I'm using Maui app in version 9, in VS 2026 , last update.

2.I'm using Mongo: with this app as follow:

Server: version 7.0.3.

Client (compass): version 1.42.2

πŸ‘ User's image

  1. There is vulnerability in server version, please see , and use Google Translate to English.

https://www.pc.co.il/news/%D7%90%D7%91%D7%98%D7%97%D7%AA-%D7%9E%D7%99%D7%93%D7%A2-%D7%95%D7%A1%D7%99%D7%99%D7%91%D7%A8/443330/

4.My questions are:

A.I want to keep my data safely after upgrade.

B. How to upgrade the mongo sever with anew version 8.2.3 ?

C. Does it will remove the old version?

D. Or it will install it side by side? if yes, which version , the MAUI app will use?

E. What is the best practice for upgrading Mongo server ?

F. Does data will be damaged ? how can I checked it?

G. What about the client (compass), version 1.42.2 , it supports the new mongo server 8.2.3 ?

Thanks,

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Michael Le (WICLOUD CORPORATION) 11,330 Reputation points β€’ Microsoft External Staff β€’ Moderator

Hello @Dani_S ,

For most of your questions about MongoDB Server, you’ll get the best support by asking in the MongoDB community. Although technical questions are no longer supported on the official forum, you can post your questions on their recognized forums such as Stack Overflow and Reddit.

While these are non-Microsoft websites, they are the official community forums for MongoDB.

That said, I can answer a couple of your questions related to how this affects your MAUI app:

  • The standard MongoDB Windows MSI installer does not install side by side. It performs an in-place upgrade, replacing the old version’s binaries with the new version. Your data directory remains in the same location.
  • Your MAUI app will connect to whichever MongoDB server is running based on your connection string. The connection string in your MAUI app (usually something like mongodb://localhost:27017/yourDatabase) points to a specific host and port. Whichever MongoDB service is running on that host/port is what your app will use.
  • If you need more control or want to run multiple versions simultaneously, you would need to manually install MongoDB in different directories and configure them to use different ports. However, that’s not the standard approach and adds unnecessary complexity.

I hope this clarifies things, and Happy New Year.

  1. Dani_S 5,581 Reputation points

    Hi Michel,

    Thank you very much for your help.

    Please look on this documents which upgrade my server and client to the recommended

    versions: Upgarde Mongo.docx

    Can you please help me , how to run the commands in documents ,is not running in command line as admin, not recognized the commands both of server and clients tools.

    Maybe need to run it from mongo folder ? if yes how ?

    Your quick answer will be helpful.

    Thanks you very much.

  2. Dani_S 5,581 Reputation points
  3. Michael Le (WICLOUD CORPORATION) 11,330 Reputation points β€’ Microsoft External Staff β€’ Moderator

    I recommend checking if mongosh is installed on your system. You can either:

    • Find where mongosh is installed (if it’s installed at all)
    • Install mongosh separately if you don’t have it yet

    For more details, the MongoDB documentation covers this topic. You can check out Install mongosh and Run commands.

    While these are non-Microsoft links, they are official MongoDB documentation pages.

  4. Dani_S 5,581 Reputation points

    Hi Michel,

    Thank you very much for your help it was very helpful.

    Suumarize:

    Problem:

    What’s the Risk Right Now? (CVE-2025-14847)

    There’s a high-severity security flaw in the MongoDB Server zlib compression component that can allow an unauthenticated attacker with network access to your database port to leak memory contents (potentially including credentials, session tokens, and config data)

     Effects:

    Affected versions include:

    • MongoDB 7.0.0 – 7.0.26 (our current version 7.0.3 is vulnerable)
    • and many others older than the patched releases.

     Solution Options:

    1. Since we are on MongoDB 7.0.3, the minimum safe upgrade to fix CVE-2025-14847 is: MongoDB 7.0.28 or later (patch release in the 7.0 branch) πŸ“Œ

    2. Upgrade to MongoDB 8.0.17 or 8.2.3

    (newer supported branches with  newer features.

     Decision

    1. Since our app does not support the new features of 8.0.17 or 8.2.3

    we will upgrade to MongoDB 7.0.3  this time.

    2. Since we have also for client isolated compass as separated installation, we need to update it to version 1.48.2 also because of 1.

    3.Files:

    Before:

    Server: mongodb-windows-x86_64-7.0.3-signed.msi

    Client: mongodb-compass-isolated-1.42.2-win32-x64.msi

    After:

    Server:

    File name: mongodb-windows-x86_64-7.0.28-signed.msi

    Link to download: Download MongoDB 7.0.28 (Windows MSI installer) πŸ‘‰ https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-7.0.28-signed.msi

    Client:

    File name:mongodb-compass-isolated-1.48.2-win32-x64.msi

    Link to download: Download Latest Stable Isolated Edition (1.48.2)

    πŸ‘‰Download the Windows MSI (Isolated Edition) from the official GitHub releases:https://github.com/mongodb-js/compass/releases/download/v1.48.2/mongodb-compass-isolated-1.48.2-win32-x64.msi

    4.Backup

    1. Install mongodb-database-tools-windows-x86_64-100.14.0.msi for Windows from:

    πŸ‘ MongoDB Command Lune Database Tools Download

    Β· 2.Add this path C:\Program Files\MongoDB\Tools\100\bin to Environment

    Variables.

    1. Create MongoDB folder on your desktop. Open this folder and press on the path cmd, the Command Prompt will be open.

    πŸ‘ User's image

    πŸ‘ User's image

    Run this command in Command Prompt: mongodump

    βœ” This creates a full backup.

    βœ” If anything goes wrong, you can restore easily.
    
    βœ” The full backup.
    

    πŸ‘ User's image

    βœ” The data collections are located in AutomationManager folder.

        Each collection contains from  collection_name_matadata.json and

        collection_name.bson(data itself).         

        Both files can be opened in Notepad editor and see the data.

    5.Restore

    1.Open the MongoDB client(compass isolated)

    and delete the infected DB - in our case AutomationManager DB.

    2.Run this command in Command Prompt: mongorestore.

    and my AutomationManager DB is restore.

    **My question how **mongorestore know how to restore the AutomationManager DB? Does it used dump back folder ?

    Please see this video :

    https://www.youtube.com/watch?v=qcGYBsdOc8I

    Thanks in advance,

  5. Michael Le (WICLOUD CORPORATION) 11,330 Reputation points β€’ Microsoft External Staff β€’ Moderator

    Glad to hear you managed to resolve the issue. Regarding your questions about how mongorestore works, please see https://www.mongodb.com/docs/database-tools/mongorestore/ for more details.

    While this is a non-Microsoft link, it is the official documentation for MongoDB.

    In your case, when running mongorestore:

    • By default, it looks for a folder named dump in your current directory.
    • It reads all the database folders inside dump.
    • It finds the AutomationManager folder and restores all the .bson files and .json metadata files inside it.

1 additional answer

  1. Jack Dang (WICLOUD CORPORATION) 18,970 Reputation points β€’ Microsoft External Staff β€’ Moderator

    Hello Dani,

    I'm glad to hear that the upgrade and backup process worked successfully.

    Regarding your question, mongorestore does not automatically know about the original database. By default, it restores data from the dump folder in the current working directory. If the backup is stored in a different location, you can specify the path explicitly when running mongorestore.

    As a best practice, after a restore operation, verify that the expected databases and collections are present and that your application can access the restored data correctly.

    I hope this helps. Let us know if you have any further questions.

    0 comments No comments