Veritas NetBackup™ 命令参考指南
- 介绍
- 附录 A. NetBackup 命令
名称
nbseccmd — 运行 NetBackup 安全配置服务实用程序
大纲
-drpkgpassphrase
-getNBKeysize [-server master_server_name] [-json]
–getsecurityconfig -insecurecommunication | -autoaddhostmapping [-masterserver master_server_name]
-nbcaList [-state value] [-json]
-nbcaMigrate -initiateMigration | -i -keysize key_value -activateNewCA | -a -completeMigration | -c -decommissionCA | -d -fingerprint certificate_fingerprint -summary | -s -hostsPendingTrustPropagation | -pt -syncMigrationDB | -S -hostsPendingRenewal | -pr [-reason description_for_auditing] [-json] [-force] [-quiet]
–setsecurityconfig -insecurecommunication on|off | -autoaddhostmapping on|off [-masterserver master_server_name]
-setuptrustedmaster -add | -update | -remove -masterserver master_server_name -remotemasterserver remote_master_server [-domainname domain_name] [-username username] -fpfile filename
-setuptrustedmaster –add | -update | -remove -info answer_file
-help
在 UNIX 系统上,此命令的目录路径为 /usr/openv/netbackup/bin/admincmd/
在 Windows 系统上,此命令的目录路径为 install_path\NetBackup\bin\admincmd\
描述
使用 nbseccmd 命令在各主服务器之间建立信任关系。
如果启用了 NetBackup Access Control (NBAC),则必须具有 root 或管理员权限才能使用此命令。
注意:
如果源或目标主服务器版本为 NetBackup 8.0 或更早版本,请参考适用于 8.0 或更早版本的《NetBackup 命令指南》。在 NetBackup 8.1 中此命令已进行了多次更改。
选项
- -activatenewca | -a
使用此选项可激活可以开始颁发未来 NetBackup 证书的新 NetBackup CA。
- -autoaddhostmapping [on|off]
使用此选项管理将主机 ID 添加到主机名或主服务器自动检测到的 IP 地址的行为。
主机可能具有多个与之关联的主机名称或 IP 地址。为了使主机之间成功通信,所有相关主机名和 IP 地址都必须映射到相应的主机 ID。在通信期间,NetBackup 可能会检测到与某个主机 ID 相关的新主机名或 IP 地址。
使用 -getsecurityconfig 时,此选项不使用参数,并且会报告 -autoaddhostmapping 值的当前设置。
使用 -setsecurityconfig 选项后,此选项将启用或禁用自动主机映射。使用 on 参数自动将主机 ID 映射到主机名或检测到的 IP 地址。使用 off 参数禁用此操作。
- -completeMigration | -c
使用此选项可完成清除主服务器上的迁移状态的 NetBackup CA 迁移过程。
- decommissionCA | -d
使用此选项可停用具有给定指纹的 NetBackup CA。
- -domainname domain_name
指定在 -username 中指定的用户所属的域。系统会提示您输入密码以验证远程主服务器主机的凭据。
对于使用 NetBackup 证书的目标主服务器,需要使用 -domainname 选项。
- -drpkgpassphrase
-drpkgpassphrase 选项用于指定用来加密灾难恢复软件包的密码。如果密码已存在,则会被覆盖。
注意:
必须设置密码才能成功备份目录库。无法设置密码会导致目录备份失败。
灾难恢复软件包用于存储 NetBackup 主服务器,该软件包会在目录库备份期间创建。
这些软件包将使用此处指定的密码进行加密。发生灾难后,在主服务器上重新安装 NetBackup 时,必须提供此密码。
使用此命令前,必须运行 bpnbat 命令登录:
bpnbat -login -loginType WEB
设置密码时,请注意:
密码必须至少包含 8 个字符,最多包含 1024 个字符。
新密码必须不同于现有密码。
您必须是具有管理员或 root 权限的已获授权的用户或者必须是增强审核用户才能运行 nbseccmd -drpkgpassphrase 命令。
密码仅支持以下列出的字符:
空格
大写和小写字母字符(A 到 Z、a 到 z)
数字(0 到 9)
显示的特殊字符:~ ! @ # $ % ^ & * ( ) _ + - = ` { } [ ] | : ; ' " , . / ? < >
小心:
如果输入不受支持的字符,可能会在灾难恢复软件包还原期间遇到问题。密码可能未验证,您可能无法还原灾难恢复软件包。
- -fingerprint certificate_fingerprint
指定需要停用的 NetBackup CA 的指纹。此选项与 -decommissionCA 结合使用。
- -fpfile filename
此选项可接受验证远程主服务器的根证书所需的根证书指纹信息。您可以将指纹详细信息存储在文本文件中。
- -force
取消确认提示。-force 选项用于跳过对等待信任传播或证书续订的主机的检查。-force 选项用于激活新的 CA 并完成迁移。此选项与 -completeMigration 和 -activatenewCA 结合使用。
- -getsecurityconfig -autoaddhostmapping | -insecurecommunication
使用此选项获取 NetBackup 的安全配置信息。使用 -autoaddhostmapping 选项时,您将获取 -autoaddhostmapping 选项的值。使用 -insecurecommunication 选项时,您将获取 -insecurecommunication 选项的值。
- -hostsPendingRenewal | -pr
使用此选项可检索需要续订证书的主机列表。
- -hostspendingtrustpropagation | -pt
使用此选项可检索在其信任存储区中没有所需 CA 证书的主机列表。
- -info answerfile
-info 选项可接受设置可信主服务器所需的信息。此信息会存储在应答文件(文本文件)中。它包含以下条目:
masterserver: remotemasterserver: trusttype: domainname: username: password: token: fpfile:
在应答文件中,password 是可选项。如果您未提供密码,则在运行此命令时,系统将提示您输入密码。
注意:
Trusttype 值仅对 8.0 及更早版本的主服务器有效。trusttype 的可能值包括 mutualtrust、remoteonly 和 localonly。localonly 的 trusttype 不需要域名或用户凭据。
应答文件中的条目必须与此示例所示的格式一致。
示例文件:masterserver:testmaster1 remotemasterserver:testmaster2 trusttype:mutualtrust domainname:testdomain username:Administrator password:abc123
- -initiateMigration | -i
使用此选项可启动 NetBackup 证书颁发机构 (CA) 迁移。它为 NetBackup 设置具有指定证书密钥大小的新 CA。新 CA 以待机模式运行,直到 CA 被激活或迁移状态转为 ACTIVATED。
此操作不会更改根 CA。
在启动 CA 迁移之前,请确认未将具有 NetBackup 版本 8.1.2.1 或更低版本的介质服务器配置为云存储服务器。这些介质服务器上的备份将会失败。
- -insecurecommunication [on | off]
使用此选项以在 NetBackup 环境内管理不安全通信。on 参数可启用与 NetBackup 环境中的所有 NetBackup 主机的不安全通信。使用 off 参数可禁用不安全通信。
Veritas 在 NetBackup 8.1 中实现了 8.0 和更低版本中没有的新安全功能。NetBackup 与 8.0 和更低版本主机之间的通信不安全。为了提高安全性,请将所有主机升级到最新版本的 NetBackup,然后将 on 参数与此选项结合使用。此操作可确保仅在 NetBackup 主机之间进行安全通信。
- -json
在单独一行上以 JSON 格式输出数据。
- -keysize key_value
将此选项与 -initiateMigration 选项结合使用可为要设置的新 NetBackup CA 指定证书密钥大小。密钥大小必须为以下所示大小之一:2048、4096、8192 或 16384 位。
- -masterserver master_server_name
指定用户登录到的主服务器的名称。自动映像复制会为当前主服务器或源主服务器使用此名称。
- -nbcamigrate
将现有 NetBackup CA 迁移到新 CA。
- -nbcaList
使用此选项可列出 NetBackup 域中的 NetBackup CA。
- -quiet
取消提示消息以继续操作。可以将此选项与 -initiateMigration 选项一起使用。
- -reason description_for_auditing
指定存储在此操作审核记录中的原因。
- -remotemasterserver remote_master_server
指定要建立信任关系的远程主服务器的名称。自动映像复制会为目标主服务器使用此名称。
- -remoteonly | -localonly | -mutualtrust
指定建立信任关系必须采用的方式。是本地主服务器(源)信任远程主服务器(目标)还是相反。如果这两个选项均未指定,则会建立双向信任关系 (-mutualtrust)。
- -setsecurityconfig -autoaddhostmapping | -insecurecommunication
使用此选项设置 NetBackup 的安全配置信息。使用 -autoaddhostmapping 选项时,您将设置添加主机名和 IP 地址的行为。使用 -insecurecommunication 选项时,您将设置安全通信的行为。
- -setuptrustedmaster -add | -update | -remove
添加、更新或删除主服务器之间的域间信任。要更新信任关系,请在源服务器和目标服务器上运行 -update 选项。这两台服务器都必须运行版本 8.1 或更高版本。如果要在建立信任关系后将源或目标主服务器升级至 8.1 版或更高版本,则必须使用 -update 选项。要删除可信主服务器,不需要域、用户名和密码。
您可以将使用外部证书的信任关系更新为使用 NetBackup 证书的信任关系,反之亦然。
您必须先运行 bpnbat 命令以删除可信主服务器,然后才能使用 -setuptrustedmaster 选项。在本地登录要删除的主服务器并使用 bpnbat 命令,如下所示:bpnbat -login -loginType WEB
要删除使用外部证书添加的信任关系,不需要运行 bpnbat -login 命令。
- -state value
将此选项与 -nbcaList 选项结合使用可检索特定状态(例如:ACTIVE、ABANDONED 和 DECOMMISSIONED)的 NetBackup CA。使用逗号分隔的状态可过滤出具有多种状态的结果。
- -summary
检索 NetBackup CA 迁移信息。它显示当前 NetBackup CA 迁移状态和当前负责证书颁发的 NetBackup CA 的指纹。
- -syncMigrationDB | -S
使用当前 NetBackup CA 证书详细信息更新 CA 迁移数据库。
- -username username
指定远程主服务器主机的登录用户名。此选项与 -domainname 选项结合使用。系统会提示您输入密码以验证远程主服务器主机的凭据。如果仅指定域名,系统会提示您输入远程主服务器的授权令牌。
对于使用 NetBackup 证书的目标主服务器,需要使用 -username 选项。
示例
示例 1 - 使用用户凭据设置可信主服务器。
nbseccmd -setuptrustedmaster -add -masterserver testmaster1 -remotemasterserver testmaster2 -domainname testdomain -username Administrator Password:****** The SHA1 fingerprint of root certificate is C7:87:7F:9D:13:B4:67:F6:D9:65:F4:95:EC:DC:D4:50:8C:20:18:BF. Are you sure you want to continue using this certificate ? (y/n): y The validation of root certificate fingerprint is successful. CA certificate stored successfully from server testmaster2. testdomain.com. Host certificate received successfully from server testmaster2. testdomain.com. Trusted master operation successful.
示例 2 - 使用身份验证令牌设置可信主服务器。
nbseccmd -setuptrustedmaster -add -masterserver testmaster1 -remotemasterserver testmaster2 -domainname testdomain Authorization Token:***** The SHA1 fingerprint of root certificate is C7:87:7F:9D:13:B4:67:F6:D9:65:F4:95:EC:DC:D4:50:8C:20:18:BF. Are you sure you want to continue using this certificate ? (y/n): y The validation of root certificate fingerprint is successful. CA certificate stored successfully from server testmaster2. testdomain.com. Host certificate received successfully from server testmaster2. testdomain.com. Trusted master operation successful.
示例 3 - 使用 -fpfile 设置可信主服务器。
nbseccmd -setuptrustedmaster -add -masterserver testmaster1 -remotemasterserver testmaster2 -domainname testdomain -username Administrator -fpfile C:\fp_file Password:****** The validation of root certificate fingerprint is successful. CA certificate stored successfully from server testmaster2. testdomain.com. Host certificate received successfully from server testmaster2. testdomain.com. Trusted master operation successful.
示例 4 - 使用应答文件设置可信主服务器。
nbseccmd -setuptrustedmaster -add -info C:\nbseccmd_answerfile.txt The validation of root certificate fingerprint is successful. CA certificate stored successfully from server testmaster2. testdomain.com. Host certificate received successfully from server testmaster2. testdomain.com. Trusted master operation successful.
示例 5 - 将源和主服务器升级至 8.1 版或更高版本后更新信任关系。
-setuptrustedmaster -update -masterserver testmaster1 -remotemasterserver testmaster2 Authorization Token: Authenticity of root certificate cannot be established. The SHA1 fingerprint of root certificate is finger_print_details Are you sure you want to continue using this certificate ? (y/n): y The validation of root certificate fingerprint is successful. CA certificate stored successfully from server testmaster2. Host certificate received successfully from server testmaster2. Trusted master operation successful
示例 6 - 删除可信主服务器。
-setuptrustedmaster -remove -masterserver testmaster2 -remotemasterserver testmaster1 Certificate revoke request processed successfully. Trusted master operation successful