Skip to content

Commit f59cb79

Browse files
Merge pull request #227265 from AbhishekMallick01/Feb-14-2023-RESTpolicy
Create RSV REST
2 parents 3bee577 + 3435075 commit f59cb79

File tree

1 file changed

+87
-3
lines changed

1 file changed

+87
-3
lines changed

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

Lines changed: 87 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Create backup policies using REST API
33
description: In this article, you'll learn how to create and manage backup policies (schedule and retention) using REST API.
4-
ms.topic: conceptual
5-
ms.date: 06/13/2022
4+
ms.topic: how-to
5+
ms.date: 02/14/2023
66
ms.assetid: 5ffc4115-0ae5-4b85-a18c-8a942f6d4870
77
ms.service: backup
88
author: jyothisuri
@@ -37,7 +37,7 @@ For the complete list of definitions in the request body, refer to the [backup p
3737

3838
#### For Azure VM backup
3939

40-
The following request body defines a backup policy for Azure VM backups.
40+
The following request body defines a standard backup policy for Azure VM backups.
4141

4242
This policy:
4343

@@ -127,9 +127,93 @@ This policy:
127127
}
128128
```
129129

130+
The following request body defines an enhanced backup policy for Azure VM backups creating multiple backups a day.
131+
132+
This policy:
133+
134+
- Takes a backup every 4 hours from 3:30 PM UTC everyday
135+
- Retains instant recovery snapshot for 7 days
136+
- Retains the daily backups for 180 days
137+
- Retains the backups taken on the Sunday of every week for 12 weeks
138+
- Retains the backups taken on the first Sunday of every month for 12 months
139+
140+
```json
141+
{
142+
"properties": {
143+
"backupManagementType": "AzureIaasVM",
144+
"policyType": "V2",
145+
"instantRPDetails": {},
146+
"schedulePolicy": {
147+
"schedulePolicyType": "SimpleSchedulePolicyV2",
148+
"scheduleRunFrequency": "Hourly",
149+
"hourlySchedule": {
150+
"interval": 4,
151+
"scheduleWindowStartTime": "2023-02-06T15:30:00Z",
152+
"scheduleWindowDuration": 24
153+
}
154+
},
155+
"retentionPolicy": {
156+
"retentionPolicyType": "LongTermRetentionPolicy",
157+
"dailySchedule": {
158+
"retentionTimes": [
159+
"2023-02-06T15:30:00Z"
160+
],
161+
"retentionDuration": {
162+
"count": 180,
163+
"durationType": "Days"
164+
}
165+
},
166+
"weeklySchedule": {
167+
"daysOfTheWeek": [
168+
"Sunday"
169+
],
170+
"retentionTimes": [
171+
"2023-02-06T15:30:00Z"
172+
],
173+
"retentionDuration": {
174+
"count": 12,
175+
"durationType": "Weeks"
176+
}
177+
},
178+
"monthlySchedule": {
179+
"retentionScheduleFormatType": "Weekly",
180+
"retentionScheduleWeekly": {
181+
"daysOfTheWeek": [
182+
"Sunday"
183+
],
184+
"weeksOfTheMonth": [
185+
"First"
186+
]
187+
},
188+
"retentionTimes": [
189+
"2023-02-06T15:30:00Z"
190+
],
191+
"retentionDuration": {
192+
"count": 12,
193+
"durationType": "Months"
194+
}
195+
}
196+
},
197+
"tieringPolicy": {
198+
"ArchivedRP": {
199+
"tieringMode": "DoNotTier",
200+
"duration": 0,
201+
"durationType": "Invalid"
202+
}
203+
},
204+
"instantRpRetentionRangeInDays": 7,
205+
"timeZone": "UTC",
206+
"protectedItemsCount": 0
207+
}
208+
}
209+
```
210+
211+
130212
> [!IMPORTANT]
131213
> The time formats for schedule and retention support only DateTime. They don't support Time format alone.
132214
215+
216+
133217
#### For SQL in Azure VM backup
134218

135219
The following is an example request body for SQL in Azure VM backup.

0 commit comments

Comments
 (0)