Search code examples
windowsmongodbupgrade

How to upgrade MongoDB on Windows Server


How do you upgrade MongoDB on Windows server? Running the Windows installer for the new version only installs a new copy of MongoDB and ignores the existing copy.


Solution

  • Edit: First start the cmd.exe in admin mode and cd to the location of the old installation, for standard installations:

    cd C:\Program Files\MongoDB\Server\3.2\bin
    

    Stop all applications, which are accessing mongodb, then enter

    mongod --remove
    

    Then install the new mongo db, copy the mongod.cfg file from 3.2 to 3.4 directory. When you had one, otherwise follow the installation instructions for setting up the new service. This update worked fine for me, all data available, I didn't need to use this features switched off.