px pxb set
Set px-backup resources
note
The following commands support a set of global flags that apply to all px pxb commands.
For details, see the Global Flags section.
px pxb set config
Set configuration values in the PX-Backup configuration file.
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--orgID | string | The org id for which to query the object | default | Optional |
--output, -o | string | Output format. One of: table|json|yaml|name | table | Optional |
--px-backup-api-url | string | PX-Backup API URL (e.g., https://pxb.portworx.com) | - | Optional |
--pxcentral-auth-url | string | PX-Central auth server URL (e.g., https://pxb.portworx.com) | - | Optional |
--pxcentral-client-id | string | PX-Central client ID | - | Optional |
--tls-certificate | string | tls certificate | - | Optional |
--tls-certificate-path | string | Path to TLS certificate file for secure connections | - | Optional |
px pxb set context
Add a new context or update an existing context configuration in ~/.pxb/config
Examples:
# Add a new dev context
pxb set context dev --px-backup-api-url https://dev.pxb.example.com
# Update production context
pxb set context prod --px-backup-api-url https://prod.pxb.example.com --pxcentral-client-id my-client
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--orgID | string | The org id for which to query the object | default | Optional |
--output, -o | string | Output format. One of: table|json|yaml|name | table | Optional |
--px-backup-api-url | string | PX-Backup API URL (e.g., https://pxb.portworx.com) | - | Optional |
--pxcentral-auth-url | string | PX-Central auth server URL (e.g., https://pxb.portworx.com) | - | Optional |
--pxcentral-client-id | string | PX-Central client ID | - | Optional |
--tls-certificate | string | tls certificate | - | Optional |
--tls-certificate-path | string | Path to TLS certificate file for secure connections | - | Optional |
px pxb set loglevel
Set the log level of the px-backup server.
This command changes the server's logging verbosity level. The log level controls how much detail is included in server logs:
- TRACE: Most verbose, includes all debug information and function traces
- DEBUG: Detailed information for debugging purposes
- INFO: General information about server operations (default)
The change takes effect immediately and affects all server components.
Examples:
# Set log level to DEBUG for detailed troubleshooting
pxb set loglevel DEBUG
# Set log level to TRACE for maximum verbosity
pxb set loglevel TRACE
# Set log level back to INFO (normal operation)
pxb set loglevel INFO
# Set log level with JSON output
pxb set loglevel DEBUG --output json
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--orgID | string | The org id for which to query the object | default | Optional |
--output, -o | string | Output format. One of: table|json|yaml|name | table | Optional |
--tls-certificate | string | tls certificate | - | Optional |