Skip to content

Commit cc41485

Browse files
committed
Split off ouput blocks
1 parent ec937a5 commit cc41485

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

articles/backup/backup-managed-disks-cli.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ Before you create a Backup vault, choose the storage redundancy of the data with
3232

3333
```azurecli-interactive
3434
az dataprotection backup-vault create -g testBkpVaultRG --vault-name TestBkpVault -l westus --type SystemAssigned --storage-settings datastore-type="VaultStore" type="LocallyRedundant"
35+
```
3536

37+
```output
3638
{
3739
"eTag": null,
3840
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/testBkpVaultRG/providers/Microsoft.DataProtection/BackupVaults/TestBkpVault",
@@ -67,7 +69,9 @@ To understand the inner components of a Backup policy for Azure Disk Backup, ret
6769

6870
```azurecli-interactive
6971
az dataprotection backup-policy get-default-policy-template --datasource-type AzureDisk
72+
```
7073

74+
```output
7175
{
7276
"datasourceTypes": [
7377
"Microsoft.Compute/disks"
@@ -124,7 +128,6 @@ az dataprotection backup-policy get-default-policy-template --datasource-type Az
124128
}
125129
]
126130
}
127-
128131
```
129132

130133
The policy template consists of a trigger (which decides what triggers the backup) and a lifecycle (which decides when to delete/copy/move the backup). In Azure Disk Backup, the default values for trigger are a scheduled trigger for every 4 hours (PT4H) and to retain each backup for seven days.
@@ -139,7 +142,6 @@ The policy template consists of a trigger (which decides what triggers the backu
139142
"R/2020-04-05T13:00:00+00:00/PT4H"
140143
]
141144
}
142-
143145
```
144146

145147
**Default retention lifecycle:**
@@ -178,7 +180,9 @@ Once the template is downloaded as a JSON file, you can edit it for scheduling a
178180
```azurecli-interactive
179181
az dataprotection backup-policy get-default-policy-template --datasource-type AzureDisk > policy.json
180182
az dataprotection backup-policy create -g testBkpVaultRG --vault-name TestBkpVault -n mypolicy --policy policy.json
183+
```
181184

185+
```output
182186
{
183187
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testBkpVaultRG/providers/Microsoft.DataProtection/backupVaults/TestBkpVault/backupPolicies/mypolicy",
184188
"name": "mypolicy",
@@ -328,8 +332,9 @@ Use the edited JSON file to create a backup instance of the Azure Managed Disk.
328332

329333
```azurecli-interactive
330334
az dataprotection backup-instance create -g testBkpVaultRG --vault-name TestBkpVault --backup-instance backup_instance.json
335+
```
331336

332-
337+
```output
333338
{
334339
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/testBkpVaultRG/providers/Microsoft.DataProtection/BackupVaults/TestBkpVault/backupInstances/diskrg-CLITestDisk-3df6ac08-9496-4839-8fb5-8b78e594f166",
335340
"name": "diskrg-CLITestDisk-3df6ac08-9496-4839-8fb5-8b78e594f166",
@@ -381,8 +386,9 @@ List all backup instances within a vault using [az dataprotection backup-instanc
381386

382387
```azurecli-interactive
383388
az dataprotection backup-instance list-from-resourcegraph --datasource-type AzureDisk --datasource-id /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx/resourcegroups/diskrg/providers/Microsoft.Compute/disks/CLITestDisk
389+
```
384390

385-
391+
```output
386392
[
387393
{
388394
"datasourceId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx/resourcegroups/diskrg/providers/Microsoft.Compute/disks/CLITestDisk",
@@ -442,13 +448,11 @@ az dataprotection backup-instance list-from-resourcegraph --datasource-type Azur
442448
"zones": null
443449
}
444450
]
445-
446-
447451
```
448452

449453
You can specify a retention rule while triggering backup. To view the retention rules in policy, look through the policy JSON for retention rules. In the below example, the rule with the name _default_ is displayed and we'll use that rule for the on-demand backup.
450454

451-
```JSON
455+
```json
452456
{
453457
"isDefault": true,
454458
"lifecycles": [

0 commit comments

Comments
 (0)