px pxb validate
Validate 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 validate backuplocation
Validate a backup location
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 |
--name, -n | string | Name of the backuplocation | - | 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 |
--uid | string | UID of the backuplocation | - | Optional |
px pxb validate receiver
Validate SMTP receiver configuration.
This command validates SMTP receiver settings by sending a test email. It can operate in two modes:
- EXISTING RECEIVER: Validate an existing receiver by providing name (and optional UID)
- NEW CONFIGURATION: Validate a new configuration by providing all SMTP details
The command will send a test email to the specified recipients to verify the configuration.
Examples:
# Validate existing receiver by name (UID optional)
pxb validate receiver --name smtp-alerts --recipient-ids "test@company.com"
# Validate existing receiver by name and UID
pxb validate receiver --name smtp-alerts --uid receiver-12345 --recipient-ids "test@company.com"
# Validate new SMTP configuration
pxb validate receiver --from "alerts@company.com" --host "smtp.company.com" --port "587" --authentication --auth-username "alerts@company.com" --auth-password "password" --recipient-ids "test@company.com"
# Validate with StartTLS and custom certificates
pxb validate receiver --from "alerts@company.com" --host "internal-smtp.company.com" --encryption-starttls --allow-custom-certificate --ca-cert-file "/path/to/ca.crt" --recipient-ids "test@company.com"
# Validate with recipients from JSON file
pxb validate receiver --name smtp-alerts --recipient-ids-file /path/to/recipients.json
# Validate with TLS config from JSON file
pxb validate receiver --from "alerts@company.com" --host "smtp.company.com" --tls-config-file /path/to/tls-config.json --recipient-ids "test@company.com"
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--allow-custom-certificate | bool | Allow custom TLS certificates | false | Optional |
--auth-password | string | SMTP authentication password | - | Optional |
--auth-username | string | SMTP authentication username | - | Optional |
--authentication | bool | Enable SMTP authentication | false | Optional |
--authtoken | string | oidc auth token | - | Optional |
--ca-cert-file | string | Path to CA certificate file | - | Optional |
--cert-file | string | Path to client certificate file | - | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--encryption-starttls | bool | Enable StartTLS encryption | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--from, -f | string | Sender email address (required for new config) | - | Optional |
--host | string | SMTP server host address (required for new config) | - | Optional |
--key-file | string | Path to client private key file | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name | string | Name of existing receiver to validate | - | 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 |
--port | string | SMTP server port | 25 | Optional |
--recipient-ids | string | Comma-separated list of test recipient email addresses (required) | - | Optional |
--recipient-ids-file | string | Path to JSON file containing array of test recipient email addresses | - | Optional |
--tls-certificate | string | tls certificate | - | Optional |
--tls-config-file | string | Path to JSON file containing TLS configuration | - | Optional |
--uid | string | UID of existing receiver to validate | - | Optional |