Cluster Configuration
Description
The px pxb config commands manage the Portworx Backup CLI configuration stored in ~/.pxb/config. Use these commands to initialize the config file, set or update configuration values, view the active configuration, and check status including authentication information.
Usage
Init Config
px pxb init config [--px-backup-api-url <url>] [--pxcentral-auth-url <url>] \
[--tls-certificate-path </path/to/ca.crt>] [--force]
Set Config
px pxb set config [--px-backup-api-url <url>] [--pxcentral-auth-url <url>] \
[--pxcentral-client-id <id>] [--pxcentral-verify-ssl <true|false>] \
[--tls-certificate-path </path/to/ca.crt>]
View Config
px pxb view config
Status Config
px pxb status config
Examples
Initialize a new configuration
# Create a fresh config with defaults derived by the CLI
px pxb init config
# Initialize with endpoints and TLS certificate
px pxb init config \
--px-backup-api-url https://pxb.example.com \
--pxcentral-auth-url https://auth.example.com \
--tls-certificate-path /etc/ssl/certs/pxb-ca.crt
# Overwrite if a config already exists
px pxb init config --force
Set or update configuration values
# Set endpoints and client information
px pxb set config \
--px-backup-api-url https://pxb.example.com \
--pxcentral-auth-url https://auth.example.com \
--pxcentral-client-id portal-ui
# Configure SSL verification
px pxb set config \
--pxcentral-verify-ssl true
# Provide a TLS certificate path
px pxb set config --tls-certificate-path /etc/ssl/certs/pxb-ca.crt
# Error case: no configuration flags provided
px pxb set config
# Output: no configuration flags provided. Use -h for usage
View the current configuration (YAML)
px pxb view config
Show status (endpoints and authentication)
px pxb status config
Sample ~/.pxb/config
# Example px pxb config file at ~/.pxb/config
px_backup_api_url: https://pxb.example.com
pxcentral_auth_url: https://auth.example.com
pxcentral_client_id: pxcentral
pxcentral_verify_ssl: "true"
tls_certificate_path: /etc/ssl/certs/pxb-ca.crt
# Authentication (populated by 'px pxb login')
oidc_token: "eyJhbGciOi..." # truncated example; do not commit real tokens
token_expiry: "2025-01-30T12:34:56Z"
Flags for commands and sub-commands
Init Config Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--px-backup-api-url | string | Portworx Backup API URL (e.g., https://pxb.example.com) | |
--pxcentral-auth-url | string | PX-Central auth server URL | |
--tls-certificate-path | string | Path to TLS certificate file used to validate server TLS | |
--force | bool | Overwrite existing config file if present |
Set Config Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--px-backup-api-url | string | Portworx Backup API URL | |
--pxcentral-auth-url | string | PX-Central auth server URL | |
--pxcentral-client-id | string | PX-Central client ID to request tokens | |
--pxcentral-verify-ssl | string | Whether to verify SSL certificates (true or false) | |
--tls-certificate-path | string | Path to TLS certificate file |
View Config Flags
This command has no flags.
Status Config Flags
This command has no flags.
Notes
- Location: configuration is stored at
~/.pxb/config. - Init behavior:
- Creates a new configuration file with defaults; use
--forceto overwrite an existing file. - Optional values provided via flags are set in the initial file.
- Creates a new configuration file with defaults; use
- Set behavior:
- Requires at least one configuration flag to be provided. If no flags are specified, the command fails with an error message.
- Updates only the values you specify; unspecified values remain unchanged.
--pxcentral-verify-sslacceptstrueorfalse(string form).
- View behavior: prints the full configuration in YAML format. If no configuration exists, a helpful message is printed.
- Status behavior: prints endpoints, SSL settings, client ID, TLS certificate path, and authentication status (based on current token/expiry in the config).
Output Format Support
- Not applicable: these commands emit human-readable text/YAML;
--outputis not supported for config commands.
Authentication and Context
- Status reflects the current authentication information stored in the config (OIDC token and expiry, if present).
- Other commands (get/create/etc.) use organization and auth context derived from the config, but config commands themselves do not require additional context.
- To authenticate, see the Login/Logout guide: login-logout.md