所有 SAP HANA 伺服器都必須安裝備份和災難復原代理程式,才能讓備份和災難復原服務保護其中的資料。
如果 SAP HANA 的基礎資料磁碟區以使用 LVM 快照的 SAP HANA 資料庫備份形式受到保護,或是以與 backint 整合的檔案式備份形式受到保護,且您也要保護同一個主機上的檔案系統,則應在檔案系統應用程式中,將 /hana/log 和 /hana/data 設為排除路徑。請參閱「Linux 檔案系統」。
HANA 封存記錄備份建議:
請務必將 HANA 封存記錄備份路徑設為 global.ini 中的 basepath_logbackup 和 basepath_catalogbackup。
請勿使用 HANA 封存記錄掛載點來儲存 HANA 封存記錄備份以外的檔案。
根據預設,系統會在每次備份資料庫時執行封存檔案清除作業。如要獲得最佳復原 RTO,請保留預設設定。
設定 HANA 使用者儲存庫金鑰
請按照下列操作說明設定 HANA 使用者儲存庫索引鍵:
透過 HANA Studio 建立資料庫備份使用者。
取得執行個體和 SQL 通訊埠號碼。
為系統資料庫備份使用者建立 SAP HANA hdbuserstore 索引鍵。
步驟 1:透過 HANA Studio 建立資料庫備份使用者
請根據公司標準選擇資料庫使用者名稱。請務必在 SYSTEMDB 下建立這個使用者帳戶。
在 SYSTEMDB 下建立使用者
在 SAP HANA Studio 的 SYSTEMDB 中,依序前往「System」>「Security」>「Users」>「New User」。
指派使用者名稱和密碼。
將「Force password change on next logon」(下次登入時強制變更密碼) 設為「No」(否)。
備份和 DR 代理程式是 SAP HANA 伺服器上占用空間小且輕量化的服務,用於擷取 SAP HANA 資料庫的應用程式一致性複本。它會使用變更區塊追蹤功能,找出備份和災難復原的永久增量擷取策略中,資料庫資料的變更。所有 SAP HANA 伺服器 (含有備份和災難復原服務保護的資料) 都必須安裝備份和災難復原服務代理程式。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eBefore backing up SAP HANA scale-out database instances, the database server must be added as a host to Backup and DR Service, and the relevant services like \u003ccode\u003enameserver\u003c/code\u003e and \u003ccode\u003eindexserver\u003c/code\u003e must be running.\u003c/p\u003e\n"],["\u003cp\u003eThe Backup and DR agent requires an SAP HANA \u003ccode\u003ehdbuserstore\u003c/code\u003e key for host-side operations instead of a username and password, and the database \u003ccode\u003elog_mode\u003c/code\u003e must be set to \u003cstrong\u003enormal\u003c/strong\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAll SAP HANA servers with data to be protected must be onboarded to Backup and DR Service and have the Backup and DR agent installed.\u003c/p\u003e\n"],["\u003cp\u003eFor SAP HANA Archive log backups, the \u003ccode\u003ebasepath_logbackup\u003c/code\u003e and \u003ccode\u003ebasepath_catalogbackup\u003c/code\u003e paths in global.ini should be set correctly, and only HANA Archive log backups should be stored in this path.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure proper backup functionality, a database backup user needs to be created in HANA Studio, the instance and SQL port numbers must be retrieved, and an SAP HANA \u003ccode\u003ehdbuserstore\u003c/code\u003e key needs to be created for system database backup users.\u003c/p\u003e\n"]]],[],null,["# Prepare SAP HANA databases for Backup and DR Service\n\nBefore you back up HANA database instances and data, you must add the database\nserver as a host to Backup and DR Service. Before you begin, be sure to follow these\npreparation steps.\n| **Note:** This information is for SAP HANA scale-out instances. For Scale-Up and HA 1+1 configurations, see [Backup and DR Service for SAP HANA](/backup-disaster-recovery/docs/concepts/backupdr-for-sap-hana).\n\nPrerequisites\n-------------\n\nBefore you begin, it's a good idea to review [Backup and DR for SAP HANA scale-out](/backup-disaster-recovery/docs/concepts/backupdr-for-sap-hana-scaleout).\n\n- All the configured services---see SAP Note 1697613 and SAP Note 1649519---\n such as `nameserver` and `indexserver`. must be running. You can check\n this in the Overview of SAP HANA studio \\\u003e Operational State \\\u003e\n Confirm all services are started.\n\n- To allow the Backup and DR agent to perform host-side operations, use an SAP\n HANA `hdbuserstore` key instead of a username and password to communicate with\n HANA database using the SAP HANA secure userstore. See [Configure the HANA userstore key](/backup-disaster-recovery/docs/configuration/prepare-hana#configuring_the_hana_userstore_key).\n\n- Database `log_mode` must be set to **normal** under the HANA Studio\n configuration tab. See [Set up the log mode and log backup in HANA Studio](#set-up-hana-log-mode).\n\n- All SAP HANA servers that have HANA data to be protected by Backup and DR Service\n must have been onboarded to Backup and DR Service.\n\n- All SAP HANA servers that have data to be protected by Backup and DR Service must\n [have the Backup and DR agent installed](#install-agent).\n\n- If the underlying data volumes for SAP HANA are protected as SAP HANA database\n backups using LVM snapshot with CBT or file-based backup integrated with\n `backint`, and if you are also protecting file systems on the same host, in\n the file system app, you should set `/hana/log` \\& `/hana/data` in an exclude\n path. See [Linux file system](/backup-disaster-recovery/docs/configuration/add-linux-hosts).\n\n- HANA Archive log backup recommendation:\n\n - Make sure to set the HANA Archive log backup path as the `basepath_logbackup` and `basepath_catalogbackup` in global.ini.\n - Don't use HANA Archive log mount to store files other than HANA Archive log backup.\n - By default, archive purge runs with every database backup. To achieve best recovery RTO, keep the default setting.\n\n| **Note:** If production log retention is set, then purge runs based on the **Retention of production db logs in hour** setting under Application Details \\& Settings. Size the HANA archive log backup disk to store archives based on the production log retention setting.\n\nConfigure the HANA userstore key\n--------------------------------\n\n| **Note:** This procedure requires the hostname.\n\nUse the following instructions to configure the HANA userstore key:\n\n1. Create the database backup user from HANA Studio.\n\n2. Get the instance and SQL port numbers.\n\n3. Create the SAP HANA `hdbuserstore` key for system DB backup users.\n\n### Step 1: Create the database backup user from HANA Studio\n\nChoose a database username based on the company's standard. Make sure to create\nthis user account under `SYSTEMDB`.\n\n1. Create the user under `SYSTEMDB`\n\n - From SAP HANA Studio SYSTEMDB, go to **System** \\\u003e **Security**\n \\\u003e **Users** \\\u003e **New User**.\n\n - Assign a username and a password.\n\n - Set **Force password change on next logon** to **No**.\n\n - Click the **System privilege tab** and assign privileges by\n selecting the following:\n\n ### HANA 1.0\n\n - **Backup admin**\n - **Catalog read**\n - **Database admin**\n\n ### HANA 2.0 (SPS01-SPS04)\n\n - **Backup admin**\n - **Catalog read**\n - **Database admin**\n - **Database start**\n - **Database stop**\n\n ### HANA 2.0 (SPS05)\n\n - **Backup admin**\n - **Catalog read**\n - **Database backup operator**\n - **Database recovery operator**\n - **Database admin**\n - **Database start**\n - **Database stop**\n2. Deploy the newly created system user by clicking the **green arrow**.\n\n### Step 2: Get the instance and SQL port numbers\n\nYou need the HANA instance and SQL port numbers for system databases. \n\n### HANA 1.0\n\nThe following instructions describe how to get the instance and SQL port\nnumbers from a HANA 1.0 single container system:\n\n1. Go to **System**.\n\n2. Click the **Landscape** tab.\n\n3. Get the value of SQL port for `indexserver`.\n\n### HANA 2.0\n\nThe following instructions describe how to get the instance and SQL port\nnumbers from HANA 2.0:\n\n1. Go to **System**.\n\n2. Click the **Landscape** tab.\n\n3. Click the **Services** tab.\n\n4. Under the **Service** column, navigate to the `nameserver`.\n\n5. Get the value of SQL port. The instance number are the second and\n third digits of the SQL port number.\n\n### Step 3: Create the SAP HANA hdbuserstore key for system database backup users\n\nBackup and DR Service recommends this naming convention for the userstore key name:\nFor SYSTEMDB, set the key name to `Database backup username`.\nFor example: Database backup username (`Actbackup`)\nSet SYSTEMDB---key_name--- (`ACTBACKUP`)\n\n**Procedure for single node HANA system**\n\n1. Connect to the HANA database system using SSH and login to (sid)adm: `su - (sid)adm`\n\n2. Change directory: `cd exe`\n\n3. Create entries in hdbuserstore using command `hdbuserstore`:\n\n ./hdbuserstore SET (key_name) (SAP HANA database hostname):(port) (DB_user_name) (DB_user_password)\n\n In this example: \n\n ./hdbuserstore SET ACTBACKUP s4hana:30013 ACTBACKUP (DB_user_password)\n\n4. Check the keystore: `./hdbuserstore list`\n\n| **Note:** If the hostname is not included, you will get the error: `ERRORMSG: USERSTORE KEY - Does not have valid hostname configured!`\n\nSet up the log mode and log backup in HANA Studio\n-------------------------------------------------\n\nUse the HANA Studio set the HANA log mode and log backup location for\nBackup and DR to take backups of HANA DB transaction logs:\n\n1. In SAP HANA HDB studio, make sure log backup is set correctly under\n **DATABASE (SYSTEMDB FOR HANA 2.0)** \\\u003e **Backup** \\\u003e\n **Configuration** page:\n\n - Destination type is **File**.\n\n - Destination is set to a local file system mount path.\n\n - Backup interval is set to **required RPO**.\n\n - Automatic log backup is enabled.\n\n - Database log_mode must be set to **normal**.\n\n2. Check under Database configuration: DATABASE (SYSTEMDB FOR HANA 2.0) \\\u003e\n Configuration page. In the filter, type **basepath**.\n\n3. Verify that `basepath_logbackup` is set correctly:\n\n - Set the `basepath_catalogbackup` to the same as `basepath_logbackup`.\n\n - Open the `basepath_catalogbackup` edit page.\n\n - Set the **New value** to the same as `basepath_logbackup` and click **Save**.\n This ensures the backup of the catalog with log backup for point in\n time recovery.\n\n4. Run the re-config for the values to take effect.\n\nInstall the Backup and DR agent (connector) on SAP HANA Servers\n---------------------------------------------------------------\n\nThe Backup and DR agent, a small-footprint, lightweight service on the SAP HANA\nserver, is used to capture an application-consistent copy of SAP HANA\ndatabases. It uses changed block tracking to identify changes to database data\nfor Backup and DR's incremental forever capture strategy. All SAP HANA servers\nthat have data to be protected by Backup and DR must have the Backup and DR agent\ninstalled.\n\n1. Download the agent installer file as detailed in [Obtain the right Backup and DR agent for your host](/backup-disaster-recovery/docs/concepts/about-connector#right-connector)\n\n2. Log on to the Linux server as root.\n\n3. Install the agent as detailed in [Install the Backup and DR agent on a Linux host](/backup-disaster-recovery/docs/configuration/linux-agent)\n\nWhat's next\n-----------\n\n[Add an SAP HANA database host, and discover and protect its databases](/backup-disaster-recovery/docs/configuration/discover-sap-hana)\n\nBackup and DR Service documentation for SAP HANA scale-out\n----------------------------------------------------------\n\nThis page is one in a series of pages specific to protecting and recovering\nSAP HANA scale-out instances with Backup and DR Service.\nYou can find additional information in the following pages:\n\n- [Backup and DR for SAP HANA scale-out](/backup-disaster-recovery/docs/concepts/backupdr-for-sap-hana-scaleout)\n- [Prepare SAP HANA scale-out instances for backup](/backup-disaster-recovery/docs/configuration/prepare-sap-hana)\n- [Add an SAP HANA scale-out host, and discover and protect its databases](/backup-disaster-recovery/docs/configuration/discover-sap-hana-scaleout)\n- [Configure staging disk format and backup method for SAP HANA scale-out](/backup-disaster-recovery/docs/backup/backup-method-staging-disk-sap-hana-scaleout)\n- [Set application details and settings for SAP HANA scale-out instances](/backup-disaster-recovery/docs/backup/app-details-settings-sap-hana-scaleout)\n- [Back up HANA 1+n and HANA scale-out databases](/backup-disaster-recovery/docs/backup/back-up-sap-hana-scaleout)\n- [Restore and recover SAP HANA scale-out instances](/backup-disaster-recovery/docs/restore-data/restore-sap-hana-scaleout)\n- [Mount an SAP HANA scale-out backup as a standard mount](/backup-disaster-recovery/docs/access-data/mount-sap-hana)\n- [Mount an SAP HANA scale-out backup as a virtual database](/backup-disaster-recovery/docs/access-data/mount-sap-hana-virtualdb)\n- [Mount and migrate an SAP HANA scale-out backup for instant recovery to any target](/backup-disaster-recovery/docs/access-data/mount-and-migrate-sap-hana)"]]