8
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AWS Backint Agent をインストールしてみた

8
Last updated at Posted at 2025-12-05

BeeX Advent Calendar 2025 6日目 の記事です

はじめに

実務で一度もインストールしたことがなかったのですが、今担当しているお客様で導入する機会をいただきました!
お客様の環境に設定を行う前に検証してみると、いろいろと気づきがありましたので、本記事で導入の流れやポイントをまとめてみたいと思います。

確認が必要なドキュメント

以下AWSのドキュメントをご確認ください。

インストールの種類

AWS Backint Agentをインストールする手法は3パターンあります。

1. SSM ドキュメント
AWS Systems Manager Document を使ったインストール(SSM ドキュメントによる自動実行)になります。「AWSSAP-InstallBackint」のドキュメントを選択して、パラメータを指定して実行する手法です。
2. インストーラーの手動実行(インタラクティブモード)
AWSが提供している「install-aws-backint-agent」をダウンロードして、環境に配置し実行します。 対話型でパラメータを入力してインストールする手法です。
3. インストーラーの自動実行(サイレントモード)
「install-aws-backint-agent」を実行する際に、事前に用意しているレスポンスファイル(.rsp)を引数で指定して自動でインストールする手法です。

今回は、「2. インストーラーの手動実行(インタラクティブモード)」で検証しましたので、そちらの手順でのブログになります。

確認が必要な要件

以下各項目の要件を満たしていることを確認します。
複数列挙しますが、今回お客様側へのインストールでの要件は以下でした。
・SSMAgentでのインストールはしない
・S3の暗号化はデフォルト値の「SSE-S3」で設定

SSM関連の項目や暗号化のところは追加での設定は不要と考え、チェックは入っておりません。
※ 要件として検討が必要な場合は、上記も考慮が必要です。

システム要件

  • 対応 OS:SUSE Linux Enterprise Server/SUSE Linux Enterprise Server for SAP/Red Hat Enterprise Linux for SAPであること
  • 対応 SAP HANA バージョン:SAP HANA 1.0 SP12(単一ノード・マルチノード)/SAP HANA 2.0 以降(単一ノード・マルチノード)であること
  • インスタンスが AWS Systems Manager (SSM) の管理対象インスタンス(Managed Instance)として登録されており、SSMAgentが実行中であること
  • SSM Agent のバージョンが 2.3.274.0 以上であること

IAM/アクセス許可などの要件

  • EC2インスタンスに、S3バケットへのアクセス(Put/Get/Listなど...)できるIAMポリシーが付与されているIAMロールを付与していること
  • KMS(暗号化キー)などのアクセス設定をしていること

S3 バケット・ストレージなどの要件

  • バックアップ取得先として指定するS3バケットは、2019年5月以降に作成されたものであること
  • S3バケットの「このバケットのブロックパブリックアクセス設定」の設定が「パブリックアクセスをすべて ブロック」になっていること
  • S3 のストレージクラスが「S3 Standard/Standard-IA/One Zone-IA/Intelligent-Tiering」であること

事前作業

作業前に、インストーラーの取得やファイルのバックアップをします。
インストーラーは2025/12時点の最新のバージョンを導入しています。

① インストーラーの配置
インストーラーのDL
インストーラーの配置先は事前に作成しておくこと

(rootユーザで実行)
aws s3 cp s3://awssap-backint-agent/binary/latest/install-aws-backint-agent <配置ディレクトリ> --region us-east-1

インストーラーのアクセス権の変更
chmod 775 install-aws-backint-agent
② global.ini ファイルの退避 インストーラーを実行した際、システム側のglobal.iniファイルにBackint用の設定が追加されるため、作業前にファイルのバックアップをします
(rootユーザで実行)
global.iniファイルのバックアップ
cp -p /usr/sap/<DBSID>/SYS/global/hdb/custom/config/global.ini <バックアップ取得先>

インストール作業

SAPシステムは以下状態で実施しました。
AP側:起動状態(停止していても問題なし)
DB側:起動状態

① 既存バックアッププロセスの無効化
インストール前にHANADBのバックアップが取得中でないことを確認します
取得する設定なっていた場合は停止しておく必要があります
② インストーラーの実行
(rootユーザで実行)
cd <インストーラ配置先のディレクトリ>

 Pythonのバージョンやインストール有無の確認を行う
python --version || echo "python not found"
python3 --version || echo "python3 not found"
-> Python <バージョン情報>の表示がされた方でインストールコマンドを実行する

 Pythonの場合は以下コマンドでインストール処理を実行する
sudo python install-aws-backint-agent

 Python3の場合は以下コマンドでインストール処理を実行する
sudo python3 install-aws-backint-agent
③ パラメータ入力 フォルダは指定しないため、未入力でENTERキーを押下して、暗号化のところも未入力でENTERキーを押下する

「Amazon S3 SSE KMS ARN」を指定した場合は、「Are you sure that you do not want to encrypt your backups with keys stored in KMS ?」の項目は聞かれません。次の項目の「SAP HANA system ID」の確認に進みます。

  AWS backint agent installer version 2.0.5.949
  ******************************************
 
  Welcome to AWS backint agent installer. Please proceed with the installation.
  The default values are already populated in []. Please enter and/or validate the values
  and continue with installation.
 
     Installation directory [/hana/shared/]................. :  

     12-digit account ID of the Amazon S3 bucket owner :  <AWSアカウントのID>

     Amazon S3 bucket region................. :  <リージョン名>

     Amazon S3 bucket name................... :  <S3バケット名>

     Folder in the S3 bucket [optional]...... :  

     Amazon S3 SSE KMS ARN [optional]........ :  

     Are you sure that you do not want to encrypt your backups with keys stored in KMS ? [y/n]   :  y

     SAP HANA system ID...................... :  <DBSID>

     HANA opt dir [ /usr/sap/<DBSID>/SYS/global/hdb/opt ]........................ :  

     Modify global.ini file or generate SQL script or do nothing [modify/sql/[none]] :  modify

     HANA SYSTEM db global.ini file [/usr/sap/<DBSID>/SYS/global/hdb/custom/config/global.ini] :  

     Verify Signature of the agent binary tar file ? [y/n] :  y

     Amazon S3/https/local location of Signature file of agent binary tar file [https://awssap-backint-agent.s3.amazonaws.com/binary/2.0.5.949/aws-backint-agent.sig] :  

     Save responses for future usage ? [y/n]. :  n
④ Summry 設定値に問題がないことを確認し、「y」を入力しENTERキーを押下する
     summary of parameters
     **********************

     binary_name..................................: aws-backint-agent
     signature_file_name..........................: aws-backint-agent.sig
     input_signature_filepath.....................: https://awssap-backint-agent.s3.amazonaws.com/binary/2.0.5.949/aws-backint-agent.sig
     verify_signature.............................: y
     installation_directory.......................: /hana/shared/
     backint_agent_home_directory.................: /hana/shared/aws-backint-agent
     absolute_path_backint_agent..................: /hana/shared/aws-backint-agent/aws-backint-agent
     instance_partition...........................: aws
     instance_region..............................: <リージョン名>
     s3_bucket_owner_account_id...................: <AWSアカウントのID>
     s3_bucket_name...............................: <S3バケット名>
     s3_bucket_folder.............................: None
     s3_bucket_region.............................: <リージョン名>
     s3_sse_kms_arn...............................: None
     hana_sid.....................................: <DBSID>
     hana_sidadm_user.............................: <DBSID>adm
     hana_opt_dir.................................: /usr/sap/<DBSID>/SYS/global/hdb/opt
     hana_systemdb_global_ini_file................: /usr/sap/<DBSID>/SYS/global/hdb/custom/config/global.ini
     create_response_file.........................: n
     install_awscli...............................: n
     modify_global_ini............................: modify
     awscli_exists................................: True
     confirm_install..............................: n
     awscli_version_match.........................: True
     download_using_http..........................: None
     download_using_s3............................: None
     perform_s3_validations.......................: True
     download_sign_using_s3.......................: None
     download_sign_file...........................: None
     backint_backup...............................: None
     agent_tar_file...............................: aws-backint-agent.tar.gz
     3p_license_file_name.........................: THIRD_PARTY_LICENSES.txt
     agent_license_file_name......................: LICENSE
     agent_artifacts_s3_region....................: us-east-1

     parameter modify_global_ini set to modify. Installer will modify the following parameters

     [communication][tcp_backlog]....................: 2048
     [backup][catalog_backup_parameter_file].........: /usr/sap/<DBSID>/SYS/global/hdb/opt/hdbconfig/aws-backint-agent-config.yaml
     [backup][data_backup_parameter_file]............: /usr/sap/<DBSID>/SYS/global/hdb/opt/hdbconfig/aws-backint-agent-config.yaml
     [backup][log_backup_parameter_file].............: /usr/sap/<DBSID>/SYS/global/hdb/opt/hdbconfig/aws-backint-agent-config.yaml
     [backup][catalog_backup_using_backint]..........: true
     [backup][log_backup_using_backint]..............: true
     [backup][parallel_data_backup_backint_channels].: 8
     [backup][data_backup_buffer_size]...............: 4096
     [backup][max_recovery_backint_channels].........: 1
     [persistence][enable_auto_log_backup]...........: yes

     WARNING: Please ensure that there are no backups currently running and that log mode has been set to disabled before proceeding with the install.
     See AWS Backint documentation for details.

     Confirm that you have disabled existing SAP HANA data and log backups and ready to proceed with the installation? [y/n]   :  y
⑤ 結果確認 インストール結果を確認し、正常にインストールできたことを確認する
     summary of installation
     **********************

     checking and creating /hana/shared/aws-backint-agent directory... :  OK
     checking s3 bucket policies and acl status....................... :  OK
     downloading backint agent from Amazon S3......................... :  OK
     retrieving signature file of backint agent tar file.............. :  OK
     verifying the signature of the AWS Backint Agent tar file ....... :  OK
     creating aws backint agent launch script......................... :  OK
     creating aws backint agent configuration file.................... :  OK
     creating aws backint agent log file.............................. :  OK
     creating symbolic links in hana opt directory.................... :  OK
     update global.ini with relevent parameters....................... :  OK
 
     Installation completed
 
     check the install log <インストーラー配置ディレクトリ>/aws-backint-agent-install-<yyyymmddhhmmss>.log

cat <インストーラー配置ディレクトリ>/aws-backint-agent-install-<yyyymmddhhmmss>.log
-> [INFO]のエントリーのみで[ERROR]がないことを確認する

インストール後の確認

① シンボリックリンク/所有者/グループの確認
(rootユーザで実行)
 hdbbackintのシンボリックリンクの確認
ls -l /usr/sap/HDV/SYS/global/hdb/opt/hdbbackint

以下設定になっていること
リンク/hana/shared/aws-backint-agent/aws-backint-agent-launcher.sh
所有者<DBSID>adm
グループsapsys

 aws-backint-agent-config.yamlのシンボリックリンクの確認
ls -l /usr/sap/HDV/SYS/global/hdb/opt/hdbconfig/aws-backint-agent-config.yaml

以下設定になっていること
リンク/hana/shared/aws-backint-agent/aws-backint-agent-config.yaml
所有者<DBSID>adm
グループsapsys
② バージョン情報の確認
(rootユーザで実行)
 /hana/shared/aws-backint-agent/aws-backint-agent -v || true

 以下表示されていること
 INFO[0000] Starting execution.
 backint 1.50 "AWS Backint Agent 2.0.5.949"
③ global.iniのパラメータ確認
(rootユーザで実行)
 cat /usr/sap/<DBSID>/SYS/global/hdb/custom/config/global.ini

以下設定が反映されていること
tcp_backlog = 2048
catalog_backup_parameter_file = /usr/sap/<DBSID>/SYS/global/hdb/opt/hdbconfig/aws-backint-agent-config.yaml
data_backup_parameter_file = /usr/sap/<DBSID>/SYS/global/hdb/opt/hdbconfig/aws-backint-agent-config.yaml
log_backup_parameter_file = /usr/sap/<DBSID>/SYS/global/hdb/opt/hdbconfig/aws-backint-agent-config.yaml
catalog_backup_using_backint = true
log_backup_using_backint = true
parallel_data_backup_backint_channels = 8
data_backup_buffer_size = 4096
max_recovery_backint_channels = 1
enable_auto_log_backup = yes
④ Backupの取得確認

細かな手順は省略します  

HANA Stuidoを使用しSYSTEMDBへSYSTEMユーザでログインして確認をする
インストールした際に指定したS3バケットにDBバックアップが出力されていることを確認する

バックアップファイルは以下に格納されます
システムDB側のバックアップ
<DBSID>/usr/sap/<DBSID>/SYS/hdb/backint/SYSTEMDB/

テナントDB側のバックアップ
<DBSID>/usr/sap/<DBSID>/SYS/hdb/backint/DB_<DBSID>/

まとめ

AWSさんのドキュメントに記載されていないようなことも記載したつもりです。
もし、AWS Backint Agentの手動インストールで困った方がいてこのブログが参考になれば幸いです!

8
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?