This topic provides answers to some frequently asked questions (FAQ) about the SAP HANA backup feature of Cloud Backup.
What is SAP HANA backup?
SAP HANA backup is a backup feature provided by Cloud Backup that allows you to manage your SAP system on Alibaba Cloud.
SAP has certified Cloud Backup for integration with SAP HANA Backint. Cloud Backup is compatible with SAP HANA 1.0 and 2.0. You can use a Cloud Backup client to back up SAP HANA databases deployed on Elastic Compute Service (ECS) instances and restore the databases based on your business requirements. For more information, see Overview of the SAP HANA backup feature.
You can also back up on-premises files and VMWare virtual machines (VMs) in data centers to backup vaults on Alibaba Cloud. Cloud Backup provides simple and easy-to-use native data protection features for various types of data on Alibaba Cloud, such as ECS files, Oracle databases, SQL Server databases, File Storage NAS (NAS) file systems, and Object Storage Service (OSS) objects. For more information, see What is Cloud Backup?
What is the application scope of SAP HANA backup?
SAP HANA databases deployed on ECS instances.
Backint supports multitenant database containers (MDCs) in SAP HANA 1.0 SPS 09 (revision 94) and later and SAP HANA 2.0 SPS 01 and later. Backint does not support single-container systems in SAP HANA 1.0.
How do I view the status and logs of the Cloud Backup client after I register an SAP HANA database?
After you register an SAP HANA database in the Cloud Backup console, the SAP HANA database is in the Registered state.
The default log path is /opt/alibabacloud/hbrclient/logs
.
You can run the ps axu|grep hybrid
command to view the status of the Cloud Backup client. If the process information exists, the Cloud Backup client is started and running properly.
root 11472 0.0 0.0 9288 1552 pts/2 S+ 16:11 0:00 grep --color=auto hybrid
root 30480 0.0 0.2 56296 17028 ? Ssl 13:26 0:04 /opt/alibabacloud/hbr/client/hybridbackup -p 0
Where are backup logs stored?
Logs of a Cloud Backup client for SAP HANA backup: /opt/alibabacloud/hbr/logs
Backint logs of SAP HANA databases: /usr/sap/{SID}/SYS/global/hdb/logs/
Backup logs of SAP HANA databases: /usr/sap/{SID}/HDB{InstanceNumber}/{hostname}/trace/DB_{DBNAME}/backup.log
SAP HANA databases automatically manage and store logs. You can use HANA Studio or other related tools to execute the following SQL statements to query and obtain the backup content in the logs:
select CAT.* from SYS_DATABASES.M_BACKUP_CATALOG CAT JOIN SYS_DATABASES.M_BACKUP_CATALOG_FILES FILS on CAT.BACKUP_ID = FILS.BACKUP_ID where CAT.entry_type_name = 'log backup' and CAT.state_name = 'successful' and FILS.DESTINATION_TYPE_NAME = 'backint' and CAT.database_name = 'SYSTEMDB' order by sys_end_time
What do I do if a Cloud Backup client cannot be installed for SAP HANA backup because multiple /usr/sap/<SID>/SYS/global/hdb/opt directories exist?
Connect to the ECS instance.
Change the names of the
/usr/sap/<SID>/SYS/global/hdb/opt
directories for the SAP HANA databases that do not require backup to/usr/sap/<SID>/SYS/global/hdb/opt_backup
.Log on to the Cloud Backup console, and then reinstall the Cloud Backup client for the SAP HANA database.
What do I do if a database cannot be connected when I restore the database to the source SAP HANA instance?
When you create a restore job and restore a database to the source SAP HANA instance, the database cannot be connected. In this case, perform the following steps:
Check whether the SAP HANA database is started.
Check whether the SSL certificate has expired. If the certificate has expired, perform one of the following operations:
Replace the certificate.
Specify that the SSL certificate is not verified in the console.
What do I do if no data is obtained when I restore a database to the source SAP HANA instance?
When you create a restore job and restore a database to the source SAP HANA instance, no data exists on the selected database. In this case, check whether the client status is normal.
What do I do if I cannot find the backup record during restoration?
Issue
The backup record may not be found if you create a restore job after the operating system is reinstalled, the snapshot is rolled back, or the SAP HANA database is uninstalled and reinstalled on the ECS instance.
Cause
When you restore the database to the source SAP HANA instance, Cloud Backup first retrieves the backup records in the preconfigured SAP HANA backup path. Note that if the operating system is reinstalled, the snapshot is rolled back, or the SAP HANA database is uninstalled and reinstalled on the ECS instance, the backup records stored in the SAP HANA database may be cleared.
Solution
If you have enabled Use Backint for Catalog Backup during the backup, you can restore the database. Perform the following steps:
Log on to the source SAP HANA instance and delete the ECS instance.
Register a new SAP HANA instance and use the same parameter configurations as the previously registered SAP HANA instance. Install a Cloud Backup client and add the deleted ECS instance.
Create a restore job and select the newly registered SAP HANA instance as the source instance for restoration. In other words, restore the database from the source SAP HANA database to another SAP HANA instance.
After the database is restored and if the backup data of the source SAP HANA instance is no longer used, you can delete the source SAP HANA instance. If you have not enabled Use Backint for Catalog Backup during the backup, the backup records cannot be found, but the backup data still exists. For more information about how to restore the backup data, see Restore a database to an SAP HANA instance by specifying a prefix.
What do I do if SQL statements fail to be executed on an SAP HANA database?
The SAP HANA log space is used up, which may cause the failure to execute SQL statements. Clear the disk space and try again later.
How do I manually delete backup records?
You cannot manually delete SAP HANA data from Cloud Backup. You can only wait until the data automatically expires. You can select the following option to delete data by using SAP Studio.
What do I do if the instance is activated but an internal error message appears on the database page?
If an error message appears on the SAP HANA Backup page of the Cloud Backup console, check the SAP HANA license. You can connect to SYSTEMDB and execute the following SQL statement to query whether all databases contain licenses. If no result is returned, a license is missing for a database.
SELECT * FROM M_LICENSE
For more information, see https://launchpad.support.sap.com/#/notes/2619291.
Why does SAP HANA backup fail? How do I resolve the failure?
When an SAP HANA backup is performed, the client connects to the SAP HANA instance and sends an SQL statement to start the backup job. If the SQL statement is successfully executed, the client continues to send a query statement to the SAP HANA instance to obtain the backup progress and final state. If a backup failure occurs, the related error information is recorded in the logs of the client. You can effectively trace and analyze issues based on specific job time and log records. The following part lists some common issues:
If the following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file, the local time is significantly different from the server time. We recommend that you adjust the local time first, or enable automatic Network Time Protocol (NTP) synchronization to ensure time consistency.
time="2021-11-04T16:24:17+08:00" level=info msg="InvalidTimeStamp.Expired retry, retryDelay: 5000 ms, retry times: 14" file=client.go line=377
If a backup job fails or all backup jobs are canceled (not manually canceled) and "No space left on device" appears in the backup.log file, the local disk space is used up and needs to be cleared.
If the following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file and no error message appears in the console, you may have configured another scheduled backup job, which conflicts with the SAP HANA backup job during execution.
time="2021-08-29T01:10:00+08:00" level=error msg="Execute hana backup failed : hbr: client returned error: ErrorCode=HanaSqlError, ErrorMessage=SQL Error 447 - backup could not be completed: [110122] A data backup cannot be created because another data backup is running or a storage snapshot has been prepared., Data=, values=map[]" file=hanabackupjob.go line=98
If an unexpected backup failure or non-execution alert occurs, and no record of backup completion exists in the backup history, the MQTT request may time out. You can view the logs at the corresponding point in time in the /opt/alibabacloud/hbr/logs/hybridbackup.log file.
If the following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file, the password may have expired and need to be updated in a timely manner.
time="2023-11-26T00:00:08+08:00" level=error msg="SAP Error: SQL Error 447 - backup could not be completed: [110203] Not all data could be written: Expected 4096 but transferred 0, [110507] Backint exited with exit code 1 instead of 0. console output: Internal Error: The user account is in unknown status. " file=errorwrapper.go line=28
If the following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file, the server may reject the request because your timestamp is inaccurate.
time="2024-06-23T01:36:46+08:00" level=error msg="HBR DescribeUserBusinessStatus returns hbr: service returned error: StatusCode=400, Code=InvalidSecurityToken.Expired, Message=Specified SecurityToken is expired., RequestId=A6CDF56F-CA56-53E8-9342-24E19F768D40" file=client.go line=428
Use one of the following methods to check the timestamp:
Run the following command and check the System Time parameter in the command output. This parameter reflects the difference between the system time and the NTP time. If the time difference is within a few milliseconds, the timestamp is in the normal state.
sudo chronyc tracking
Run the following command and check the offset parameter in the command output. This parameter reflects the difference between the system time and the NTP time. If the time difference is within a few milliseconds, the timestamp is in the normal state.
ntpd -q
No failure record exists in the console and the following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file:
SQL Error 447 - backup could not be completed: [110122] A data backup cannot be created because another data backup is running or a storage snapshot has been prepared.
Use one of the following methods:
Check whether other backup software performs SAP HANA backup at the same time.
Restart the SAP HANA instance when backup data exists. For more information, see SAP Knowledge Base.
The following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file:
[447] backup could not be completed, [1000002] Allocation failed ; $size$=16777216; $name$=DataPage; $type$=pool; $inuse_count$=6; $allocated_size$=17104896; $failure_type$=GLOBAL_ALLOCATION_LIMIT; $failure_flag$= (early exit)
In addition, a failure record exists in the console.
This issue occurs because SAP HANA is unable to allocate more memory, causing out-of-memory (OOM). For more information, see SAP HANA BACKUP Failing Due to Out of Memory.
For more information about the solution to the issue, see SAP HANA Solutions.
For more information about the cause of OOM, see SAP HANA Technical Support.
The following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file:
"SQL Error 3584 - distributed SQL error: [2617] executor: plan operation execution failed with an exception.exception:exception 30160: Failed to read password from key store. $name=$M_BACKUP_CONFIGURATION. $col=$IS_ROOT_KEY_BACKUP_PASSWORD_SET. $ci=$23\n,Exception in executor plan00468@$spdr-db:31001 while executing pop 1, Data=[], values=[]map[]"
In addition, the status of the backup job is Failed in the console.
This error message indicates that SAP HANA returns an SQL error with error code 3584 when the backup SQL statement is executed. Specifically, an exception occurs when SAP HANA reads the password from the key storage. This exception generally occurs on components related to SAP HANA. We recommend that you contact the SAP HANA O&M personnel or providers for further assistance and solutions.
The
InstanceRAMRoleNotFound
error message or the following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file:Failed to get client credential from Instance RAM role. hbr: client returned error: ErrorCode=InstanceRAMRoleNotFound, ErrorMessage=InstanceRAMRoleNotFound
In addition, the restore job is in the Running state and cannot be stopped in the console.
This error indicates that the AliyunECSAccessingHBRRole role on the ECS instance has been revoked. Log on to the ECS console to attach the role again and restart the Cloud Backup client. For more information, see Why is the AliyunECSAccessingHBRRole role attached to an ECS instance? Can the role be revoked?
Why is the AliyunECSAccessingHBRRole role attached to an ECS instance? Can the role be revoked?
To ensure that SAP HANA backup can work properly, you must install a Cloud Backup client on the ECS instance running SAP HANA. The client requires the AliyunECSAccessingHBRRole role to obtain the Security Token Service (STS) token and communicate with the server. If the role is revoked, Cloud Backup cannot back up and restore data properly. Perform the following steps to ensure that SAP HANA backup can work properly:
Log on to the ECS console to attach the AliyunECSAccessingHBRRole role to the ECS instance again. For more information, see Attach the instance RAM role to an ECS instance.
Run the
systemctl restart hybridbackup
command to restart the Cloud Backup client or uninstall and reinstall the client.
What do I do if an error occurs when I view a backup job?
Issue
The following error message appears when you view a backup job.
In addition, the following error message appears in the /opt/alibabacloud/hbr/logs/hybridbackup.log file:
time="2023-12-01T14:38:23+08:00" level=error msg="prepare stmt SELECT count(*) FROM sys_databases.M_BACKUP_PROGRESS error : SQL Error 437 - only commands for license handling are allowed in current state" file=db.go line=220
Solution
SAP HANA 2.0 requires license registration, and therefore the multi-user mode is required.
What do I do if a restore job fails?
Issue: The restoration fails if you select an earlier backup point when you restore data by using the Specify Time or Specified Backup method, and then select the latest backup point to restore data again by using the Specify Time method.
Solution: If you want to restore data for a consecutive number of times, we recommend that you use the Specified Backup method and select a backup point to restore data.
Does Cloud Backup support backup of the SAP HANA databases deployed in a self-managed data center?
No, Cloud Backup does not support backup of the SAP HANA databases deployed in a self-managed data center. However, you can back up the SAP HANA databases to an on-premises storage, and then back up the databases to the cloud by using the on-premises file backup feature. For more information, see Back up on-premises files.
Do I need to purchase another Alibaba Cloud storage service to back up SAP HANA databases?
No, you do not need to purchase another Alibaba Cloud storage service. Cloud Backup uses Backint to directly call the API for SAP HANA backup. Data is backed up to the cloud storage at the Cloud Backup backend through pipes. This does not occupy the storage space of the ECS instances where the SAP HANA databases are deployed. Therefore, you do not need to purchase another Alibaba Cloud storage service.
Can I use Cloud Backup to back up SAP HANA databases that are deployed in single-container systems?
No, you cannot. The SAP HANA backup feature in the Cloud Backup console uses the Backint API. To back up an SAP HANA database that is deployed in a single-container system, you can adopt either of the following solutions:
Solution 1: Back up the SAP HANA database to the disk of an ECS instance, and then use the on-premises file backup feature of Cloud Backup to back up the database. For more information, see Back up on-premises files.
Solution 2: Convert the SAP HANA single-container system to an SAP HANA MDC system. For more information, see SAP official documentation or consult your SAP partner.
Can I store the backup data of SAP HANA databases for different environments in separate backup vaults?
Yes, you can store the backup data of SAP HANA databases for different environments in separate backup vaults. When you register an SAP HANA database in the Cloud Backup console, you can create a backup vault or select an existing backup vault. The following restoration methods are supported:
Does SAP HANA backup support the cross-region (remote) backup feature?
Yes, SAP HANA backup supports the cross-region (remote) backup feature. For more information, see Cross-region backup.
What are the precautions for configuring the SAP HANA backup feature?
If your SAP HANA database is deployed in a high-availability architecture, you must specify a high-availability virtual IP address (HAVIP) for the ECS instance where the SAP HANA database is registered. This ensures that backup jobs can run properly when a failover is triggered in the cluster.
By default, the Use Backint for Catalog Backup and Auto Log Backup settings are not enabled in the backup parameters. You must manually enable the settings for the SAP HANA system database and each tenant database to ensure that the databases can be restored when required.
Tenant databases inherit the parameter settings of the system database. Check that the parameter settings of each database meet your business requirements.
How do I configure the retention period of backup data for an SAP HANA database?
Log on to the Cloud Backup console and select the SAP HANA instance.
On the Databases tab, select a system database or tenant database, and then choose More > Configure Retention Policy in the Actions column.
The default backup retention period is Permanent. Change the value based on your business requirements.
Parameter
Description
Retention Policy
Custom
Select this option if you need to specify a limited retention period. You must also specify an interval at which retention jobs are run.
Permanent
If you select this option, Cloud Backup permanently retains your backup data.
Retention Job Interval
This parameter is required only if you set the Retention Policy parameter to Custom. This parameter specifies the interval at which retention jobs are run. The time is accurate to seconds.
NoteWe recommend that you back up your data during off-peak hours.
Retention Period
This parameter is required only if you set the Retention Policy parameter to Custom. This parameter specifies the retention period of backup data.
Unit: days, weeks, months, or years. The minimum retention period is one day, and the maximum retention period is 10 years.
NoteCloud Backup deletes the expired catalogs and data that are related to Backint and file backup. The deleted catalogs and data cannot be restored. We recommend that you set the retention period based on your business requirements.
If you modify the retention period, the modification takes effect on historical backups. The data retention job is run once a day. However, the statistic collection of the backup vault is delayed for 12 to 24 hours. Therefore, after you modify the retention period of backup data, it takes about three natural days for you to observe the change in the data volume of the backup vault. If a significant modification is made (for example, the retention period is changed from 2 years to 2 months), Cloud Backup controls the execution speed of the data retention job. As a result, the reduction in the data volume of the backup vault may last for a period of time.
Why do I receive an alert text message or alert email indicating that the backup failed, but the backup job is displayed as successful in the Cloud Backup console?
Issue
An alert text message or alert email in the following format is received: "Backup of database XXX on your SAP HANA instance XXX (ID: cl-xxxxxxxx) failed. The backup ID is 0. Log on to the Cloud Backup console to check and resolve the issue." However, after you log on to the Cloud Backup console, the backup records show that the backup has been completed and no exception is prompted.
Cause
Other backup software may also be running during the backup, or SAP HANA experiences an exception. You can check the log in the
/opt/alibabacloud/hbrclient/logs/hybridbackup.log
path and find the alert information around the time when the alert notification was sent. The following code shows an example:time="2024-08-29T01:35:01+08:00" level=error msg="Execute sql `BACKUP DATA FOR PRD USING BACKINT ('/usr/sap/XXX/SYS/global/hdb/backint/DB_HHH/COMPLETE_DATA_BACKUP_2024_08_29_01_30') ASYNCHRONOUS` failed : SQL Error 447 - backup could not be completed: [110122] A data backup cannot be created because another data backup is running or a storage snapshot has been prepared." file=db.go line=163 time="2024-08-29T01:35:01+08:00" level=error msg="SAP Error: SQL Error 447 - backup could not be completed: [110122] A data backup cannot be created because another data backup is running or a storage snapshot has been prepared." file=errorwrapper.go line=28
This error indicates that the Cloud Backup client has executed an SQL statement for backup by connecting to SAP HANA. SAP HANA returns error code 447 to inform the Cloud Backup client that the command fails to be executed. However, the backup job triggered by the command may have been executed properly in the SAP HANA background. For more information, see SAP Knowledge Base.
Solution
If the issue occurs occasionally and you have confirmed that the backup is successfully executed on the Backup Jobs tab, ignore such alert notification. However, if the issue occurs frequently, we recommend that you restart the SAP HANA instance during off-peak hours to resolve the issue.
Why is the time when an alert notification is received different from the time when an error occurred?
Nighttime suppression is set for alert text messages. The system does not send text messages of the alerts generated from 20:00 one day to 08:00 the next day until 08:00 the next day. However, alert emails are not subject to this restriction and are sent immediately when alerts are generated.
Why does the source data size displayed on the Storage Vaults page increase unexpectedly after I back up an SAP HANA database?
Cause
For the SAP HANA data backed up in a storage vault, Cloud Backup regularly queries the SAP HANA database for all historical data backed up by using Backint, including the SAP HANA data that is backed up by other backup software and is not deleted. Note that the statistics on the size of historical backup data do not affect the calculation of fees. Fees are calculated based on the total size of data in the storage vault.
Solution
Execute SQL statements in the SAP HANA database to delete all the backup records that are created by using backup methods other than Cloud Backup and are no longer required. Before you delete these backup records, make sure that you do not need to retain them.
What do I do if duplicate database names exist on the SAP HANA instance when I create an SAP HANA restore job?
The databases have duplicate names but are used for different services. Select one of the databases when you create an SAP HANA restore job.