Veritas NetBackup™ Commands Reference Guide
- Introduction
- Appendix A. NetBackup Commands
Name
nbhostmgmt — used to manage host ID to host name mappings
SYNOPSIS
-hostid hostid | -host host -mappingname mappingname [-isshared] [-reason reason] [-server master_server]
-hostid hostid | -host host -mappingname mappingname [-reason reason] [-server master_server]
[-short | -json | -json_compact] [-hostid hostid | -host host | -approved | -pending | -conflict] [-server master_server]
-hostid hostid | -host host -comment comment [-server master_server]
-hostid hostid | -host host [-server master_server]
On UNIX systems, the directory path to this command is /usr/openv/netbackup/bin/admincmd/
On Windows systems, the directory path to this command is install_path\NetBackup\bin\admincmd\
DESCRIPTION
The nbhostmgmt command is used to manage the host ID to host names or IP addresses mappings. You can identify a host with alternate names. Use this command to map these alternate names to the respective host IDs. Use the command to add, delete, and list the mappings. Only the root user can run this command.
Before you run the nbhostmgmt command, you must run the bpnbat - login - loginType WEB command. The bpnbat command authenticates your web services logon.
OPTIONS
- -add | -a
Use this option to add and approve the host ID to host name or IP address mapping for the specified host.
Note:
Use -add without the -isshared option to add the first share. Add all additional shares with the -isshared option.
- -addcomment | -ac
Use this option to add a comment for the primary host. You can view the comment using the nbhostmgmt -list option. The added comment is only associated with the primary host and not with the alternate mapped host name. You cannot edit comments. You can only overwrite or delete the existing comment.
- -approved |-ap
Use this option to list the mapped host names or IP addresses that are approved.
- -comment | -c
Use this option to specify the content of the comment you want added to the primary host. You must specify either the host or the host ID to add a comment. If the comment contains a space, you must enclose the comment in double quotation marks ("..."). The comment field is limited to 2048 characters.
- -conflict | -cf
Use this option to list the mapped host names or IP addresses whose entries conflict with other mappings.
- -delete | -d
Use this option to remove host ID to host name or IP address mapping.
- -deletecomment | -dc
Use this option to remove a comment for the specified host or host ID. This option removes the comment that is associated with the primary host.
If you attempt to delete a non-existent comment for a host with the nbhostmgmt-deletecomment option, the nbauditreport displays a corresponding entry for a successful update.
- -help | -h
Displays the command-line usage message.
- -host | -n
Specifies the primary host name or alternate mapped host name or IP address. For the add and the delete operation, ensure that the alternate mapped host name or IP address is associated with a single host ID.
- -hostid | -i
Specifies the NetBackup host ID.
- -isshared | -is
Indicates that you want to add the mapping name as shared.
Note:
Use -add without the -isshared option to add the first share. Add all additional shares with the -isshared option.
- -json | -j
This option generates the data in
json
format and spans multiple lines.
- -json_compact | -jc
This option generates the data in
json
format on a single line
- -list | -li
Use this option to list mapped host names or IP addresses based on different filters. You can list based on approved, pending for approval, and conflicting names or addresses.
- -mappingname | -hm
Specifies the host name or the IP address you want to add or delete.
- -pending | -p
Use this option to list the mapped host names or IP addresses pending approval.
- -reason | -r
Use this option to specify the reason for the command action. The string that you enter is captured and appears in the audit report. Enclose this string with double quotes ("..."). The reason field is limited to 512 characters. It cannot begin with a dash character (-) and it cannot contain the single quotation mark (') character.
- -server | -s
Indicates the name of NetBackup Master server with which communication needs to be established. The default value for the -server option is the first server name listed in the
bp.conf
file.
- -short | -l
Use this option to list the host ID and mapped host names only.
EXAMPLES
Example 1: Add a host ID to host name mapping.
#nbhostmgmt - add -hostid 0a0aa0a0-0000-0aa0-aa00-000a0a00a0a0 - mappingname testhost1 testhost1 is successfully mapped to 0a0aa0a0-0000-0aa0-aa00-000a0a00a0a0.
Example 2: Add a host ID to host name mapping with the host name.
#nbhostmgmt -add -host testhost1 -mappingname testhost2 testhost2 is successfully mapped to 0a0aa0a0-0000-0aa0-aa00-000a0a00a0a0.
Example 3: Approve a pending mapping. This example shows the approval of the mapping of testhost3 for mapped host name host3.
#nbhostmgmt - add -host host3 - mappingname testhost3 testhost3 is successfully updated.
Example 4: Delete a host ID from the host name mapping with a host ID.
#nbhostmgmt - delete -hostid 0a0aa0a0-0000-0aa0-aa00-000a0a00a0a0 - mappingname testhost1 Mapping between testhost1 and 0a0aa0a0-0000-0aa0-aa00-000a0a00a0a0 is removed.
Example 5: Delete a host ID from the host name mapping with a host.
#nbhostmgmt - delete -host fs001 - mappingname testhost4 Mapping between testhost4 and 0a0aa0a0-0000-0aa0-aa00-000a0a00a0a0 is removed.
Example 6: Delete a host ID from the host name mapping with a host from the specified master server.
#nbhostmgt -delete -server nbmaster01 -host fs001 -mappingname testhost3 Mapping between testhost3 and 0a0aa0a0-0000-0aa0-aa00-000a0a00a0a0 is removed.
Example 6: List the details of the hostname that is provided. Examples are provided that show how the output differs when multiple hosts share a common mapping.
List output if the mapping is not shared.
nbhostmgmt - list - host testhost1 Host ID : 00aa0aa0-a000-000a-00a0-000aaaa00a0a Host : server300.example.com Master Server : server300.example.com OS Type : UNIX Operating System : RedHat Linux(3.10.0-327.el7.x86_64) NetBackup EEBs : Hardware Description : GenuineIntel Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz, 16 CPUs CPU Architecture : x86_64 Version : NetBackup_8.1 Secure : Yes Mapped HostName Approved Conflict Auto-discovered Shared testhost1 Yes No No No Created On Last Updated On May 25, 2017 10:09:45 AM May 25, 2017 10:09:45 AM
List output if the mapping is shared.
nbhostmgmt - list - host sharedhost1 Host ID : aa00a000-0000-0000-00a0-0a00a000a0aa Host : server301.example.com Master Server : server301.example.com OS Type : UNIX Operating System : RedHat Linux(3.10.0-327.el7.x86_64) NetBackup EEBs : Hardware Description : GenuineIntel Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz, 16 CPUs CPU Architecture : x86_64 Version : NetBackup_8.1 Secure : False Mapped HostName Approved Conflict Auto-discovered Shared sharedhost1 Yes No No Yes Created On Last Updated On May 25, 2017 10:09:45 AM May 25, 2017 10:09:45 AM Host ID : 00aa0aa0-a000-000a-00a0-000aaaa00a0a Host : server300.example.com Master Server : server300.example.com OS Type : UNIX OS Version : RedHat Linux(3.10.0-327.el7.x86_64) NetBackup EEBs : Hardware Description : GenuineIntel Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz, 16 CPUs CPU Architecture : x86_64 Version : NetBackup_8.1 Secure : Yes Mapped HostName Approved Conflict Auto-discovered Shared sharedhost1 Yes No No Yes Created On Last Updated On May 25, 2017 10:09:45 AM May 25, 2017 10:09:45 AM
SEE ALSO
See bpnbat.