Upgrading standalone MongoDB

When you upgrade a standalone MongoDB, the MongoDB server is down during the upgrade process.

The following diagram provides an overview of the upgrade process.


When you perform the upgrade, also consider the following:

To manually upgrade the MongoDB instance using MMAP engine 

Otherwise, you can manually upgrade MongoDB:

  1. Download 3.0 binaries from the following location:
  2. Stop the mongod instance. 
    • Windows: Go to Services and stop Mongod service.
    • Unix: Run the following command:
      /etc/init.d/<mongod service name> stop
  3. Replace the existing binaries with the 3.0 mongod binaries.
  4. Start the mongod instance. 
    • Windows: Go to Services and start Mongod service.
    • Unix: Run the following command:
      /etc/init.d/<mongod service name> start

To change the storage engine to WiredTiger

  1. Download 3.0 binaries from the following location:

  2. Export the data using mongodump. 
    Run the following command: 
    mongodump --db social --out <exportDataDestination>

    The --out command ensures that social data is exported to the specified folder.

  3. Upgrade mongodb binaries
    1. Stop the mongod instance. 
      Windows: Go to Services and stop Mongod service.
      Unix: Run the following command:
      /etc/init.d/<mongod service name> stop
    2. Replace the existing binaries with the 3.0 mongod binaries.
      Location: ...\bmc software\Smart_IT_MyIT\Smart_IT_MyIT\mongodb\bin
       
  4. Change the storage engine to WiredTiger. 

    1. Create data directory for WiredTiger.

    2. Edit your mongodb config file and add the following line.
      storageEngine = wiredTiger
      dbpath = <path to wiredtiger data folder>

    3. Start the mongod with WiredTiger.

  5. Import the data using mongorestore. 

Related topics

Upgrading Elasticsearch

Uninstalling Elasticsearch

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Paul Seager-smith

    There is a typo in the DB export command, it should read:

    mongodump –-db social --out <exportDataDestination>

    Jan 07, 2016 08:29
  2. Greg Donalson

    How come the picture at top has the steps:

    1. Export the mongo db data using mongodump
    2. Upgrade the mongo db binaries

    But if you follow the steps underneath the picture, it lists them opposite.  It says to Upgrade the binaries and then export using mongodump.  This is confusing...

     

    Jan 13, 2016 03:56
    1. Amit Durgapal

      Hello Greg,

      Thanks for pointing this out. I have updated the steps and the screenshot.

      Regards,

      Amit 

      Jan 19, 2016 02:56
      1. Greg Donalson

        Hi Amit,

        It is still incorrect...

        Greg

        Jan 21, 2016 02:49