@@ -319,120 +319,120 @@ az dataprotection backup-instance create --resource-group testBkpVaultRG --vault
319
319
You have to specify a retention rule while you trigger backup. To view the retention rules in policy, navigate through the policy JSON file for retention rules. In the following example, there are two retention rules with names **Default** and **Monthly**. We'll use the **Monthly** rule for the on-demand backup.
320
320
321
321
```azurecli
322
- az dataprotection backup-policy show -g ossdemorg --vault-name ossdemovault-1 --subscription e3d2d341-4ddb-4c5d-9121-69b7e719485e --name osspol5
323
- {
324
- "id" : " /subscriptions/e3d2d341-4ddb-4c5d-9121-69b7e719485e/resourceGroups/ossdemorg/providers/Microsoft.DataProtection/backupVaults/ossdemovault-1/backupPolicies/osspol5" ,
325
- "name" : " osspol5" ,
326
- "properties" : {
327
- "datasourceTypes" : [
328
- " Microsoft.DBforPostgreSQL/servers/databases"
329
- ],
330
- "objectType" : " BackupPolicy" ,
331
- "policyRules" : [
332
- {
333
- "backupParameters" : {
334
- "backupType" : " Full" ,
335
- "objectType" : " AzureBackupParams"
336
- },
337
- "dataStore" : {
338
- "dataStoreType" : " VaultStore" ,
339
- "objectType" : " DataStoreInfoBase"
340
- },
341
- "name" : " BackupWeekly" ,
342
- "objectType" : " AzureBackupRule" ,
343
- "trigger" : {
344
- "objectType" : " ScheduleBasedTriggerContext" ,
345
- "schedule" : {
346
- "repeatingTimeIntervals" : [
347
- " R/2020-04-04T20:00:00+00:00/P1W" ,
348
- " R/2020-04-01T20:00:00+00:00/P1W"
349
- ],
350
- "timeZone" : " UTC"
322
+ az dataprotection backup-policy show -g ossdemorg --vault-name ossdemovault-1 --subscription e3d2d341-4ddb-4c5d-9121-69b7e719485e --name osspol5
323
+ {
324
+ "id" : " /subscriptions/e3d2d341-4ddb-4c5d-9121-69b7e719485e/resourceGroups/ossdemorg/providers/Microsoft.DataProtection/backupVaults/ossdemovault-1/backupPolicies/osspol5" ,
325
+ "name" : " osspol5" ,
326
+ "properties" : {
327
+ "datasourceTypes" : [
328
+ " Microsoft.DBforPostgreSQL/servers/databases"
329
+ ],
330
+ "objectType" : " BackupPolicy" ,
331
+ "policyRules" : [
332
+ {
333
+ "backupParameters" : {
334
+ "backupType" : " Full" ,
335
+ "objectType" : " AzureBackupParams"
351
336
},
352
- "taggingCriteria" : [
353
- {
354
- "criteria" : [
355
- {
356
- "absoluteCriteria" : [
357
- " FirstOfMonth"
358
- ],
359
- "daysOfMonth" : null ,
360
- "daysOfTheWeek" : null ,
361
- "monthsOfYear" : null ,
362
- "objectType" : " ScheduleBasedBackupCriteria" ,
363
- "scheduleTimes" : null ,
364
- "weeksOfTheMonth" : null
365
- }
337
+ "dataStore" : {
338
+ "dataStoreType" : " VaultStore" ,
339
+ "objectType" : " DataStoreInfoBase"
340
+ },
341
+ "name" : " BackupWeekly" ,
342
+ "objectType" : " AzureBackupRule" ,
343
+ "trigger" : {
344
+ "objectType" : " ScheduleBasedTriggerContext" ,
345
+ "schedule" : {
346
+ "repeatingTimeIntervals" : [
347
+ " R/2020-04-04T20:00:00+00:00/P1W" ,
348
+ " R/2020-04-01T20:00:00+00:00/P1W"
366
349
],
367
- "isDefault" : false ,
368
- "tagInfo" : {
369
- "eTag" : null ,
370
- "id" : " Monthly_" ,
371
- "tagName" : " Monthly"
372
- },
373
- "taggingPriority" : 15
350
+ "timeZone" : " UTC"
374
351
},
352
+ "taggingCriteria" : [
353
+ {
354
+ "criteria" : [
355
+ {
356
+ "absoluteCriteria" : [
357
+ " FirstOfMonth"
358
+ ],
359
+ "daysOfMonth" : null ,
360
+ "daysOfTheWeek" : null ,
361
+ "monthsOfYear" : null ,
362
+ "objectType" : " ScheduleBasedBackupCriteria" ,
363
+ "scheduleTimes" : null ,
364
+ "weeksOfTheMonth" : null
365
+ }
366
+ ],
367
+ "isDefault" : false ,
368
+ "tagInfo" : {
369
+ "eTag" : null ,
370
+ "id" : " Monthly_" ,
371
+ "tagName" : " Monthly"
372
+ },
373
+ "taggingPriority" : 15
374
+ },
375
+ {
376
+ "criteria" : null ,
377
+ "isDefault" : true ,
378
+ "tagInfo" : {
379
+ "eTag" : null ,
380
+ "id" : " Default_" ,
381
+ "tagName" : " Default"
382
+ },
383
+ "taggingPriority" : 99
384
+ }
385
+ ]
386
+ }
387
+ },
388
+ {
389
+ "isDefault" : false ,
390
+ "lifecycles" : [
391
+ {
392
+ "deleteAfter" : {
393
+ "duration" : " P10Y" ,
394
+ "objectType" : " AbsoluteDeleteOption"
395
+ },
396
+ "sourceDataStore" : {
397
+ "dataStoreType" : " VaultStore" ,
398
+ "objectType" : " DataStoreInfoBase"
399
+ },
400
+ "targetDataStoreCopySettings" : []
401
+ }
402
+ ],
403
+ "name" : " Monthly" ,
404
+ "objectType" : " AzureRetentionRule"
405
+ },
406
+ {
407
+ "isDefault" : true ,
408
+ "lifecycles" : [
375
409
{
376
- "criteria" : null ,
377
- "isDefault" : true ,
378
- "tagInfo" : {
379
- "eTag" : null ,
380
- "id" : " Default_" ,
381
- "tagName" : " Default"
410
+ "deleteAfter" : {
411
+ "duration" : " P1Y" ,
412
+ "objectType" : " AbsoluteDeleteOption"
382
413
},
383
- "taggingPriority" : 99
414
+ "sourceDataStore" : {
415
+ "dataStoreType" : " VaultStore" ,
416
+ "objectType" : " DataStoreInfoBase"
417
+ },
418
+ "targetDataStoreCopySettings" : []
384
419
}
385
- ]
420
+ ],
421
+ "name" : " Default" ,
422
+ "objectType" : " AzureRetentionRule"
386
423
}
387
- },
388
- {
389
- "isDefault" : false ,
390
- "lifecycles" : [
391
- {
392
- "deleteAfter" : {
393
- "duration" : " P10Y" ,
394
- "objectType" : " AbsoluteDeleteOption"
395
- },
396
- "sourceDataStore" : {
397
- "dataStoreType" : " VaultStore" ,
398
- "objectType" : " DataStoreInfoBase"
399
- },
400
- "targetDataStoreCopySettings" : []
401
- }
402
- ],
403
- "name" : " Monthly" ,
404
- "objectType" : " AzureRetentionRule"
405
- },
406
- {
407
- "isDefault" : true ,
408
- "lifecycles" : [
409
- {
410
- "deleteAfter" : {
411
- "duration" : " P1Y" ,
412
- "objectType" : " AbsoluteDeleteOption"
413
- },
414
- "sourceDataStore" : {
415
- "dataStoreType" : " VaultStore" ,
416
- "objectType" : " DataStoreInfoBase"
417
- },
418
- "targetDataStoreCopySettings" : []
419
- }
420
- ],
421
- "name" : " Default" ,
422
- "objectType" : " AzureRetentionRule"
423
- }
424
- ]
425
- },
426
- "resourceGroup" : " ossdemorg" ,
427
- "systemData" : null ,
428
- "type" : " Microsoft.DataProtection/backupVaults/backupPolicies"
429
- }
424
+ ]
425
+ },
426
+ "resourceGroup" : " ossdemorg" ,
427
+ "systemData" : null ,
428
+ "type" : " Microsoft.DataProtection/backupVaults/backupPolicies"
429
+ }
430
430
```
431
431
432
432
To trigger an on-demand backup, use the [az dataprotection backup-instance adhoc-backup](/cli/azure/dataprotection/backup-instance#az_dataprotection_backup_instance_adhoc_backup) command.
433
433
434
434
```azurecli
435
- az dataprotection backup-instance adhoc-backup --name "ossrg-empdb11" --rule-name "Monthly" --resource-group testBkpVaultRG --vault-name TestBkpVault
435
+ az dataprotection backup-instance adhoc-backup --name "ossrg-empdb11" --rule-name "Monthly" --resource-group testBkpVaultRG --vault-name TestBkpVault
436
436
```
437
437
438
438
## Track jobs
@@ -441,9 +441,9 @@ Track all jobs using the [az dataprotection job list](/cli/azure/dataprotection/
441
441
442
442
You can also use _Az.ResourceGraph_ to track all jobs across all Backup vaults. Use the [az dataprotection job list-from-resourcegraph](/cli/azure/dataprotection/job#az_dataprotection_job_list_from_resourcegraph) command to fetch the relevant jobs that are across Backup vaults.
443
443
444
- ```azurecli
445
- az dataprotection job list-from-resourcegraph --datasource-type AzureDatabaseForPostgreSQL --status Completed
446
- ```
444
+ ```azurecli
445
+ az dataprotection job list-from-resourcegraph --datasource-type AzureDatabaseForPostgreSQL --status Completed
446
+ ```
447
447
448
448
## Next steps
449
449
0 commit comments