Back up cloud-native SAP HANA databases
You can create a backup by assigning a pre-canned policy or the policy that you created.
Create a policy to protect SAP HANA database
You can create policies if you do not want to use or edit the pre-canned policies.
-
In the Applications page, from the Settings drop-down list, select Policies.
-
Click Create policy.
-
Specify a policy name.
-
(Optional) Edit the format of the Snapshot copy name.
-
Select policy type.
-
Specify the schedule and retention details.
-
(Optional) Specify the scripts. Prescripts and postscripts.
-
Click Create.
Prescripts and postscripts
You can provide prescripts, postscripts, and exit scripts while creating a policy. These scripts are run on the HANA host during data protection operation.
The supported format for scripts are .sh, python script, perl script, and so on.
The prescript and the postscript should be registered by the host admin into /opt/NetApp/snapcenter/scc/etc/allowed_commands.config
file.
[root@scspa2622265001 etc]# cat allowed_commands.config
command: mount
command: umount
command: /mnt/scripts/pre_script.sh
command: /mnt/scripts/post_script.sh
Environmental variables
For the backup workflow, the following environmental variables are available as part of prescript and postscript.
Environmental Variable | Description |
---|---|
SID |
The System Identifier of the HANA Database chosen for restore |
BackupName |
Backup name chosen for restore operation |
UserStoreKeyNames |
Configured userstore key for the HANA database |
OSDBUser |
Configured OSDBUser for the HANA database |
PolicyName |
Only for scheduled backup |
schedule_type |
Only for scheduled backup |
Create a backup of the SAP HANA Database
You can either assign a pre-canned policy or create a policy and then assign it to the database. Once the policy is assigned, the backups are created as per the schedule defined in the policy.
Before you begin
You should have added the SAP HANA database hosts.
Add SAP HANA database hosts
About this task
For HANA System Replication (HSR), the scheduled backup job triggers only for the primary HANA system and if the system fails over to the secondary HANA system, the existing schedules triggers a backup on the current primary HANA system. If the policy is not assigned to both the primary and secondary HANA system, after failover, the schedules will fail.
If different policies are assigned to the HSR systems, the scheduled backup triggers for both the primary and secondary HANA systems and the backup will fail for the secondary HANA system.
Steps
-
In the Applications page, if the database is not protected using any policy, click Assign Policy.
Though the database is protected using one or more policies, if needed, you can continue to assign more policies by clicking > Assign Policy.
-
Select the policy and click Assign.
The backups are created as per the schedule defined in the policy.
The service account (SnapCenter-account-<account_id>) is used to run the scheduled backup operations.
Create on-demand backup of the SAP HANA database
After assigning the policy, you can create an on-demand backup of the application.
Steps
-
In the Applications page, click corresponding to the application and click On-Demand Backup.
-
Select On-demand backup type.
-
For Policy Based backup, select the policy, retention tier and then click Create Backup.
-
For One time, select either Snapshot copy based, or File based perform the following steps:
-
Select the retention value and specify the backup name.
-
(Optional) Specify the scripts, and path for the scripts.
For more information, see Prescripts and Postscripts
-
Click Create Backup.
-