Skip to content

Commit 28d5645

Browse files
author
AbhishekMallick-MS
committed
removed the unwanted portion
1 parent 33efc4e commit 28d5645

File tree

1 file changed

+1
-43
lines changed

1 file changed

+1
-43
lines changed

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

Lines changed: 1 addition & 43 deletions
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: 12/09/2024
5+
ms.date: 12/10/2024
66
ms.custom: devx-track-azurepowershell
77
ms.service: azure-backup
88
author: AbhishekMallick-MS
@@ -152,47 +152,6 @@ A backup policy specifies the schedule for backups, and how long backup recovery
152152

153153
A backup policy is associated with at least one retention policy. A retention policy defines how long a recovery point is kept before it's deleted. You can configure backups with daily, weekly, monthly, or yearly retention. With multiple backups policy, you can also configure backups hourly retention.
154154

155-
**Choose a policy type**:
156-
157-
# [Daily backup policy](#tab/daily-backup-policy)
158-
159-
Here are some cmdlets for backup policies:
160-
161-
* View the default backup policy retention by using [Get-AzRecoveryServicesBackupRetentionPolicyObject](/powershell/module/az.recoveryservices/get-azrecoveryservicesbackupretentionpolicyobject).
162-
* View the default backup policy schedule by using [Get-AzRecoveryServicesBackupSchedulePolicyObject](/powershell/module/az.recoveryservices/get-azrecoveryservicesbackupschedulepolicyobject).
163-
* Create a new backup policy by using [New-AzRecoveryServicesBackupProtectionPolicy](/powershell/module/az.recoveryservices/set-azrecoveryservicesbackupprotectionpolicy). You enter the schedule and retention policy objects as input.
164-
165-
By default, a start time is defined in the schedule policy object. Use the following example to change the start time to the desired start time. The desired start time should be in Universal Coordinated Time (UTC). The example assumes that the desired start time is 01:00 AM UTC for daily backups.
166-
167-
```azurepowershell-interactive
168-
$schPol = Get-AzRecoveryServicesBackupSchedulePolicyObject -WorkloadType "AzureFiles"
169-
$UtcTime = Get-Date -Date "2019-03-20 01:30:00Z"
170-
$UtcTime = $UtcTime.ToUniversalTime()
171-
$schpol.ScheduleRunTimes[0] = $UtcTime
172-
```
173-
174-
> [!IMPORTANT]
175-
> You need to provide the start time in 30-minute multiples only. In the preceding example, it can be only "01:00:00" or "02:30:00". The start time can't be "01:15:00".
176-
177-
The following example stores the schedule policy and the retention policy in variables. It then uses those variables as parameters for a new policy (**NewAFSPolicy**). **NewAFSPolicy** takes a daily backup and retains it for 30 days.
178-
179-
```azurepowershell-interactive
180-
$schPol = Get-AzRecoveryServicesBackupSchedulePolicyObject -WorkloadType "AzureFiles"
181-
$retPol = Get-AzRecoveryServicesBackupRetentionPolicyObject -WorkloadType "AzureFiles"
182-
New-AzRecoveryServicesBackupProtectionPolicy -Name "NewAFSPolicy" -WorkloadType "AzureFiles" -RetentionPolicy $retPol -SchedulePolicy $schPol
183-
```
184-
185-
The output is similar to the following:
186-
187-
```azurepowershell-interactive
188-
Name WorkloadType BackupManagementType BackupTime DaysOfWeek
189-
---- ------------ -------------------- ---------- ----------
190-
NewAFSPolicy AzureFiles AzureStorage 10/24/2019 1:30:00 AM
191-
```
192-
193-
# [Multiple backups policy](#tab/multiple-backups-policy)
194-
195-
196155
>[!Important]
197156
>The following cmdlets are used for the Backup policies:
198157
>
@@ -276,7 +235,6 @@ To create a backup policy that configures multiple backups a day, follow these s
276235
testing AzureFiles AzureStorage Hourly 12/22/2021 8:00:00 AM 4 12 Russia Time Zone 11
277236
278237
```
279-
---
280238
281239
## Enable backup
282240

0 commit comments

Comments
 (0)