Many SAP customers have started moving their SAP systems to the cloud. By choosing Microsoft Azure with Azure NetApp® Files as the primary storage for their SAP HANA databases, they benefit from superior performance and features. For the first time in cloud environments, they can run multiple-host SAP HANA installations with active standby nodes.
In previous blog posts, I explained how to improve SAP HANA data protection when using Azure NetApp Files snapshot technology to speed up SAP HANA backup and restore workflows. Many customers have asked how to further optimize their backup infrastructure by offloading their backups to Azure blob storage.
In this blog post, I’m using a test setup created by one of the SAP experts at NetApp, Tobias Brandl, to demonstrate how Cloud Sync can be used to automatically copy data from Azure NetApp Files to Azure Blob storage. We will start with typical questions that customers might ask.
Why should you offload backups?
There are many reasons why customers would want to copy or move backups from Azure NetApp Files to Azure blob:
- Many customers want to make backups available if the primary storage is lost. For example, someone might delete the volume, or a required snapshot. Offloading safeguards your backups.
- Customers might only consider a backup valid if it is at a different location or datacenter.
- Most customers must store backups on a second media type to adhere to the 3-2-1 backup rule.
- In a typical scenario, the customer might want to keep only the most current backups in primary storage―in this case, Azure NetApp Files. However, they still want to keep older backups for a longer time.
- Also, cost optimization could be important. Azure blob is less expensive than high-performance Azure NetApp Files.
What do I need to offload?
Two parts of a backup are required to restore and recover an SAP HANA database.
The data backup is required to restore the database to the time when the backup was taken, and the log backup is required to recover the data to a specific point in time. Without the log backups, a forward recovery is not possible.
- A snapshot-based backup contains the complete data file system at the time the backup is taken. This is explained in my previous blog post (Azure NetApp Files – Restore Your HANA Database from a Snapshot Backup).
- Log backups are automatically stored in a specific folder by SAP HANA. The folder can be configured, but we recommend targeting an Azure NetApp Files-mounted file system. The default path is /hana/shared/<SID>/HDB<NR>/backup, where <SID> is the system ID and <NR> is the two-digit system number.
Where can I find the backup?
One benefit of using Azure NetApp Files snapshot technology is that all the backups are immediately accessible in a hidden directory called .snapshot, as shown in the following figure.
For each snapshot, a folder with the name of the snapshot is created, containing the complete filesystem at the time of the snapshot. Of course, these file systems are read only, so that the backup data can never be changed.
Why use Cloud Sync?
To offload backups, you can automatically monitor the .snapshot folder and copy new backups to Azure blob. There are many ways this can be accomplished by using self-written scripts, AZ copy, or different third-party backup products. Cloud Sync performs this task by periodically scanning the file system to identify new or changed files. It also preserves file ownership and special file attributes, and it is designed for speed and performance.
Cloud Sync was designed to automatically move data from a source to a different target. Many different file-system types (for example, Azure Blob, Amazon S3, generic NFS, and so on) are supported, and customers can transfer data within cloud, hybrid, and on-premises environments. It allows you to move data from on-premises data centers to the cloud, from one region within a cloud to another, or from one cloud provider to another.
Connecting a source to a target is called a sync relationship. As part of a sync relationship, customers can define the following parameters:
You can use a web-based GUI to configure Cloud Sync, or you can use a REST API to integrate Cloud Sync into your workflow automation.
- You can configure how often Cloud Sync scans for new or changed files in the source folder.
- If a file is deleted at the target, you can configure whether (mirror) or not (backup or archive) it is deleted on the source.
Example: Offloading backups using Cloud Sync
In this example, we configure one sync relationship to copy all SAP HANA backups from the snapshot folder to an Azure Blob container and a second sync relationship to copy log backups to a second Azure container. We adapt the scheduling frequency so that it matches the backup schedule as well as the automatic log backup configured in SAP HANA. Because we want to archive this data, we leave the default setting so that deleted files on the source are not removed from target. Therefore, backups are never lost.
In our video we’ll also show how to restore an SAP HANA backup from Azure Blob.
With Azure NetApp Files and Cloud Sync, customers can offload their SAP HANA backups to further optimize the data protection for their SAP HANA systems in the cloud. For more information, see the following technical reports and web pages: