Blog Post

Running SAP Applications on the Microsoft Platform
2 MIN READ

Archiving Azure Resource Groups to cost-efficient BLOB Storage

Martin_Merdes's avatar
Martin_Merdes
Icon for Microsoft rankMicrosoft
Mar 01, 2022

In addition to productive workloads, Azure is often used as a test environment. In Azure Development, we have created lots of different SAP landscapes for testing SAP workload. Each landscape has its own Azure Resource Group. Some of these resource groups are very huge and are used very seldom. Therefore, their VMs are stopped most of the time for saving costs. However, several TiB of Premium Storage disks are still occupied. It would be a good idea to move the disks to cost-efficient storage as long as the VMs are not used.

 

The Open Source tool RGCOPY introduced two new operation modes for this purpose:

 

RGCOPY Update Mode

In Update Mode, you can easily change the SKU of all disks in a resource group to Standard SKU (and back to Premium SKU). The command looks like this:

$rgcopyParameter = @{
    sourceRG        = 'contoso_source_rg'
    updateMode      = $True
    setDiskSku      = 'Standard_LRS'
}
.\rgcopy.ps1 @rgcopyParameter

You can change lots of other resource properties in RGCOPY Update Mode, too. For example, VM size, disk size, disk Performance Tier, disk caching, and Accelerated Networking. In addition, you can change the service level of Azure NetApp volumes.

 

RGCOPY Archive Mode

In Achive Mode, you can copy all disks to the BLOB storage of a storage account. You can use the same storage account for archiving different resource groups. Therefore, RGCOPY creates a separate storage account container for each archived resource group. The command looks like this:

$rgcopyParameter = @{
    sourceRG         = 'contoso_source_rg'
    targetRG         = 'contoso_backup_rg'
    targetLocation   = 'eastus'
    archiveMode      = $True
    archiveContainer = 'contoso-source-rg'
}
.\rgcopy.ps1 @rgcopyParameter

In addition, RGCOPY creates an ARM template that can be used for restoring the archived resource group directly from the BLOB storage. The ARM template is also stored in the BLOB storage. This ARM template can be deployed to a different resource group, too. Hereby, you can create a copy of the original resource group in RGCOPY Copy Mode (which was the original purpose of the tool RGCOPY).

Updated Mar 01, 2022
Version 1.0
No CommentsBe the first to comment