Every so often I need to configure VERITAS Netbackup to backup one of my SAP HANA databases and sometimes I return to my notes on the process to remind myself how it’s done. The most recent time when using block storage volumes on FlashArray//C as the target for backup data , I decided to fully document the process for others to use. In this blog post I am going to do exactly that.
SAP HANA backups can be done in a number of ways :
- Backup to a local disk or NFS target
- Backup to a Backint certified backup tool
- Taking an application consistent storage snapshot
VERITAS Netbackup is a certified SAP HANA Backint Independent Software Vendor(ISV) which can protect both data and transaction logs to any of the storage devices supported by it. In my latest tests, I have been using Pure Storage® FlashArray//C as a target for a Veritas AdvancedDisk disk storage type. Veritas’ AdvancedDisk storage allows disk storages which are directly attached to the Netbackup media server to be combined into a single disk pool. The use of the storage in this way allows for advanced features, like storage lifecycle policy and intelligent capacity management, to be utilised.
FlashArray//C is a capacity optimised all flash array targeted at consolidating tier 2 workloads such as
- Test and development
- Multi-site disaster recovery
- Data protection using hybrid storage economics
As FlashArray//C is not only targeted creating an extremely dense storage array , but it also has always on deduplication – further increasing the amount of storage space available to be used. For data protection use cases having more available storage space directly impacts how much data can be protected and how long it can be retained for.
To configure SAP HANA with Veritas Netbackup and FlashArray™ ensure the following is already in place:
- A Netbackup media server and appropriate license for AdvancedDisk are installed
- A block storage volume is connected from FlashArray//C to the media server , formatted with a filesystem (I used XFS) and mounted somewhere in the local filesystem
- An Advanced Disk disk pool has been created on the media server using the FlashArray//C volume
- (Optional) The Maximum job per client , Global Attributes value is set to the number of parallel Backint streams to be used
- The Netbackup Client for the relevant OS (RHEL or SLES) is installed on the SAP HANA host
And then all that needs to happen is the following :
1. Create a soft link from the hdbbackint binary provided by the Netbackup client to the instance on the SAP HANA host:
ln -s /usr/openv/netbackup/bin/hdbbackint /usr/sap/<SID>/SYS/global/hdb/opt/hdbbackint
2. In the Netbackup scripts folder for SAP (/usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle) on the SAP HANA host copy the “initSAP.utl” file to a new folder , I typically use the instance name as a convention i.e “cp initSAP.utl init<SID>.utl”. In the new file which is created – the minimum requirement is that the line with “#policy sap_backup” is uncommented and the name of the policy in the Netbackup master server is set here
3. In the netbackup Master server creates a new policy for File systems, databases, applications with the policy type being “SAP”, the SAP HANA client added to the client list and everything else created as default.
4. Using SAP HANA studio logged into the System database (Multiple database containers HANA 2.0) or the main database, go to the Configuration tab, expand Global.ini and expand backup
- Enter the location of the configuration file created in the Netbackup scripts folder for sap (/usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle/init<SID>.utl) in the fields for catalog_backup_parameter_file, data_backup_parameter_file and log_backup_parameter_file
- Set the data_backup_buffer_size to 4096
- Set the log_backup_parameter_size to 409
- Set log_backup_using_backint to “true”
- Set max_log_backup_size to 64
- (Optional) to get the best performance throughput set paralell_data_backup_backint to 8/16 or 32
5. Once all of this is complete simple execute the following in native sql:
BACKUP DATA FOR <DATABASE_SID> USING BACKINT (‘COMPLETE_DATA_BACKUP’’)