Skip to content

Commit 945258c

Browse files
authored
Merge pull request #99526 from pvrk/Nov2019
Undo deletion from REST API
2 parents 325d6fd + 6e31388 commit 945258c

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

articles/backup/backup-azure-arm-userestapi-backupazurevms.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ The `{containerName}` and `{protectedItemName}` are as constructed [above](#resp
428428
DELETE https://management.azure.com//Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testVaultRG/providers/Microsoft.RecoveryServices/vaults/testVault/backupFabrics/Azure/protectionContainers/iaasvmcontainer;iaasvmcontainerv2;testRG;testVM/protectedItems/vm;iaasvmcontainerv2;testRG;testVM?api-version=2019-05-13
429429
```
430430

431-
### <a name="responses-2"></a>Responses
431+
#### <a name="responses-2"></a>Responses
432432

433433
*DELETE* protection is an [asynchronous operation](https://docs.microsoft.com/azure/azure-resource-manager/resource-manager-async-operations). It means this operation creates another operation that needs to be tracked separately.
434434

@@ -439,6 +439,28 @@ It returns two responses: 202 (Accepted) when another operation is created and t
439439
|204 NoContent | | NoContent |
440440
|202 Accepted | | Accepted |
441441

442+
> [!IMPORTANT]
443+
> In order to protect against accidental delete scenarios, there is a [soft-delete feature available](use-restapi-update-vault-properties.md#soft-delete-state) for Recovery services vault. If the soft-delete state of the vault is set to enabled, then the delete operation will NOT immediately delete the data. It will be kept for 14 days and then permanently purged. Customer is not charged for storage for this 14 days period. To undo the deletion operation, refer to the [undo-delete section](#undo-the-stop-protection-and-delete-data).
444+
445+
### Undo the stop protection and delete data
446+
447+
Undoing the accidental deletion is similar to creating the backup item. After undoing the deletion, the item is retained but no future backups are triggered.
448+
449+
Undo deletion is a *PUT* operation which is very similar to [changing the policy](#changing-the-policy-of-protection) and/or [enabling the protection](#enabling-protection-for-the-azure-vm). Just provide the intent to undo the deletion with the variable *isRehydrate* in [the request body](#example-request-body) and submit the request. For example: To undo the deletion for testVM, the following request body should be used.
450+
451+
```http
452+
{
453+
"properties": {
454+
"protectedItemType": "Microsoft.Compute/virtualMachines",
455+
"protectionState": "ProtectionStopped",
456+
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/testVM",
457+
"isRehydrate": true
458+
}
459+
}
460+
```
461+
462+
The response will follow the same format as mentioned [for triggering an on-demand backup](#example-responses-3). The resultant job should be tracked as explained in the [monitor jobs using REST API document](backup-azure-arm-userestapi-managejobs.md#tracking-the-job).
463+
442464
## Next steps
443465

444466
[Restore data from an Azure Virtual machine backup](backup-azure-arm-userestapi-restoreazurevms.md).

0 commit comments

Comments
 (0)