page_type | languages | products | description | ||
---|---|---|---|---|---|
sample |
|
|
Automates top asks using PowerShell for Azure Backup archive feature |
Runbooks for Archive move
-
Create an Automation Account in Azure Portal
-
Import Az.RecoveryServices 4.0.0-preview module from Powershell Gallery
a. Select the required module. b. Deploy to Azure Automation and select the Automation account and resource group.
-
Click on Runbooks in Policy Automation from the automation account.
-
Import a runbook.
-
To create the runbook - download the scripts and then import them to your runbook.
Download viewArchivableRPs
This sample script is used to view all the archivable recovery points associated with a backup item between any time range.
You can link the runbook to a scheduler.
- Subscription
- ResourceGroupName
- VaultName
- ItemType – {AzureVM,MSSQL)
- StartDate = (Get-Date).AddDays(-x).ToUniversalTime()
- EndDate = (Get-Date).AddDays(-y).ToUniversalTime()
- VMName
- DBName(Only for SQL DB)
Where x and y are the time-range between which you want to move the recovery points.
A list of archivable recovery point
Download moveArchivableRecoveryPointsForSQL
This sample script moves all the archivable recovery point for a particular SQL Backup Item to archive.
You can link the runbook to a scheduler.
- Subscription
- ResourceGroupName
- VaultName
- VMName
- DBName
- StartDate (Get-Date).AddDays(-x).ToUniversalTime()
- EndDate (Get-date).AddDays(-y).ToUniversalTime()
Where x and y are the time-range between which you want to move the recovery points.
A list of move jobs initiated for each recovery point being moved to archive.
Download moveRecommendedRPsForIaasVM
Move all the recommended recovery points to archive for a particular Virtual Machine workload.
You can link the runbook to a scheduler.
- Subscription
- ResourceGroupName
- VaultName
- VMName
A list of move jobs initiated for each recovery point being moved to archive