Use Archive tier support
This article provides the procedure to back up long-term retention points in Archive tier, and snapshots and the Standard tier using Azure portal.
Supported workloads
Workloads | Operations |
---|---|
Azure Virtual Machine | View archived recovery points. Move all recommended recovery points to archive. Restore for archived recovery points. View archive move and restore jobs. |
SQL Server in Azure Virtual Machine SAP HANA in Azure Virtual Machines |
View archived recovery points. Move all archivable recovery points to archive. Restore from archived recovery points. View archive move and restore jobs. |
View archived recovery points
You can now view all the recovery points that are moved to archive.
Move archivable recovery points
Move archivable recovery points for a particular SQL/SAP HANA database
You can move all recovery points for a particular SQL/SAP HANA database at one go.
Follow these steps:
Select the backup item (database in SQL Server or SAP HANA in Azure VM) whose recovery points you want to move to the Vault-archive tier.
Select click here to view the list of all eligible achievable recovery points.
Click Move recovery points to archive to move all recovery points to the Vault-archive tier.
Note
This option moves all the archivable recovery points to the Vault-archive tier.
You can monitor the progress in backup jobs.
Move recommended recovery points for a particular Azure Virtual Machine
You can move all recommended recovery points for selected Azure Virtual Machines to the Vault-archive tier. Learn about recommendation set for Azure Virtual Machine.
Follow these steps:
Select the Virtual Machine whose recovery points you want to move to the Vault-archive tier.
Select click here to view recommended recovery points.
Click Move recovery points to archive to move all the recommended recovery points to Archive tier.
Note
To ensure cost savings, you need to move all the recommended recovery points to the Vault-archive tier. To verify, follow steps 1 and 2. If the list of recovery points is empty in step 3, all the recommended recovery points are moved to the Vault-archive tier.
Restore
To restore the recovery points that are moved to archive, you need to add the required parameters for rehydration duration and rehydration priority.
View jobs
View Archive Usage in Vault Dashboard
You can also view the archive usage in the vault dashboard.
Next steps
- Use Archive tier support via PowerShell/CLI.
- Troubleshoot Archive tier errors
This article provides the procedure to back up long-term retention points in Archive tier, and snapshots and the Standard tier using PowerShell.
Supported workloads
Workloads | Operations |
---|---|
Azure Virtual Machines SQL Server in Azure Virtual Machines |
View archivable recovery points. View recommended recovery points (only for Virtual Machines). Move archivable recovery points. Move recommended recovery points (only for Azure Virtual Machines). View archived recovery points. Restore from archived recovery points. |
Get started
Download the latest version of PowerShell from GitHub.
Run the following cmdlet in PowerShell:
install-module -name Az.RecoveryServices -Repository PSGallery -RequiredVersion 4.4.0 -AllowPrerelease -force
Connect to Azure using the Connect-AzAccount cmdlet.
Sign into your subscription:
Set-AzContext -Subscription "SubscriptionName"
Get the vault:
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "rgName" -Name "vaultName"
Get the list of backup items:
For Azure Virtual Machines
$BackupItemList = Get-AzRecoveryServicesBackupItem -vaultId $vault.ID -BackupManagementType "AzureVM" -WorkloadType "AzureVM"
For SQL Server in Azure Virtual Machines
$BackupItemList = Get-AzRecoveryServicesBackupItem -vaultId $vault.ID -BackupManagementType "AzureWorkload" -WorkloadType "MSSQL"
Get the backup item.
For Azure Virtual Machines
$bckItm = $BackupItemList | Where-Object {$_.Name -match '<vmName>'}
For SQL Server in Azure Virtual Machines
$bckItm = $BackupItemList | Where-Object {$_.FriendlyName -eq '<dbName>' -and $_.ContainerName -match '<vmName>'}
(Optional) Add the date range for which you want to view the recovery points. For example, if you want to view the recovery points from the last 120 days, use the following cmdlet:
$startDate = (Get-Date).AddDays(-120) $endDate = (Get-Date).AddDays(0)
Note
To view recovery points for a different time range, modify the start and the end date accordingly.
By default, it's taken for the last 30 days.
Check the archivable status of all recovery points
You can now check the archivable status of all recovery points of a backup item using the following cmdlet:
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $vault.ID -Item $bckItm -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime()
$rp | select RecoveryPointId, @{ Label="IsArchivable";Expression={$_.RecoveryPointMoveReadinessInfo["ArchivedRP"].IsReadyForMove}}, @{ Label="ArchivableInfo";Expression={$_.RecoveryPointMoveReadinessInfo["ArchivedRP"].AdditionalInfo}}
Check archivable recovery points
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $vault.ID -Item $bckItm -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime() -IsReadyForMove $true -TargetTier VaultArchive
This lists all recovery points associated with a particular backup item that are ready to be moved to archive (from the start date to the end date). You can also modify the start dates and the end dates.
Check why a recovery point can't be moved to archive
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $vault.ID -Item $bckItm -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime() -IsReadyForMove $false -TargetTier VaultArchive
$rp[0].RecoveryPointMoveReadinessInfo["ArchivedRP"]
Where $rp[0]
is the recovery point for which you want to check why it's not archivable.
Sample output
IsReadyForMove AdditionalInfo
-------------- --------------
False Recovery-Point Type is not eligible for archive move as it is already moved to archive tier
Check recommended set of archivable points (only for Azure VMs)
The recovery points associated with a virtual machine are incremental. When you move a particular recovery point to archive, it's converted into a full backup, and then moved to archive. So, the cost savings associated with moving to archive depends on the churn of the data source.
Therefore, Azure Backup provides a recommended set of recovery points that might save cost, if moved together.
Note
- The cost savings depends on various reasons and might not be the same for every instance.
- Cost savings are ensured only when you move all recovery points contained in the recommendation set to the Vault-archive tier.
$RecommendedRecoveryPointList = Get-AzRecoveryServicesBackupRecommendedArchivableRPGroup -Item $bckItm -VaultId $vault.ID
Move to archive
Move-AzRecoveryServicesBackupRecoveryPoint -VaultId $vault.ID -RecoveryPoint $rp[0] -SourceTier VaultStandard -DestinationTier VaultArchive
Where, $rp[0]
is the first recovery point in the list. If you want to move other recovery points, use $rp[1]
, $rp[2]
, and so on.
This cmdlet moves an archivable recovery point to archive. It returns a job that can be used to track the move operation, both from portal and with PowerShell.
View archived recovery points
This cmdlet returns all archived recovery points.
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $vault.ID -Item $bckItm -Tier VaultArchive -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime()
Restore with PowerShell
For recovery points in archive, Azure Backup provides an integrated restore methodology. The integrated restore is a two-step process.
- Involves rehydrating the recovery points stored in archive.
- Temporarily store it in the Vault-standard tier for a duration (also known as the rehydration duration) ranging from a period of 10 to 30 days. The default is 15 days. There are two different priorities of rehydration – Standard and High priority. Learn more about rehydration priority.
Note
- The rehydration duration once selected can't be changed and the rehydrated recovery points stay in the standard tier for the rehydration duration.
- The additional step of rehydration incurs cost.
For more information about various restore methods for Azure Virtual Machines, see Restore an Azure VM with PowerShell.
Restore-AzRecoveryServicesBackupItem -VaultLocation $vault.Location -RehydratePriority "Standard" -RehydrateDuration 15 -RecoveryPoint $rp -StorageAccountName "SampleSA" -StorageAccountResourceGroupName "SArgName" -TargetResourceGroupName $vault.ResourceGroupName -VaultId $vault.ID
To restore SQL Server, follow these steps. The Restore-AzRecoveryServicesBackupItem
cmdlet requires two additional parameters, RehydrationDuration
and RehydrationPriority
.
View jobs
To view the move and restore jobs, use the following PowerShell cmdlet:
Get-AzRecoveryServicesBackupJob -VaultId $vault.ID
Move recovery points to Archive tier at scale
You can now use sample scripts to perform at scale operations. Learn more about how to run the sample scripts. You can download the scripts from here.
You can perform the following operations using the sample scripts provided by Azure Backup:
- Move all eligible recovery points for a particular database/all databases for a SQL server in Azure VM to Archive tier.
- Move all recommended recovery points for a particular Azure Virtual Machine to Archive tier.
You can also write a script as per your requirements or modify the above sample scripts to fetch the required backup items.
Next steps
- Use Archive tier support via Azure portal/CLI.
- Troubleshoot Archive tier errors
This article provides the procedure to back up long-term retention points in the Archive tier, and snapshots and the Standard tier using command-line interface (CLI).
Supported workloads
Workloads | Operations |
---|---|
Azure Virtual Machines SQL Server in Azure Virtual Machines SAP HANA in Azure Virtual Machines |
View archivable recovery points. View recommended recovery points (only for Virtual Machines). Move archivable recovery points. Move recommended recovery points (only for Azure Virtual Machines). View archived recovery points. Restore from archived recovery points. |
Get started
Download/Upgrade AZ CLI version to 2.26.0 or higher
- Follow the instructions to install CLI for the first time.
- Run az --upgrade to upgrade an already installed version.
Log in using the following command:
az login
Set Subscription Context:
az account set –s <subscriptionId>
View archivable recovery points
You can move the archivable recovery points to the Vault-archive tier using the following commands. Learn more about the eligibility criteria.
For Azure Virtual Machines
az backup recoverypoint list -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureIaasVM} --workload-type {VM} --target-tier {VaultArchive} --is-ready-for-move {True}
For SQL Server in Azure Virtual Machines
az backup recoverypoint list -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureWorkload} --workload-type {MSSQL} --target-tier {VaultArchive} --is-ready-for-move {True}
For SAP HANA in Azure Virtual Machines
az backup recoverypoint list -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureWorkload} --workload-type {SAPHANA} --target-tier {VaultArchive} --is-ready-for-move {True}
Check why a recovery point isn't archivable
Run the following command:
az backup recoverypoint list -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureWorkload / AzureIaasVM} --workload-type {MSSQL / SAPHANA / VM} --query [].{Name:name,move_ready:properties.recoveryPointMoveReadinessInfo.ArchivedRP.isReadyForMove,additional_details: properties.recoveryPointMoveReadinessInfo.ArchivedRP.additionalInfo
You will get a list of all recovery points, whether they are archivable and the reason if they are not archivable
Check recommended set of archivable points (only for Azure VMs)
Run the following command:
az backup recoverypoint list -g {rg} -v {vault} -c {container} -i {item} --backup-management-type { AzureIaasVM} --workload-type {VM} --recommended-for-archive
Learn more about recommendation set.
Note
- Cost savings depends on various reasons and might not be the same for every instance.
- You can ensure cost savings only when all the recovery points contained in the recommendation set is moved to the Vault-archive tier.
Move to archive
You can move archivable recovery points to the Vault-archive tier using the following commands. The name parameter in the command should contain the name of an archivable recovery point.
For Azure Virtual Machine
az backup recoverypoint move -g {rg} -v {vault} -c {container} -i {item} --backup-management-type { AzureIaasVM} --workload-type {VM} --source-tier {VaultStandard} --destination-tier {VaultArchive} --name {rp}
For SQL Server in Azure Virtual Machine
az backup recoverypoint move -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureWorkload} --workload-type {MSSQL} --source-tier {VaultStandard} --destination-tier {VaultArchive} --name {rp}
For SAP HANA in Azure Virtual Machine
az backup recoverypoint move -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureWorkload} --workload-type {SAPHANA} --source-tier {VaultStandard} --destination-tier {VaultArchive} --name {rp}
View archived recovery points
Use the following commands:
For Azure Virtual Machines
az backup recoverypoint list -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureWorkload } --workload-type {VM} -- tier {VaultArchive}
For SQL Server in Azure Virtual Machines
az backup recoverypoint list -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureWorkload} --workload-type {MSSQL} -- tier {VaultArchive}
For SAP HANA in Azure Virtual Machines
az backup recoverypoint list -g {rg} -v {vault} -c {container} -i {item} --backup-management-type {AzureWorkload} --workload-type {SAPHANA} -- tier {VaultArchive}
Restore
Run the following commands:
For Azure Virtual Machines
az backup restore restore-disks -g {rg} -v {vault} -c {container} -i {item} --rp-name {rp} --storage-account {storage_account} --rehydration-priority {Standard / High} --rehydration-duration {rehyd_dur}
For SQL Server in Azure VMs/SAP HANA in Azure VMs
az backup recoveryconfig show --resource-group saphanaResourceGroup \ --vault-name saphanaVault \ --container-name VMAppContainer;Compute;saphanaResourceGroup;saphanaVM \ --item-name saphanadatabase;hxe;hxe \ --restore-mode AlternateWorkloadRestore \ --rp-name 7660777527047692711 \ --target-item-name restored_database \ --target-server-name hxehost \ --target-server-type HANAInstance \ --workload-type SAPHANA \ --output json az backup restore restore-azurewl -g {rg} -v {vault} --recovery-config {recov_config} --rehydration-priority {Standard / High} --rehydration-duration {rehyd_dur}
Next steps
- Use Archive tier support via Azure portal/PowerShell.
- Troubleshoot Archive tier errors
Feedback
Submit and view feedback for