Skip to content

Commit 33efc4e

Browse files
author
AbhishekMallick-MS
committed
AFS Multiple backup policy
1 parent 3719a9d commit 33efc4e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

articles/backup/backup-azure-afs-automation.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Back up an Azure file share by using PowerShell
33
description: In this article, learn how to back up an Azure Files file share by using the Azure Backup service and PowerShell.
44
ms.topic: how-to
5-
ms.date: 07/18/2024
5+
ms.date: 12/09/2024
66
ms.custom: devx-track-azurepowershell
77
ms.service: azure-backup
88
author: AbhishekMallick-MS
@@ -192,6 +192,14 @@ NewAFSPolicy AzureFiles AzureStorage 10/24/201
192192

193193
# [Multiple backups policy](#tab/multiple-backups-policy)
194194

195+
196+
>[!Important]
197+
>The following cmdlets are used for the Backup policies:
198+
>
199+
>- View the default backup policy retention by using `Get-AzRecoveryServicesBackupRetentionPolicyObject`.
200+
>- View the default backup policy schedule by using `Get-AzRecoveryServicesBackupSchedulePolicyObject`.
201+
>- Create a new backup policy by using `New-AzRecoveryServicesBackupProtectionPolicy`. Provide the schedule and retention policy objects as inputs.
202+
195203
To create a backup policy that configures multiple backups a day, follow these steps:
196204

197205
1. Fetch the schedule policy object using below cmdlet:
@@ -230,6 +238,14 @@ To create a backup policy that configures multiple backups a day, follow these s
230238
$schPol.ScheduleRunTimeZone=$timeZone.Id
231239
```
232240

241+
To reate a policy with daily schedule, run the following cmdlet:
242+
243+
```azurepowershell
244+
$UtcTime = Get-Date -Date "2019-03-20 01:30:00Z"
245+
$UtcTime = $UtcTime.ToUniversalTime()
246+
$schpol.ScheduleRunTimes[0] = $UtcTime
247+
```
248+
233249
1. Fetch the retention policy object using following cmdlet:
234250

235251
```azurepowershell-interactive

0 commit comments

Comments
 (0)