Remove-SmDRFailoverBackups
After failback, delete special backups taken during failover.
Syntax
Remove-SmDRFailoverBackups [-AppObjectId] <> [-AppObjectId] <> [-BackupNames] <> [-AppObjectId] <> [-Primary] <>
Detailed Description
After failback, delete special backups taken during failover.
Parameters
Name | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|
AppObjectId |
Specifies the application object identifier of an SQL database. |
true |
true (ByPropertyName) |
|
BackupNames |
Specifies one or more backups of an application object to delete. |
false |
true (ByPropertyName) |
|
BackupIds |
Specifies one or more backups of an application object to delete. |
false |
true (ByPropertyName) |
|
Primary |
Specifies to delete backups from the primary storage. |
false |
true (ByPropertyName) |
Examples
Example 1: Delete all special backups of the SQL resources after failback from secondary
Remove-SmDRFailoverBackups -AppObjectId Host1\Inst\DB1
This example syntax deletes all the special backup of the resource from the storage where the backup was taken (secondary storage).
Remove-SmDRFailoverBackups Are you sure you want to remove the backups? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): yes Result : SMCoreContracts.SMResult TotalCount : 0 DisplayCount : 0 Context : Job : SMCoreContracts.SmJob
Example 2: Delete few special backups of the SQL resource after failback
Remove-SmDRFailoverBackups -AppObjectId Host1\Inst\DB1 -BackupNames Backup1,Backup2
This example syntax deletes the specified special backups from the storage where the backup was taken (secondary storage).
Remove-SmDRFailoverBackups Are you sure you want to remove the backups? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): yes Result : SMCoreContracts.SMResult TotalCount : 0 DisplayCount : 0 Context : Job : SMCoreContracts.SmJob
Example 3: Delete all special backups of the SQL resources after failback from the secondary and the primary.
Remove-SmDRFailoverBackups -AppObjectId Host1\Inst\DB1 -Primary
This example syntax removes all the resource backups taken during failover from the secondary and the primary storage. For SnapMirror relationship, during subsequent SnapMirror update, deleted backups in the primary storage will be reflected in the secondary storage.
Remove-SmDRFailoverBackups Are you sure you want to remove the backups? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): yes Result : SMCoreContracts.SMResult TotalCount : 0 DisplayCount : 0 Context : Job : SMCoreContracts.SmJob
Example 4: Delete few special backups of the SQL resources after failback from the secondary and the primary.
Remove-SmDRFailoverBackups -AppObjectId Host1\Inst\DB1 -BackupNames Backup1,Backup2 -Primary
This example syntax removes all the resource backups taken during failover from the secondary and the primary storage. For SnapMirror relationship, during subsequent SnapMirror update, deleted backups in the primary storage will be reflected in the secondary storage.
Remove-SmDRFailoverBackups Are you sure you want to remove the backups? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): yes Result : SMCoreContracts.SMResult TotalCount : 0 DisplayCount : 0 Context : Job : SMCoreContracts.SmJob