|
1 | 1 | ---
|
2 |
| -title: Create backup policies for blobs using data protection REST API |
| 2 | +title: Create Azure Backup policies for blobs using data protection REST API |
3 | 3 | description: In this article, you'll learn how to create and manage backup policies for blobs using REST API.
|
4 |
| -ms.topic: conceptual |
5 |
| -ms.date: 07/09/2021 |
| 4 | +ms.topic: how-to |
| 5 | +ms.date: 10/28/2022 |
6 | 6 | ms.assetid: 472d6a4f-7914-454b-b8e4-062e8b556de3
|
| 7 | +author: v-amallick |
| 8 | +ms.service: backup |
| 9 | +ms.author: v-amallick |
| 10 | +ms.custom: engagement-fy23 |
7 | 11 | ---
|
8 | 12 | # Create Azure Data Protection backup policies for blobs using REST API
|
9 | 13 |
|
| 14 | +Azure Backup policy typically governs the retention and schedule of your backups. As operational backup for blobs is continuous in nature, you don't need a schedule to perform backups. The policy is essentially needed to specify the retention period. You can reuse the backup policy to configure backup for multiple storage accounts to a vault. |
| 15 | + |
10 | 16 | > [!IMPORTANT]
|
11 |
| -> Read [this section](blob-backup-configure-manage.md#before-you-start) before proceeding to create the policy and configuring backups for Azure blobs. |
| 17 | +> Before you proceed to create the policy and configure backups for Azure blobs, see [this section](blob-backup-configure-manage.md#before-you-start). |
12 | 18 |
|
13 |
| -A backup policy typically governs the retention and schedule of your backups. Since operational backup for blobs is continuous in nature, you don't need a schedule to perform backups. The policy is essentially needed to specify the retention period. You can reuse the backup policy to configure backup for multiple storage accounts to a vault. |
| 19 | +This article describes how to create a policy for blobs in a storage account. Learn about [the process to create a backup policy for an Azure Recovery Services vault using REST API](/rest/api/dataprotection/backup-policies/create-or-update). |
14 | 20 |
|
15 | 21 | >[!NOTE]
|
16 |
| ->Restoring over long durations may lead to restore operations taking longer to complete. Furthermore, the time that it takes to restore a set of data is based on the number of write and delete operations made during the restore period. For example, an account with one million objects with 3,000 objects added per day and 1,000 objects deleted per day will require approximately two hours to restore to a point 30 days in the past. A retention period and restoration more than 90 days in the past would not be recommended for an account with this rate of change. |
| 22 | +>Restoring over long durations may lead to restore operations taking longer to complete. Further, the time that it takes to restore a set of data is based on the number of write and delete operations made during the restore period. |
| 23 | +>For example, an account with one million objects with 3,000 objects added per day and 1,000 objects deleted per day will require approximately two hours to restore to a point 30 days in the past. A retention period and restoration more than 90 days in the past would not be recommended for an account with this rate of change. |
17 | 24 |
|
18 |
| -The steps to create a backup policy for an Azure Recovery Services vault are outlined in the policy [REST API document](/rest/api/dataprotection/backup-policies/create-or-update). Let's use this document as a reference to create a policy for blobs in a storage account. |
| 25 | +In this article, you'll learn about: |
19 | 26 |
|
20 |
| -## Create a policy |
| 27 | +> [!div class="checklist"] |
| 28 | +> - Create a policy |
| 29 | +> - Create the request body |
| 30 | +> - Responses |
21 | 31 |
|
22 |
| -> [!IMPORTANT] |
23 |
| -> Currently, we do not support updating or modifying an existing policy. An alternative is to create a new policy with the required details and assign it to the relevant backup instance. |
| 32 | +## Create a policy |
24 | 33 |
|
25 |
| -To create an Azure Backup policy, use the following *PUT* operation |
| 34 | +To create an Azure Backup policy, use the following *PUT* operation: |
26 | 35 |
|
27 | 36 | ```http
|
28 | 37 | PUT https://management.azure.com/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{policyName}?api-version=2021-01-01
|
29 | 38 | ```
|
30 | 39 |
|
31 |
| -The `{policyName}` and `{vaultName}` are provided in the URI. Additional information is provided in the request body. |
| 40 | +The `{policyName}` and `{vaultName}` are provided in the URI. You can find additional information the request body. |
| 41 | + |
| 42 | +> [!IMPORTANT] |
| 43 | +> Currently, we don't support updating or modifying an existing policy. So, you can create a new policy with the required details and assign it to the relevant backup instance. |
32 | 44 |
|
33 | 45 | ## Create the request body
|
34 | 46 |
|
35 |
| -For example, to create a policy for Blob backup, following are the components of the request body. |
| 47 | +For example, to create a policy for Blob backup, use the following component of the request body: |
36 | 48 |
|
37 | 49 | |Name |Required |Type |Description |
|
38 | 50 | |---------|---------|---------|---------|
|
39 |
| -|properties | True | BaseBackupPolicy:[BackupPolicy](/rest/api/dataprotection/backup-policies/create-or-update#backuppolicy) | BaseBackupPolicyResource properties | |
| 51 | +|`properties` | True | BaseBackupPolicy:[BackupPolicy](/rest/api/dataprotection/backup-policies/create-or-update#backuppolicy) | BaseBackupPolicyResource properties | |
40 | 52 |
|
41 |
| -For the complete list of definitions in the request body, refer to the [backup policy REST API document](/rest/api/dataprotection/backup-policies/create-or-update). |
| 53 | +For the complete list of definitions in the request body, see the [backup policy REST API document](/rest/api/dataprotection/backup-policies/create-or-update). |
42 | 54 |
|
43 | 55 | ### Example request body
|
44 | 56 |
|
@@ -80,11 +92,11 @@ The policy says:
|
80 | 92 | ```
|
81 | 93 |
|
82 | 94 | > [!IMPORTANT]
|
83 |
| -> The time formats for support only DateTime. They don't support Time format alone. |
| 95 | +> The supported time formats is *DateTime* only. They don't support *Time* format alone. |
84 | 96 |
|
85 | 97 | ## Responses
|
86 | 98 |
|
87 |
| -The backup policy creation/update is a synchronous operation and returns OK once the operation is successful. |
| 99 | +The backup policy creation/update is an asynchronous operation and returns *OK* once the operation is successful. |
88 | 100 |
|
89 | 101 | |Name |Type |Description |
|
90 | 102 | |---------|---------|---------|
|
|
0 commit comments