你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
本文介绍如何运行可用于 Azure NetApp 文件的 Azure 应用程序一致性快照工具 (AzAcSnap) 的 azacsnap -c configure
命令。
用于配置文件的命令
可以使用 azacsnap -c configure
命令创建或编辑 AzAcSnap 的配置文件。 命令的选项如下:
--configuration new
,用于创建新配置文件--configuration edit
,用于编辑现有配置文件[--configfile <config filename>]
(可选参数),可用于自定义配置文件名称
默认情况下,配置文件的名称为 azacsnap.json。 可以将自定义文件名与 --configfile=
参数一起使用(例如 --configfile=<customname>.json
)。
以下示例为 Azure 大型实例配置创建配置文件:
azacsnap -c configure --configuration new
将 SAP HANA 与 Azure NetApp 文件存储配合使用的示例
+----------------------------------------------------------+
+ For details on configuring AzAcSnap please visit +
+ https://aka.ms/azacsnap-configure +
+----------------------------------------------------------+
Building new config file
Q. Add comment #1 to config file (blank entry to exit adding comments)?
A. This is a new config file for AzAcSnap 11 with SAP HANA and Azure NetApp Files
Q. Add comment #2 to config file (blank entry to exit adding comments)?
A.
Q. Enter the database type to add, 'hana', 'oracle', 'db2', 'mssql',
'exit' (to abort without saving), 'save' (to save and exit)?
A. hana
Checking for SAP HANA external program dependency 'hdbsql'
External dependency 'hdbsql' found.
=== Add SAP HANA details ===
Q. What is the SAP HANA SID (e.g. H80)?
A. H81
Q. What is the SAP HANA Instance Number (e.g. 00)?
A. 00
Q. What is the SAP HANA HDB User Store Key (e.g. `hdbuserstore List`)?
A. AZACSNAP
Q. What is the SAP HANA Server's Address (hostname or IP address)?
A. saphana1
Q. Do you need AzAcSnap to automatically disable/enable backint during snapshot?
('y' for yes, 'n' for no) [default='n']
A.
=== Add Hana Storage section ===
Q. Do you want to add Hana database Storage?
('y' for yes, 'n' for no)
A. y
--- DATA Volumes are specially prepared before they are snapshot ---
Q. Do you want to add Hana storage + DataVolume #1?
('y' for yes, 'n' for no)
A. y
Q. Do you want to add Hana storage + DataVolume #1 + Azure NetApp Files entry #1?
('y' for yes, 'n' for no)
A. y
Q. What is the Hana storage + DataVolume #1 + Azure NetApp Files entry #1 + ResourceId?
(e.g. /subscriptions/.../resourceGroups/.../providers/Microsoft.NetApp/netAppAccounts/.../capacityPools/Premium/volumes/...)?
A. /subscriptions/99999999-9zz9-9z99-z9z9-z999z999zzz9/resourceGroups/saphanasystems/providers/Microsoft.NetApp/netAppAccounts/saphanaanf/capacityPools/Premium/volumes/HANADATA01
Q. What is the Hana storage + DataVolume #1 + Azure NetApp Files entry #1 + Service Principal AuthenticationFile
(e.g. auth-file.json or <blank> if using Azure Managed ID)?
A.
Hana storage + DataVolume #1 + Azure NetApp Files entry #1 (added)
Q. Do you want to add Hana storage + DataVolume #1 + Azure NetApp Files entry #2?
('y' for yes, 'n' for no)
A. n
Q. Do you want to add Hana storage + DataVolume #1 + Azure Large Instance entry #1?
('y' for yes, 'n' for no)
A. n
Q. Do you want to add Hana storage + DataVolume #1 + Azure Managed Disk entry #1?
('y' for yes, 'n' for no)
A. n
Q. Do you want to add Hana storage + DataVolume #2?
('y' for yes, 'n' for no)
A. n
--- OTHER Volumes are snapshot immediately (no special preparation) ---
Q. Do you want to add Hana storage + OtherVolume #1?
('y' for yes, 'n' for no)
A. n
Q. Enter the database type to add, 'hana', 'oracle', 'db2', 'mssql',
'exit' (to abort without saving), 'save' (to save and exit)?
A. save
Editing configuration complete, writing output to 'azacsnap.json'.
将 SAP HANA 与 Azure 大型实例存储配合使用的示例
+----------------------------------------------------------+
+ For details on configuring AzAcSnap please visit +
+ https://aka.ms/azacsnap-configure +
+----------------------------------------------------------+
Building new config file
Q. Add comment #1 to config file (blank entry to exit adding comments)?
A. This is a new config file for AzAcSnap 11
Q. Add comment #2 to config file (blank entry to exit adding comments)?
A.
Q. Enter the database type to add, 'hana', 'oracle', 'db2', 'mssql',
'exit' (to abort without saving), 'save' (to save and exit)?
A. hana
Checking for SAP HANA external program dependency 'hdbsql'
External dependency 'hdbsql' found.
=== Add SAP HANA details ===
Q. What is the SAP HANA SID (e.g. H80)?
A. H80
Q. What is the SAP HANA Instance Number (e.g. 00)?
A. 00
Q. What is the SAP HANA HDB User Store Key (e.g. `hdbuserstore List`)?
A. AZACSNAP
Q. What is the SAP HANA Server's Address (hostname or IP address)?
A. testing01
Q. Do you need AzAcSnap to automatically disable/enable backint during snapshot?
('y' for yes, 'n' for no) [default='n']
A.
=== Add Hana Storage section ===
Q. Do you want to add Hana database Storage?
('y' for yes, 'n' for no)
A. y
--- DATA Volumes are specially prepared before they are snapshot ---
Q. Do you want to add Hana storage + DataVolume #1?
('y' for yes, 'n' for no)
A. y
Q. Do you want to add Hana storage + DataVolume #1 + Azure NetApp Files entry #1?
('y' for yes, 'n' for no)
A. n
Q. Do you want to add Hana storage + DataVolume #1 + Azure Large Instance entry #1?
('y' for yes, 'n' for no)
A. y
Q. What is the Hana storage + DataVolume #1 + Azure Large Instance entry #1 + Storage Certificate File
(e.g. svmadm_cert.p12)?
A. svm01.p12
Q. What is the Hana storage + DataVolume #1 + Azure Large Instance entry #1 + Storage ResourceId
(e.g. <hostname>/api/storage/volumes/<UUID>)?
A. svm01/api/storage/volumes/0892dcdc-f760-11ee-a301-000c2989d71e
Q. What is the Hana storage + DataVolume #1 + Azure Large Instance entry #1 + Storage Resource Name
(e.g. volume01)?
A. hana_data_01
Q. What is the Hana storage + DataVolume #1 + Azure Large Instance entry #1 + Storage Resource Type
(e.g. volumes or consistency-groups)?
A. volumes
Hana storage + DataVolume #1 + Azure Large Instance entry #1 (added)
Q. Do you want to add Hana storage + DataVolume #1 + Azure Large Instance entry #2?
('y' for yes, 'n' for no)
A. n
Q. Do you want to add Hana storage + DataVolume #1 + Azure Managed Disk entry #1?
('y' for yes, 'n' for no)
A. n
Q. Do you want to add Hana storage + DataVolume #2?
('y' for yes, 'n' for no)
A. n
--- OTHER Volumes are snapshot immediately (no special preparation) ---
Q. Do you want to add Hana storage + OtherVolume #1?
('y' for yes, 'n' for no)
A. n
Q. Enter the database type to add, 'hana', 'oracle', 'db2', 'mssql',
'exit' (to abort without saving), 'save' (to save and exit)?
A. save
Editing configuration complete, writing output to 'azacsnap.json'.
配置文件所需的值
以下部分提供有关配置文件的数据库部分所需值的详细指导。
向配置添加“SAP HANA 数据库”时,需要以下值:
HANA SID
(JSON 键:sid
:SAP HANA 系统 ID(SID)。HANA Instance Number
(JSON 键:instanceNumber
:SAP HANA 实例编号)。HANA HDB User Store Key
(JSON 键:hdbUserStoreName
:SAP HANA KEY,如hdbuserstore List
命令所示,该命令使用 KEY 将 USER 链接到 ENV(主机名和端口)的数据库备份的权限。 “启用与数据库通信”部分提供了更多详细信息和示例。HANA Server's Address
(JSON 键:serverAddress
:SAP HANA 服务器的主机名或 IP 地址)。Do you need AzAcSnap to automatically disable/enable backint during snapshot
:默认为n
(否)。 可以将它设置为y
(是)以允许 AzAcSnap 禁用或重新启用 Backint 接口。 本文中的 Backint 共存 部分更详细地介绍了此选项。应
HANA Server's Address
为下列项之一:- 单节点 :节点的主机名和 IP 地址。
- 具有 STONITH 的 HSR :节点的主机名和 IP 地址。
- 横向扩展(N+N、N+M) :主节点的当前主机名和 IP 地址。
- 没有 STONITH 的 HSR :节点的主机名和 IP 地址。
- 单个节点上的多 SID :承载这些 SID 的节点的主机名和 IP 地址。
Backint 共存
Azure 备份服务为 SAP HANA 提供备用备份工具。 可以将数据库和日志备份流式传输到 Azure 备份。
某些客户希望将基于 Backint 的流式备份与基于快照的常规备份组合在一起。 但是,基于 Backint 的备份会阻止其他备份方法,例如使用基于文件的备份或基于存储快照的备份(例如 AzAcSnap)。 有关详细信息,请参阅 使用 Azure 备份在数据库上运行 SAP HANA 本机客户端备份。
Azure 备份文档描述的过程已通过 AzAcSnap 实现,以便自动执行以下步骤:
- 强制将日志备份刷新到 Backint。
- 等待正在运行的备份完成。
- 禁用基于 Backint 的备份。
- 将 SAP HANA 置于一致状态以进行备份。
- 进行基于存储快照的备份。
- 发布 SAP HANA。
- 重新启用基于 Backint 的备份。
默认情况下禁用此选项。 可以通过运行 azacsnap -c configure –configuration edit
并对问题 y
回答 Do you need AzAcSnap to automatically disable/enable backint during snapshot? (y/n) [n]
(是)来启用它。
按照说明编辑配置,将 JSON 配置文件(例如 azacsnap.jsonautoDisableEnableBackint
)中的 true
值设置为 。 还可以直接编辑该配置文件来更改此值。
将 Azure 大型实例存储添加到数据库部分时,需要以下值:
-
Storage Certificate File
(JSON 密钥::certificateFile
用于向存储后端进行身份验证的证书文件。 -
Storage ResourceId
(JSON 键:resourceUri
): 资源的完整 URI,以主机名开头(例如)<hostname>/api/storage/volumes/<UUID>
-
Storage Resource Name
(JSON 键:resourceName
):资源“友好”名称(例如)vol01
-
Storage Resource Type
(JSON 键:resourceType
:资源类型、“volumes”或“consistency-groups”。
示例配置文件
以下输出只是一个示例配置文件,此示例是 SAP HANA 与 Azure NetApp 文件存储示例的结果。
cat azacsnap.json
{
"version": "11",
"logPath": "./logs",
"securityPath": "./security",
"comments": [
"This is a new config file for AzAcSnap 11 with SAP HANA and Azure NetApp Files"
],
"database": [
{
"hana": {
"serverAddress": "saphana1",
"sid": "H81",
"instanceNumber": "00",
"hdbUserStoreName": "AZACSNAP",
"savePointAbortWaitSeconds": 600,
"autoDisableEnableBackint": false,
"storage": [
{
"dataVolumes": [
{
"anfStorageVolumes": [
{
"resourceId": "/subscriptions/99999999-9zz9-9z99-z9z9-z999z999zzz9/resourceGroups/saphanasystems/providers/Microsoft.NetApp/netAppAccounts/saphanaanf/capacityPools/Premium/volumes/HANADATA01",
"authFile": "",
"subscription": "99999999-9zz9-9z99-z9z9-z999z999zzz9",
"resourceGroupName": "saphanasystems",
"accountName": "saphanaanf",
"poolName": "Premium",
"volume": "HANADATA01"
}
]
}
]
}
]
}
}
]
}
注意
对于要在灾难恢复 (DR) 站点上运行备份的 DR 方案,在 DR 站点上的 DR 配置文件中配置的 HANA 服务器名称(例如 DR.json
)应与生产服务器名称相同。