external help file | Module Name | online version | schema |
---|---|---|---|
HPESimpliVity-help.xml |
HPESimpliVity |
2.0.0 |
Delete one or more HPE SimpliVity backups
Remove-SvtBackup [-BackupId] <String> [<CommonParameters>]
Deletes one or more backups hosted on HPE SimpliVity. Use Get-SvtBackup output to pass in the backup(s) to delete or specify the Backup ID, if known.
BackupId is the only unique identifier for backup objects (e.g. multiple backups can have the same name). This makes using this command a little cumbersome by itself. However, you can use Get-SvtBackup to identify the backups you want to target and then pass the output to this command.
Get-SvtBackup -BackupName 2019-05-09T22:00:01-04:00 | Remove-SvtBackup
Deletes the backups with the specified backup name.
Get-SvtBackup -VmName MyVm -Hour 3 | Remove-SvtBackup
Delete any backup that is at least 3 hours old for the specified virtual machine
Get-SvtBackup | ? VmName -match "test" | Remove-SvtBackup
Delete all backups for all virtual machines that have "test" in their name
Get-SvtBackup -CreatedBefore 01/01/2020 -Limit 3000 | Remove-SvtBackup
This command will remove backups older than the specified date.
The UID of the backup(s) to delete
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Roy Atkins, HPE Services
This cmdlet uses the /api/backups/delete REST API POST call which creates a task to delete the specified backup. This call accepts multiple backup IDs, and efficiently removes multiple backups with a single task. This also works for backups in remote clusters.
There is another REST API DELETE call (/api/backups/<bkpId>) which only works locally (i.e. when connected to a SimpliVity Virtual Appliance where the backup resides), but this fails when trying to delete remote backups.
https://github.com/atkinsroy/HPESimpliVity/blob/master/Docs/Remove-SvtBackup.md