Skip to main content

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

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the backuplocation-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional
--uidstringUID 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:

  1. EXISTING RECEIVER: Validate an existing receiver by providing name (and optional UID)
  2. 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

FlagInput typeDescriptionDefaultRequired
--allow-custom-certificateboolAllow custom TLS certificatesfalseOptional
--auth-passwordstringSMTP authentication password-Optional
--auth-usernamestringSMTP authentication username-Optional
--authenticationboolEnable SMTP authenticationfalseOptional
--authtokenstringoidc auth token-Optional
--ca-cert-filestringPath to CA certificate file-Optional
--cert-filestringPath to client certificate file-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--encryption-starttlsboolEnable StartTLS encryptionfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--from, -fstringSender email address (required for new config)-Optional
--hoststringSMTP server host address (required for new config)-Optional
--key-filestringPath to client private key file-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--namestringName of existing receiver to validate-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--portstringSMTP server port25Optional
--recipient-idsstringComma-separated list of test recipient email addresses (required)-Optional
--recipient-ids-filestringPath to JSON file containing array of test recipient email addresses-Optional
--tls-certificatestringtls certificate-Optional
--tls-config-filestringPath to JSON file containing TLS configuration-Optional
--uidstringUID of existing receiver to validate-Optional