Configuring a MongoDB Client

After you install the MongoDB Agent, configure a client for the MongoDB instance that you want to protect.

The client computer is the interface that you use to manage the MongoDB instance.

Before You Begin

  • A secondary node is required to perform backups in replica set configuration. In a sharded cluster configuration, each sharded server has to be a replica set with at least one secondary node.

    Note

    If you have a single node replica set that has only a primary node, add the bMongoDBEnableBkpForSingleNodeRepSet additional setting to the client node that you want to back up.

  • If the client name and the MongoDB host name are different, the mongodb host name must have an IP address resolvable by Commvault, and must be part of the bind_ip command line option on the MongoDB server.

  • Verify that the parameters in the TLS/SSL CA certificate file and the TLS/SSL pem key file have the same names across all the nodes. The TLS/SSL pem key password value must be the same on all the nodes of the cluster.

  • Verify that the security.keyFile parameter value is same across all the nodes of the cluster.

  • Verify that all mongod and mongos instances are running with config files. The config files must be in YAML format on all operating system platforms.

  • When protecting MongoDB deployments that has authentication enabled, use a database user that has any of the following roles:

    • Root role on the admin database. This is a superuser role.

    • A subset of roles (backup, restore, clusterAdmin) on the admin database. These roles should be used if the you do not want to assign the superuser role to the database user.

    In sharded cluster deployments, ensure the same database user is created on all the sharded servers and the config server.

  • Commvault software is not required on the arbiter node of the MongoDB cluster. During the discovery of nodes, no client is associated with the arbitor node. However, this does not affect the backup or restore operations.

  • On Linux platforms, by default, the default subclient uses the IntelliSnap Native engine (Logical Volume Manager (LVM) snapshots) for the snapshot operations.

    For Linux LVM snaps, there must be adequate free space in the LVM volume group for snapshot creation. The default COW cache size is set to 4096 MB or 5% of the volume size, whichever is greater. To increase the COW cache size, configure the nSnapCowSizeMB additional setting. For instructions on adding the additional setting, see Adding or Modifying Additional Settings from the CommCell Console.

Procedure

  1. From the CommCell Browser, expand Client Computers, point to New Client > Big Data Apps, and then click MongoDB.

    The Create MongoDB Client dialog box appears.

  2. On the General tab, enter the MongoDB cluster details:

    1. In the Client Name box, type a unique name for the pseudo-client.

    2. In the Instance Name box, type the name that represents the MongoDB cluster in the CommCell Console.

    3. From the Master Node list, select the MongoDB node that the Commvault software connects to, and uses for managing and initiating MongoDB data protection operations.

      The master node must connect to other nodes of the cluster to gather information for controlling the identified secondary nodes of the cluster. If the ports between the master node and other nodes of the cluster are blocked, a firewall must be configured for communication.

      In sharded cluster deployments, the mongos node is the master node. In replication set deployments, any node in the replication set is the master node.

    4. In the Master Hostname box, type the MongoDB master node server host name.

    5. In the OS User Name box, enter the OS user name that you want to use to run the MongoDB servers.

      Commvault software uses the OS user name to start the MongoDB servers after the restore operation.

      Note

      The OS user must have the permission to start the server and has ownership to the files in dbPath.

    6. In the DB User Name and Password boxes, type the credentials for a user that can connect to the MongoDB database. The Commvault software connects to the database with this user.

      Note

      Log backups with authentication are not supported on Windows.

    7. To enable SSL authentication for MongoDB, select the Use MongoDB SSL check box, and then enter the credential:

      What

      Steps

      Existing credential

      • From the Credential list, select the credential that you want to use.

      New credential

      1. From the Credential list, click Create New.

        The Create user credential dialog box appears.

      2. In the Credential name box, enter a name for the credentials.

      3. In the SSL CA Certificate path box, enter the full path to the Certificate Authority (CA) file that will be used with the mongo commands.

      4. In the SSL PEM key file box, enter the full path to the client pem key file that will be used with the mongo commands, to connect to the MongoDB server.

      5. In the SSL PEM key password box, enter the password to decrypt the client certificate key file.

      6. Click OK.

    8. In the Binary path box, type the full path to the MongoDB binary files.

      The Commvault software uses mongo/mongosh, mongod, mongodump, and mongorestore for backup and restore operations. Keep the binaries in bin path and verify that the bin path is same across all the nodes in the cluster.

    9. In the Port Number box, type the port number that the Commvault software uses for the MongoDB connection.

  3. On the Storage Device tab, on the Data Storage Policy tab, from the Storage Policy used by default subclient list, select the storage policy.

  4. On the Details tab, click Discover.

    The software discovers the MongoDB nodes, and then displays the following details by default:

    • The physical client name.

    • The MongoDB node host name.

    • The name of the shard that the client is part of, If the client computer is part of a MongoDB shard.

    • The MongoDB type, for example, replica set, or mongos router.

    • The MongoDB role, for example primary server, secondary server or arbitor.

      Note

      You can customize the column layout to include the log file path, the MongoDB version or the port number. For more information, see Customizing CommCell Console Columns and Windows.

  5. Click OK.

Result

The software creates the following entities:

  • The client

  • An instance with the name that you specified

  • A default subclient

Loading...