Set-VBRMongoDBOplogProcessingOptions
Short Description
Modifies operations log (oplog) processing options for MongoDB replica sets.
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Set-VBRMongoDBOplogProcessingOptions -Options <VBRMongoDBOplogProcessingOptions> [-BackupObject <Object>] [-EnableOplogProcessing] [-OplogBackupPeriod <Int32>] [-OplogRetentionPolicy <VBRMongoDBOplogRetentionPolicy>] [-OplogRetentionPeriod <Int32>] [<CommonParameters>] |
Detailed Description
This cmdlet modifies the parameters of existing oplog processing options for MongoDB Replica sets. Use this cmdlet and its parameters to update the oplog backup period, retention period and retention policy.
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
BackupObject |
Specifies an array of MongoDB replica set and protection group objects. The cmdlet will add these entities to the application backup policy.
Accepts the |
|
False |
Named |
True (ByPropertyName) |
|
EnableOplogProcessing |
Enables the processing of existing oplogs of MongoDB replica sets. |
|
False |
Named |
True (ByPropertyName) |
|
OplogBackupPeriod |
Modifies the interval in minutes at which the system collects the oplog backup after an image-level backup operation. Default: 15 minutes. |
|
False |
Named |
True (ByPropertyName) |
|
OplogRetentionPeriod |
Modifies the retention period of the oplog in the backup repository in days. Default: 15 days |
|
False |
Named |
True (ByPropertyName) |
|
OplogRetentionPolicy |
Modifies the oplog retention policy settings:
|
|
False |
Named |
True (ByPropertyName) |
|
Options |
Specifies the existing processing options for oplogs of MongoDB replica sets.
Accepts the |
True |
Named |
True (ByPropertyName, ByValue) |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
The cmdlet returns the VBRMongoDBOplogProcessingOptions object that configures processing settings for oplogs for MongoDB replica sets.
Examples
Change Existing Oplog Processing Options
This example shows how to change existing oplog processing and retention settings, and add them to an existing MongoDB oplog application backup policy.
|
$rs = Get-VBRDiscoveredApplication -MongoDBEntityType ReplicaSet $oplogOptions = New-VBRMongoDBOplogProcessingOptions -BackupObject $rs[0] -EnableOplogProcessing $newOplogOptions = Set-VBRMongoDBOplogProcessingOptions -Options $oplogOptions -BackupObject $rs[0] -OplogRetentionPolicy KeepLastDays -OplogRetentionPeriod 7 $backupRepo = Get-VBRBackupRepository Add-VBRMongoDBBackupJob -Name ps_mongo_job -BackupObject $rs[0] -BackupRepository $backupRepo[0] -OplogProcessingOptions $newOplogOptions[0] |
Perform the following steps:
- Run the
Get-VBRDiscoveredApplicationReturns discovered applications from the computer. cmdlet to get the replica set. Specify theMongoDBEntityTypeparameter value. Save the result to the$rsvariable. - Run the
New-VBRMongoDBOplogProcessingOptionsEnables operations log (oplog) processing options for MongoDB replica sets. cmdlet. Specify theBackupObjectandEnableOplogProcessingparameter values. Save the result to the$oplogOptionsvariable. - Run the
Set-VBRMongoDBOplogProcessingOptionscmdlet.- Specify the
Optionsparameter value with the$oplogOptionsvariable. - Specify the
BackupObjectparameter value with the$rsvariable. - Specify the
OplogRetentionPolicyparameter value with theKeepLastDaysvariable. - Specify the
OplogRetentionPeriodparameter value with the number of days of retention. - Save the result to the
$newOplogOptionsvariable.
- Specify the
- Run the
Get-VBRBackupRepositoryReturns a list of backup repositories. cmdlet. Save the result to the$backupRepovariable. - Run the
Add-VBRMongoDBBackupJobCreates MongoDB backup policies. cmdlet.- Specify the
Nameparameter value with the name of the backup job. - Specify the
BackupObjectparameter value with the$rsvariable. - Specify the
BackupRepositoryparameter value with the$backupRepovariable. - Specify the
OplogProcessingOptionsparameter value with the$newOplogOptionsvariable.
- Specify the
Related Commands
Get-VBRDiscoveredApplicationReturns discovered applications from the computer.New-VBRMongoDBOplogProcessingOptionsEnables operations log (oplog) processing options for MongoDB replica sets.Get-VBRBackupRepositoryReturns a list of backup repositories.Add-VBRMongoDBBackupJobCreates MongoDB backup policies.