Setting an API key environment variable to run NetBackup commands
To use an API key while running NetBackup commands that need user authentication, you need to create an API key and set an environment variable for the API key. Once the environment variable is set, you can run the commands until the API key is valid and the environment variable is set.
On Windows platform, set the API key environment variable in the user context.
Example of an environment variable for an API key:
NETBACKUP_APIKEY = MasterServer1:APIKEY1
If you want to set multiple API keys, specify the primary server and API key mappings in a comma-separated format.
For example:
NETBACKUP_APIKEY = MasterServer1:APIKEY1,MasterServer2:APIKEY2,MasterServer3:APIKEY3
You can also specify the mappings in a file and the file should be specified with prefix '@'.
For example:
NETBACKUP_APIKEY = @file_path/file_name
The contents of the file should be as follows:
MasterServer1:APIKEY1
MasterServer2:APIKEY2
MasterServer3:APIKEY3
See Creating API keys.