Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

2023-03-22 1950261

1950261 - KBA 3299969_ SAP HANA Database Backup


Policy Recommendations and Regular Backup Script
Version 13 Type SAP Business One Notes
Language English Master Language English
Priority Recommendations/additional info Category FAQ
Release Status Released for Customer Released On 06.03.2023
Component SBO-HANA ( SAP HANA for SAP Business One )

Please find the original document at https://launchpad.support.sap.com/#/notes/ 1950261

Symptom

This SAP Note has been replaced by KBA 3299969 and will be archived soon.

For SAP Business One, version for SAP HANA users, SAP HANA provides a range of database backup and
recovery functions. You must follow the instructions in the SAP HANA Administration Guide at
http://help.sap.com/hana_appliance to back up your database.

This note offers additional recommendations on developing a backup policy for your SAP HANA database.
Besides, you can use the script from SAP Note 1651055 to enable regular auto-backup.

Solution

Recommended Backup Policy:

Note: The script from SAP Note 1651055 supports SAP HANA SPS 06 and above.

Note: For a fully automated backup solution, please use the SAP Business One RSP backup solution.

Note: If you intend to use a non-default path as the backup location, you should ensure the backup folders
have the following privileges.

• The folder's owner is the sid<adm> user (e.g. ndbadm) and the user group is sapsys.
• The folder's privilege is 771.

You can change the backup folder path by performing the following steps:

1. Log on to Linux server as root and execute the below commands to grant the privileges:

• chown <sid<adm> User Name>:sapsys <Backup Folder Path> Example: chown ndbadm:sapsys
<Backup Folder Path>
• chmod 771 <Backup Folder Path>

2. In SAP HANA studio, navigate to SYSTEMDB tenant, <admin> → Configuration → Global.ini →


persistence → basepath_databackup or basepath_logbackup and update the path information.
3. Restart SAP HANA database

Note: For HANA 2.0, a full backup for both the SYSTEMDB and the Tenant Database is required.

1. Make the following preparations:


• Create a backup user with the BACKUP OPERATOR system privilege and create a user key in

© 2023 SAP SE or an SAP affiliate company. All rights reserved 1 of 3


2023-03-22 1950261

the user store, as below:


1. In the SQL console of the SAP HANA studio, execute the following SQL statements as an
administrative user (e.g. SYSTEM):
create user <Backup User Name> password "<Password>";
alter user <Backup User Name> DISABLE PASSWORD LIFETIME;
grant backup operator to <Backup User Name>;
2. Log on to the Linux server as the ndbadm user and execute the following command in a
terminal:
hdbuserstore set USER4BACKUP localhost:3<Instance Number>15 <Backup User
Name> <Password>
Example: hdbuserstore set USER4BACKUP localhost:30015 BackupUser Initial0
• Determine the oldest data backup that you want to retain on your SAP HANA server.
For example, your average data backup set is 8 GB per day and 400 GB of disk space is
allocated to the SAP HANA server. Then we recommend that you retain backups of the past 2
weeks and no more than 3 weeks. In this case, your backups on the SAP HANA server are no
more than 160 GB (approximately 20 days' backup sets).
• Make sure that the sid<adm> user (e.g. ndbadm) has the privilege to execute crontab.
2. Do the following to set up a regular automatic backup schedule:
1. Copy the shell file BackupScript.sh (unzipped) from SAP Note 1651055 to the home directory of
the sid user (e.g. /usr/sap/NDB/HDB00/).
2. Schedule the backup job in cron as the sid user (e.g. ndbadm), using the command crontab -e.
Example:
30 05 * * * /usr/bin/sh /usr/sap/NDB/HDB00/BackupScript.sh 2>>
/usr/sap/NDB/HDB00/backup.log
The backup job is scheduled to run at 5:30 a.m. each day.
3. Perform the following administrative tasks every day or based on your backup schedule:
• Check backup.log under the home directory of the sid<adm> user (e.g. /usr/sap/NDB/HDB00/).
• Check the latest backups and store a copy on an external location, as below:
1. In the SAP HANA studio, double-click the Backup folder under the SYSTEMDB and SAP
Business One tenants.
2. In the Backup editor, on the Backup Catalog tab, check the status of the appropriate
backup (see the attachment BackupStatus.png).
3. Copy the backup to a storage location or medium somewhere other than the SAP HANA
server.
You can find the backup's current location in the backup details as well (see the
attachment BackupStatus.png).
• Delete all backups, for both SYSTEMDB and B1 tenants, that are beyond the determined time
point to ensure that there is enough space for SAP HANA database's normal operations, as
below:
1. In the Backup editor, on the Backup Catalog tab, right-click the oldest backup that you
want to retain and select Delete Older Backups.
2. In the Backup Deletion of System xxx window, on the Specify Backup Deletion Settings
page, select Catalog and backup location and File system (see the attachment
BackupDeletion.png), and then choose the Next button.
3. On the Review Backup Deletion Settings page, choose the Finish button.
4. Confirm the deletion.
SAP HANA starts deleting selected data in the background. You can continue with other
operations.
4. Perform the following administrative tasks on a regular basis as appropriate:
• Check the backup.log file to monitor backup activities. This file is generated in the same storage
place as the script.
• Delete backup copies on external storage that are old enough.

© 2023 SAP SE or an SAP affiliate company. All rights reserved 2 of 3


2023-03-22 1950261

Products

SAP B1 10.0 FOR SAP HANA


SAP B1 9.1 FOR SAP HANA
SAP B1 9.2 FOR SAP HANA
SAP B1 9.3 FOR SAP HANA

This document refers to

SAP
Title
Note/KBA

2157386 SAP HANA Backup Scheduling in RSP

Collective Consulting Note for SAP HANA-Related Topics of SAP Business One, version for SAP
2027458
HANA

1841037 Central Note for SAP Business One 9.0, version for SAP HANA

1869119 Checking backups with "hdbbackupcheck"

1651055 Scheduling SAP HANA Database Backups in Linux

1642148 FAQ: SAP HANA Database Backup & Recovery

This document is referenced by

SAP Note/KBA Title

3139544 Optimize Service Layer Performance

1856149 SAP Business One Database Backup service not supported

Attachments

File Name File Size Mime Type

BackupDeletion.png 26 image/x-png

BackupStatus.png 72 image/x-png

© 2023 SAP SE or an SAP affiliate company. All rights reserved 3 of 3


2023-03-22 1950261

Terms of use | Copyright | Trademark | Legal Disclosure | Privacy

© 2023 SAP SE or an SAP affiliate company. All rights reserved 4 of 3

You might also like