Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. NetBackup™ Security and Encryption Guide
  3. Section I. Identity and access management
  4. API keys
  5. Using an API key
  6. Setting an API key environment variable to run NetBackup commands
NetBackup™ Security and Encryption Guide

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 master 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.

Feedback

Was this page helpful?
Previous

Using an API key

Next

Auth.conf file

Feedback

Was this page helpful?