Cleaning up the secondary backup count using PowerShell cmdlets

You can use the Remove-SmBackup cmdlet to clean up the backup count for secondary backups that have no Snapshot copies. You might want use this cmdlet when the total Snapshot copies displayed in the Manage Copies topology do not match the secondary storage Snapshot copy retention setting.

Before you begin

You must have prepared the PowerShell environment to execute the PowerShell cmdlets.

About this task

The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by runningGet-Help command_name. Alternatively, you can also refer to the Cmdlet Reference Guide.

SnapCenter Software 4.2 Windows Cmdlet Reference Guide

Steps

  1. Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.
    Example
    Open-SmConnection  -SMSbaseurl  https:\\snapctr.demo.netapp.com:8146/
    
  2. Clean up secondary backups count using the -CleanupSecondaryBackups parameter.
    Example
    This example cleans up the backup count for secondary backups with no Snapshot copies:
    Remove-SmBackup -CleanupSecondaryBackups
    Remove-SmBackup
    Are you sure want to remove the backup(s).
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):