Set-VBRMongoDBContainer
Short Description
Modifies MongoDB containers that include an array of custom credentials.
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Set-VBRMongoDBContainer -Container <VBRMongoDBContainer> [-CustomCredentials <VBRMongoDBCustomCredentials[]>] [<CommonParameters>] |
Detailed Description
This cmdlet modifies the VBRMongoDBContainer object. This object contains the scope of computers included in a MongoDB container.
Note |
|
To modify settings, specify new values for the necessary parameters. The cmdlet will overwrite the previous parameter values with new values. The parameters that you omit will remain unchanged. |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
Container |
Specifies the MongoDB container that includes computers whose custom credentials you want to modify.
Accepts the |
True |
Named |
True (ByPropertyName, ByValue) |
|
|
CustomCredentials |
Specifies custom credentials of computers within the specified MongoDB container.
Accepts the |
False |
Named |
True (ByPropertyName) |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
The cmdlet returns the VBRMongoDBContainer object.
Examples
Adding a Replica Set to an Existing MongoDB Protection Group
This example shows how to add a MongoDB replica set to an existing MongoDB protection group.
|
$mongoCredentials = (Get-VBRCredentials -Name "admin")[1] $NewReplicaSet = New-VBRMongoDBDeployment -HostName host01 -Credentials $mongoCredentials -Port 27017 $rsComputers = Get-VBRMongoDBComputer -Deployment $NewReplicaSet $computer1CustomCredentials = New-VBRMongoDBCustomCredentials -Computer $rsComputers[1] -UseTemporaryCertificate $mng_PG = Get-VBRProtectionGroup -name "MongoDB Protection Group" $comp = $mng_PG.Container.CustomCredentials $comp += $computer1CustomCredentials $newcomp = Set-VBRMongoDBContainer -Container $mng_PG.Container -CustomCredentials $comp Set-VBRProtectionGroup -ProtectionGroup $mng_PG -Container $newcomp |
Perform the following steps:
- Create a new replica set:
- Run the
Get-VBRCredentialsReturns credentials records. cmdlet. Specify theNameparameter value with the user account you want to connect with. Save the result to the$mongoCredentialsvariable. - Run the
New-VBRMongoDBDeploymentConnects to and adds MongoDB replica sets to protection groups. cmdlet.
- Specify the
HostNameparameter value with the DNS name or IP address of the computer within the replica set. - Specify the
Credentialsparameter value with the$mongoCredentialsvariable. - Specify the
Portparameter value with the port number 27017. - Save the result to the
$NewReplicaSetvariable.- Run the
Get-VBRMongoDBComputerReturns a list of all computers within specified replica sets. cmdlet. Specify theDeploymentparameter value with the name of a specific replica set$NewReplicaSet. Save the result to the$rsComputersvariable. - Run the
New-VBRMongoDBCustomCredentialsCreates custom credentials for computers within MongoDB replica sets to be selected for backup operations. cmdlet. Specify theComputerparameter value with the name of a specific computer within the replica set. Use theUseTemporaryCertificateparameter to use a temporary certificate instead of custom credentials. Save the result to the$computer1CustomCredentialsvariable.
- Run the
- Run the
- Run the
Get-VBRProtectionGroupReturns protection groups. cmdlet. Specify theNameparameter value. Save the result to the$mng_PGvariable. - Get the scope of computers with MongoDB nodes. Use the
Container.CustomCredentialsproperty of the$mng_PGvariable. Save the result to the$compvariable. - Add the computer to the group of computers in the
$compvariable. Use the+=operator. - Run the
Set-VBRMongoDBContainercmdlet. Specify theContainerparameter value with theContainerproperty of the$mng_PGvariable. Specify theCustomCredentialsparameter value with the$compvariable. Save the result to the$newcompvariable. - Run the
Set-VBRProtectionGroupModifies protection groups. cmdlet. Specify theProtectionGroupparameter value with the$mng_PGvariable. Specify theContainerparameter value with the$newcompvariable.
Related Commands
Get-VBRProtectionGroupReturns protection groups.New-VBRMongoDBCustomCredentialsCreates custom credentials for computers within MongoDB replica sets to be selected for backup operations.New-VBRMongoDBContainerCreates a MongoDB container for an array of existing custom credentials.