Set-VBRSimpleRetentionPolicy
Short Description
Modifies a retention policy for backup copy jobs that process backups stored on external repositories.
Platform: VMware, Hyper-V
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Set-VBRSimpleRetentionPolicy -RetentionPolicy <VBRSimpleRetentionPolicy> [-RestorePoints <Int32>] [<CommonParameters>] |
Detailed Description
This cmdlet modifies a retention policy for backup copy jobs that process backups stored on external repositories.
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 |
|---|---|---|---|---|---|
|
RestorePoints |
Specifies a number of restore points. |
|
False |
Named |
False |
|
RetentionPolicy |
Specifies a retention policy for a backup copy job. The cmdlet will modify this policy.
Accepts the |
|
True |
Named |
True (ByValue) |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
The cmdlet returns the VBRSimpleRetentionPolicy object that contains a retention policy for backup copy jobs that process backups stored on external repositories.
Examples
Modifying Retention Policy for Backup Copy Job
This example shows how to modify a retention policy for a backup copy job. The target backup repository will keep the last 5 restore points.
|
$job = Get-VBRJob -Name "EC2 BCJ 01" $policy = Get-VBRRetentionPolicy -Job $job Set-VBRSimpleRetentionPolicy -RetentionPolicy $policy -RestorePoints 5 |
Perform the following steps:
- Run the
Get-VBRJobReturns existing jobs. cmdlet. Specify theNameparameter value. Save the result to the$jobvariable. - Run the
Get-VBRRetentionPolicyReturns a retention policy for backup copy jobs. cmdlet. Set the$jobvariable as theJobparameter value. Save the result to the$policyvariable. - Run the
Set-VBRSimpleRetentionPolicycmdlet. Set the$policyvariable as theRetentionPolicyparameter value. Specify theRestorePointsparameter value.
Related Commands
Get-VBRJobReturns existing jobs.Get-VBRRetentionPolicyReturns a retention policy for backup copy jobs.