New-VBRMongoDBDeployment

Short Description

Connects to and adds MongoDB replica sets to protection groups.

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides the following parameter sets:

  • Credentials (Default)

    New-VBRMongoDBDeployment -HostName <String> -Port <Int32> -Credentials <CInternalCredentials> [<CommonParameters>]

  • SecureCredentials

    New-VBRMongoDBDeployment -HostName <String> -Port <Int32> -Credentials <CInternalCredentials> [-UseTls]

    [-ClientCertificatePath <String>] [-ClientCertificatePassword <String>] [-CACertificatePath <String>] [<CommonParameters>]

  • ClientCertificateSetName

    New-VBRMongoDBDeployment -HostName <String> -Port <Int32> [-UseTls] -ClientCertificatePath <String>

    [-ClientCertificatePassword <String>] [-CACertificatePath <String>] [<CommonParameters>]

Detailed Description

This cmdlet discovers replica sets using a single MongoDB daemon within the deployed MongoDB application.

Keep in mind the following requirements:

  • You must input a host name, TCP port and valid credentials for the MongoDB application admin database.
  • The MongoDB application user must have the backup role.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

CACertificatePath

Specifies the folder path to the CA certificate. Use this parameter to verify MongoDB server certificates.

String

False

Named

True (ByPropertyName)

ClientCertificatePassword

Specifies the password for a client certificate.

String

False

Named

True (ByPropertyName)

ClientCertificatePath

Specifies the folder path to a client certificate. Use this parameter for mTLS and x509 authentication methods.

This parameter is required when using the ClientCertificateSetName parameter set.

This parameter is not required when using the SecureCredentials parameter set.

String

False

Named

True (ByPropertyName)

Credentials

Specifies the credentials you want to use for authenticating with the MongoDB replica set.

Accepts the CCredentials object. To create this object, run the Get-VBRCredentialsReturns credentials records. cmdlet.

CInternalCredentials

True

Named

True (ByPropertyName)

HostName

Specifies the DNS name or an IP address of the computer that you want to use within the MongoDB application protection group.

Note: Keep in mind that the MongoDB application host list becomes a template for the MongoHosts list for the UI. You can manually select which hosts should be included in the pool group. After that, you can use Linux root access credentials to automatically deploy Veeam Agent for Linux on the selected hosts.

String

True

Named

True (ByPropertyName)

Port

Specifies the port number over which Veeam Backup & Replication communicates with the MongoDB replica set. By default, Veeam Backup & Replication uses port 27017.

Int32

True

Named

True (ByPropertyName)

UseTls

Specifies the use of the TLS certificate to secure the TLS connection between the Veeam infrastructure and MongoDB deployment.

SwitchParameter

False

Named

True (ByPropertyName)

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

VBRMongoDBDeployment

Examples

Replica Set Connection and Data Loading

This example shows how to connect to a replica set and load the data from it.

$mongoCredentials1 = Get-VBRCredentials -Name "admin"

$replicaSet1 = New-VBRMongoDBDeployment -HostName host01 -Credentials $mongoCredentials1 -Port 27017

Perform the following steps:

  1. Run the Get-VBRCredentialsReturns credentials records. cmdlet. Specify the Name parameter with the user account you want to connect with. Save the result to the $mongoCredentials1 variable.
  2. Run the New-VBRMongoDBDeployment cmdlet.
    • Specify the HostName parameter with the DNS name or IP address of the computer within the replica set.
    • Specify the Credentials parameter with the $mongoCredentials1 variable.
    • Specify the Port parameter with the port number 27017.

Page updated 2026-09-02

Page content applies to build 13.1.1.18