Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
jaskisin
Participant
This is in continuation of my previous blog post Backup and Recovery of SAP HANA Database on Azure using Azure Backup Plugin for HANA – Part I

3. CONFIGRUATIONS


3.1 Discovery of Databases


After running the pre-registration script, we need to go to the Azure portal → Recovery Service Vault → + Backup


Then we need to go to SAP HANA in Azure VM → Start Discovery


Azure Backup Service will try to discover the SAP HANA database on all the hosts associated in the region


Then, need to select the hostname on which we need to configure the backup and then click on Discover DBs


An Azure deployment will get started which will register host to protected Container


Below screen will appear when Deployment gets succeeded


Same can be checked in Protected Servers in Recovery Service Vaults with the number of DBs that Azure found during discovery


3.2 Configure Backups


As the databases which needs to be backed up are discovered, now next step is to configure and enable the backup

Go to Recovery Service Vault and then click on Configure Backup


Now, add the databases by clicking Add Resources for which backup needs to be executed


Select the required databases on which backup needs to be done and Click OK


Now, check the policy which will be applied to the backup and click on Enable Backup


This will start a deployment which is going to deploy backup service on the databases


Deployment has been finished



3.3 Backup Policy


A backup policy defines when backups are taken, and how long they're retained in vault for backup.

  • A policy is created at the vault level.

  • Multiple vaults can use the same backup policy, but backup policy must apply to each vault.


For setting up policy Go to Recovery Service Vault → Backup Policies, Click on Add:


Click on SAP HANA in Azure VM


Specify the Name of the Policy and specify the Full Backup Policy

In Full Backup policy, select a Backup Frequency, choose Daily or Weekly.

  • Daily: Select the hour and time zone in which the backup job should begin.

    • A full backup must be run. This option cannot be turned off.

    • Select Full Backup to view the policy.

    • Differential backups cannot be created for daily full backups.



  • Weekly: Select the day of the week, hour, and time zone in which the backup job should runs.

  • In Retention Range, configure retention settings for the full backup.

    • By default, all options are selected. Clear any retention range limits that is not required and set those that are required.

    • The minimum retention period for any type of backup (full/differential/log) is 7 days.

    • Recovery points are tagged for retention based on their retention range. For example, if daily full backup is selected, only one full backup is triggered each day.

    • The backup for a specific day is tagged and retained based on the weekly retention range and setting.




The monthly and yearly retention ranges behave in a similar way.


In Differential Backup policy, select Enable to open the frequency and retention controls.

  • At most, one differential backup per day can be triggered.

  • Differential backups can be retained for a maximum of 180 days. For longer retention, full backups must be use



In Incremental Backup policy, select Enable to open the frequency and retention controls.

  • At most, one incremental backup per day can be triggered.

  • Incremental backups can be retained for a maximum of 180 days. For longer retention, full backups can be used.



Select Log Backup to add a transactional log backup policy,

  • In Log Backup, select Enable. This can't be disabled, since SAP HANA manages all log backups.

  • Set the frequency and retention controls.

  • Log backups only begin to flow after a successful full backup is complete



After Clicking Create, policy will be created and can be checked in Backup Policies



3.4 Performance Tuning


The backups (log and non-log) in SAP HANA Azure VMs provided via Backint are streams to Azure Recovery services vaults and so it is important to understand this streaming methodology.

3.4.1 Throughput Performance


The Backint component of HANA provides the 'pipes' (a pipe to read from and a pipe to write into), connected to underlying disks where database files reside, which are then read by the Azure Backup service and transported to Azure Recovery Services vault. The Azure Backup service also performs a checksum to validate the streams, in addition to the backint native validation checks. These validations will make sure that the data present in Azure Recovery Services vault is indeed reliable and recoverable.

The Azure Backup service attempts to achieve upto ~420 MBps for non-log backups (such as full, differential and incremental) and upto 100 MBps for log backups for HANA. These are not guaranteed speeds and depend on following factors:

  • Max Uncached disk throughput of the VM

  • Underlying disk type and its throughput

  • The number of processes which are trying to read and write into the same disk at the same time.


3.4.2 Limiting Backup Throughput


In smaller VMs, where the uncached disk throughput is very close to or lesser than 400 MBps, it is concerned that the entire disk IOPS are consumed by the backup service which may affect SAP HANA's operations related to read/write from the disks. In that case, it is possible to throttle or limit the backup service consumption to the maximum limit, using below steps:

Go to path /opt/msawb/bin and create a new file with name ExtensionSettingOverrides.json and add below key values to it
{
"MaxUsableVMThroughputInMBPS": 200
}


Change the permissions and ownership of the file using following command:
chmod 750 ExtensionSettingsOverrides.json
chown root:msawb ExtensionSettingsOverrides.json


No restart of any service is required. The Azure Backup service will attempt to limit the throughput performance as mentioned in this file.

4. SAP HANA BACKUP


4.1 On-Demand Backup


Backups run in accordance with the policy schedule. On-demand backups can be run as follows:

Go to Recovery Service Vault and click on Backup Items: -


Click on SAP HANA in Azure VM, as it has 2 backup items for the connected HANA Databases


As Initial backups is pending, hence select systemdb to initialize backup and click on Backup now


Specify the type of backup and click OK


A notification will appear for triggering of the backup


Full backup of HANA systemdb has been triggered


Systemdb Backup job can be monitored in Backup jobs, as it shows backup is running


After 3 minutes, time is according to the size of the database, backup has been finished


Backup of other tenant database can be triggered with same way by going to Backup Items


After successful completion of backup, we can check the same in Backup jobs


We can also check for the Full backups and Log backups traces in file /usr/sap/<sid>/HDB<nr>/<host>/trace/backint.log


And in file /usr/sap/<sid>/HDB<nr>/<host>/trace/backup.log


Log backups for point in time recovery can also be checking in Recovery Service Vault → Backup Item



4.2 Backup from HANA Studio/Cockpit with Azure Backup Enabled


In case of taking local backup (using HANA Studio) of a database that's being backed up with Azure Backup, below steps needs to be followed:

  • Wait for any full or log backups for the database to finish. Check the status in SAP HANA Studio / Cockpit.

  • Disable log backups and set the backup catalog to the file system for relevant database.

    • To do this, double-click systemdb → Configuration → Select Database → Filter (Log).

    • Set enable_auto_log_backup to No.

    • Set log_backup_using_backint to False.

    • Set catalog_backup_using_backint to False.



  • Take an on-demand full backup of the database.

  • Wait for the full backup and catalog backup to finish.

  • Revert the previous settings back to those for Azure:

    • Set enable_auto_log_backup to Yes.

    • Set log_backup_using_backint to True.

    • Set catalog_backup_using_backint to True.




 

This is end of Part – II, in next part Backup and Recovery of SAP HANA Database on Azure using Azure Backup Plugin for HANA – Part III of this article you can find more information about Restoration, Stopping and Managing Backups using Azure Backup Plugin for HANA.
2 Comments
Labels in this area