HA Update when MongoDB Version is Lower Than 4.2

When you are updating a Windows high availability system, if your version of MondDB is lower than 4.2, create a new replica set, and use mongoDump/mongoRestore.

To create the new replica set:

  1. Back up servers. 
    1. Create a backup or snapshot for all servers.
    2. Perform a complete database dump.
  2. Remove all replica sets.
    1. Stop all FileCloud services.
    2. Remove all replica sets, TLS, and authentication parameters in mongod.conf for all db nodes.
      Details about the configuration can be found at FileCloud High Availability.
    3. Delete DB data folder content for all DB nodes:
      Linux: /var/lib/mongo/
      Windows: C:\xampp\mongodb\bin\data\
    4. Start MongoDB on all nodes.
    5. Confirm that you can connect to all DB nodes with the mongo shell without authentication and TLS and if the replica set is disabled:

      > rs.status()
      {
              "ok" : 0,
              "errmsg" : "not running with --replSet",
              "code" : 76,
              "codeName" : "NoReplicationEnabled"
      }
                                                                                                                                               C/C++ detected
    6. Stop MongoDB on all nodes and remove the data folder content again.

  3. Perform a standard FileCloud update.

  4. Create a cluster and restore data.
    1. Create a new cluster.
    2. Restore DB dump using mongorestore.