Skip to main content

px pxb get

Get 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 get backup

Get backup details or list multiple backups.

This command can operate in two modes:

  1. INSPECT MODE: When --name or --uid is specified, it retrieves detailed information about a specific backup
  2. ENUMERATE MODE: When no specific backup is specified, it lists multiple backups with filtering and sorting options

The command automatically determines the mode based on the provided parameters.

Examples:

# Get details of a specific backup by name
pxb get backup --name my-backup

# Get details of a specific backup by UID
pxb get backup --uid backup-12345

# List all backups with default pagination
pxb get backup

# List backups with custom pagination and filtering
pxb get backup --max-objects 50 --owners user1,user2 --backup-object-type VirtualMachine

# List only failed backups
pxb get backup --status Failed

# List failed and partially successful backups
pxb get backup --status Failed,PartialSuccess

# List backups with name containing "prod"
pxb get backup --name-filter prod

# List backups from specific cluster
pxb get backup --cluster-name-filter production-cluster

# List backups with specific labels
pxb get backup --labels env=production,team=platform

# List backups from last week
pxb get backup --start-time 2024-01-01T00:00:00Z --end-time 2024-01-07T23:59:59Z

# List backups created by specific schedule
pxb get backup --backup-schedule-refs "daily-backup:schedule-123"

# List backups from multiple schedules (use multiple flags)
pxb get backup --backup-schedule-refs "daily-backup:schedule-123" --backup-schedule-refs "weekly-backup:schedule-456"

# List backups from schedule by name only (no UID)
pxb get backup --backup-schedule-refs "daily-backup"

# List backups with sorting
pxb get backup --sort-by CreationTimestamp --sort-order Descending

# List backups without detailed resource information (faster)
pxb get backup --include-detailed-resources=false --max-objects 200

# List backups with pagination
pxb get backup --max-objects 50 --object-index 100

# List backups containing a specific deployment
pxb get backup --resource-name nginx-deployment --resource-namespace production --resource-kind Deployment

# List backups containing any resource in a namespace
pxb get backup --resource-namespace kube-system

# List VM backups that have a specific volume attached
pxb get backup --backup-object-type VirtualMachine --vm-volume-name data-pvc

# List backups containing a specific PVC
pxb get backup --resource-name my-pvc --resource-kind PersistentVolumeClaim --resource-namespace default

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--backup-object-typestringFilter by backup object type: 'All' or 'VirtualMachine'-Optional
--backup-schedule-refsstringArrayFilter by backup schedule references (name or name:uid). Use multiple flags for multiple schedules[]Optional
--cluster-name-filterstringFilter backups by cluster name pattern (substring match)-Optional
--cluster-uid-filterstringFilter backups by cluster UID-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--end-timestringFilter backups created before this time (RFC3339 format: 2024-01-07T23:59:59Z)-Optional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringYAML/JSON file containing backup get/enumerate configuration-Optional
--include-detailed-resourcesboolInclude detailed resource information in backup objects (affects RESOURCE COUNT column; set to false for faster listing; only works when listing multiple backups, not with --name or --uid)trueOptional
--labelsstringToStringFilter backups by labels (key=value,key2=value2)[]Optional
--max-objectsuint64Maximum number of backup objects to display100Optional
--name, -nstringName of specific backup to inspect-Optional
--name-filterstringFilter backups by name pattern (substring match)-Optional
--object-indexuint64Starting index for pagination (0-based)0Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--ownersstringArrayFilter by backup owners (comma-separated usernames)[]Optional
--resource-groupstringFilter backups containing resource with this group-Optional
--resource-kindstringFilter backups containing resource with this kind (e.g., Deployment, PersistentVolumeClaim)-Optional
--resource-namestringFilter backups containing resource with this name-Optional
--resource-namespacestringFilter backups containing resource in this namespace-Optional
--resource-versionstringFilter backups containing resource with this version-Optional
--schedule-policy-refsstringArrayFilter by schedule policy references (name or name:uid)[]Optional
--sort-bystringSort by field: CreationTimestamp, Name, ClusterName, Size, RestoreBackupName-Optional
--sort-orderstringSort order: Ascending, Descending-Optional
--start-timestringFilter backups created after this time (RFC3339 format: 2024-01-01T00:00:00Z)-Optional
--statusstringArrayFilter by backup status: Invalid, Pending, InProgress, Aborted, Failed, Deleting, Success, Captured, PartialSuccess, DeletePending, CloudBackupMissing[]Optional
--tls-certificatestringtls certificate-Optional
--uidstringUID of specific backup to inspect-Optional
--vm-volume-namestringFilter VM backups that have this volume (PVC) attached-Optional

px pxb get backupResourceDetail

Get detailed resource information for a VM backup.

This command retrieves the detailed resource mapping for virtual machine backups. Only JSON and YAML output formats are supported for this command.

Supports granular filtering using namespace or VM filters to retrieve specific resources.

Examples:

# Get all backup resource details
pxb get backupResourceDetail --name my-backup

# Get backup resource details with namespace filter
pxb get backupResourceDetail --name my-backup \
--namespace-name-pattern "^prod-.*" \
--include-namespaces prod-app,prod-db

# Get backup resource details with status filter
pxb get backupResourceDetail --name my-backup \
--status Success,Failed

# Get backup resource details with pagination
pxb get backupResourceDetail --name my-backup \
--max-objects 100 --object-index 0

# Get backup resource details with specific resources
pxb get backupResourceDetail --name my-backup \
--ns-include-resources "web-deploy:prod:apps:v1:Deployment"

# Get backup resource details using filter file
pxb get backupResourceDetail --name my-backup \
--filter-file /path/to/filter.yaml

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--exclude-namespacesstringSliceList of namespaces to exclude (comma-separated)[]Optional
--exclude-vmsstringList of VMs to exclude (format: namespace/name, comma-separated). Mutually exclusive with --include-vms-Optional
--filter-filestringPath to YAML/JSON file containing complete filter specification-Optional
--force-resyncboolForce resync of failed sync processfalseOptional
--include-namespacesstringSliceList of namespaces to include (comma-separated)[]Optional
--include-vmsstringList of VMs to include (format: namespace/name, comma-separated). Mutually exclusive with --exclude-vms-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objectsuint64Maximum number of objects to fetch (0 = no limit)0Optional
--name, -nstringName of the backup (required)-Yes
--namespace-name-patternstringRegex pattern to filter namespaces by name-Optional
--ns-exclude-resourcesstringList of specific resources to exclude from namespace filter (format: name:namespace:group:version:kind, comma-separated). Can be combined with --ns-resource-name-pattern for sequential filtering. Mutually exclusive with --ns-include-resources-Optional
--ns-include-resourcesstringList of specific resources to include in namespace filter (format: name:namespace:group:version:kind, comma-separated). Can be combined with --ns-resource-name-pattern for sequential filtering. Mutually exclusive with --ns-exclude-resources-Optional
--ns-resource-name-patternstringRegex pattern to filter resources by name within namespaces-Optional
--ns-resourcesstringSliceList of resource types (GVKs) to filter (format: group/version/kind, e.g., apps/v1/Deployment,/v1/Pod)[]Optional
--object-indexuint64Object index from which to start fetching0Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: json|yamljsonOptional
--statusstringSliceFilter resources by status (e.g., Success,Failed). Default: Success[]Optional
--sync-namespaces-onlyboolSync only namespacesfalseOptional
--tls-certificatestringtls certificate-Optional
--uidstringUID of the backup-Optional
--vm-filter-filestringPath to YAML/JSON file containing VM filter specification-Optional
--vm-name-patternstringRegex pattern to filter VMs by name-Optional
--vm-os-namesstringSliceList of OS names to filter VMs (comma-separated)[]Optional

px pxb get backuplocation

List backup locations

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--cloud-credential-namestringName of the cloud credential for filtering-Optional
--cloud-credential-uidstringUID of the cloud credential for filtering-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--end-timestringFilter by end time (RFC3339 format, e.g., 2024-12-31T23:59:59Z)-Optional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringYAML/JSON file containing backup location get/enumerate configuration-Optional
--include-secretsboolInclude secrets in the outputfalseOptional
--include-validation-stateboolInclude backup locations in ValidationInProgress and ValidationFailed statestrueOptional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--labels-filestringPath to YAML/JSON file containing labels for filtering-Optional
--max-objectsuint64Maximum number of backup locations to return (0 = no limit)0Optional
--name, -nstringName of the backup location-Optional
--name-filterstringFilter backup locations by name (substring match)-Optional
--object-indexuint64Starting index for pagination (0-based)0Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--sort-bystringSort by field: CreationTimestamp, Name, LastUpdateTimestamp-Optional
--sort-orderstringSort order: Ascending, Descending-Optional
--start-timestringFilter by start time (RFC3339 format, e.g., 2024-01-01T00:00:00Z)-Optional
--tls-certificatestringtls certificate-Optional
--uidstringUID of the backup location-Optional

px pxb get backupschedule

Get backup schedule details or list multiple backup schedules.

This command can operate in two modes:

  1. INSPECT MODE: When --name and --uid are specified, it retrieves detailed information about a specific backup schedule
  2. ENUMERATE MODE: When no specific schedule is specified, it lists multiple schedules with filtering and sorting options

Backup schedules define automated backup operations for Kubernetes applications and data.

Examples:

# List all backup schedules
pxb get backupschedule

# Get specific backup schedule by name and UID
pxb get backupschedule --name my-schedule --uid schedule-12345

# List schedules with custom output format
pxb get backupschedule --output json

# List schedules filtered by backup location
pxb get backupschedule --backup-location-name s3-location --backup-location-uid location-123

# List VM backup schedules only
pxb get backupschedule --backup-object-type VirtualMachine

# List schedules with sorting and limiting
pxb get backupschedule --sort-by name --sort-order asc --max-objects 10

# List schedules with labels filter
pxb get backupschedule --labels "env=prod,team=platform"

# List schedules with advanced filtering
pxbctl get backupschedule --include-objects "schedule1,schedule2" --exclude-objects "test-schedule"

# List schedules with pagination
pxbctl get backupschedule --max-objects 50 --object-index 100

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--backup-location-namestringFilter by backup location name-Optional
--backup-location-uidstringFilter by backup location UID-Optional
--backup-object-typestringFilter by backup object type: NS|VM|All-Optional
--cluster-scopestringFilter by cluster scope-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--exclude-filterstringExclude filter expression-Optional
--exclude-objectsstringSliceExclude specific backup schedules by name[]Optional
--include-filterstringInclude filter expression-Optional
--include-objectsstringSliceInclude specific backup schedules by name[]Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objectsuint64Maximum number of schedules to retrieve100Optional
--name, -nstringName of the backup schedule to inspect-Optional
--object-indexuint64Starting index for pagination (0-based)0Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--policy-refsstringSliceFilter by schedule policy references[]Optional
--sort-bystringSort schedules by field: name, create_time, update_time, cluster-Optional
--sort-orderstringSort order: asc or descascOptional
--tls-certificatestringtls certificate-Optional
--uid, -ustringUID of the backup schedule to inspect-Optional

px pxb get backupshare

Get backup sharing information to view current access permissions.

This command displays the current sharing configuration for a backup, showing which users and groups have access and their permission levels. When no specific backup is provided, it can enumerate backup shares based on the provided criteria.

The command supports both CLI flags and JSON file input for complex queries.

Examples:

# Get backup sharing information for a specific backup
pxb get backupshare --name my-backup --uid backup-12345

# Get backup sharing with JSON output
pxb get backupshare --name my-backup --uid backup-12345 --output json

# Get backup sharing from configuration file
pxb get backupshare --file /path/to/backup-share-inspect-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--filestringPath to YAML/JSON file containing backup share inspect configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the backup (required, optional with --file)-Yes
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional
--uid, -ustringUID of the backup-Optional

px pxb get cloudcredential

Get cloud credential information to view current configuration and details.

This command displays the current configuration for a cloud credential, showing provider type, configuration details, and metadata. When no specific credential is provided, it can enumerate cloud credentials based on the provided criteria.

The command supports both CLI flags and JSON file input for complex queries.

Examples:

# Get cloud credential information for a specific credential
pxb get cloudcredential --name aws-cred --uid cred-12345

# Get cloud credential information including secrets
pxb get cloudcredential --name aws-cred --uid cred-12345 --include-secrets

# Get cloud credential with JSON output
pxb get cloudcredential --name aws-cred --uid cred-12345 --output json

# Get cloud credential from configuration file
pxb get cloudcredential --file /path/to/cloud-credential-inspect-config.json

# List all cloud credentials
pxb get cloudcredential

# List cloud credentials with pagination
pxb get cloudcredential --max-objects 10 --object-index 0

# List cloud credentials with filtering and sorting
pxb get cloudcredential --name-filter "aws" --sort-by Name --sort-order Ascending

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--end-timestringFilter by end time (RFC3339 format, e.g., 2024-12-31T23:59:59Z)-Optional
--endpoint, -estringThe endpoint of the server-Optional
--filestringPath to YAML/JSON file containing cloud credential inspect configuration-Optional
--include-secretsboolInclude secrets in the outputfalseOptional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objectsuint64Maximum number of cloud credentials to return (0 = no limit)0Optional
--name, -nstringName of the cloud credential-Optional
--name-filterstringFilter cloud credentials by name (substring match)-Optional
--object-indexuint64Starting index for pagination (0-based)0Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--sort-bystringSort by field: CreationTimestamp, Name, LastUpdateTimestamp-Optional
--sort-orderstringSort order: Ascending, Descending-Optional
--start-timestringFilter by start time (RFC3339 format, e.g., 2024-01-01T00:00:00Z)-Optional
--tls-certificatestringtls certificate-Optional
--uidstringUID of the cloud credential-Optional

px pxb get cluster

Get cluster information. Behavior depends on the number of clusters being queried:

  • If name or uid is specified: Inspect the specific cluster
  • If no name/uid specified: Enumerate all clusters

Examples:

  # Get specific cluster by name
pxb get cluster --name my-cluster

# Get specific cluster by UID
pxb get cluster --uid cluster-12345-abcde

# Get specific cluster with secrets
pxb get cluster --name my-cluster --include-secrets

# List all clusters
pxb get cluster

# List clusters filtered by cloud credential
pxb get cluster --cloud-credential-name aws-cred

# List clusters with labels
pxb get cluster --labels env=prod,team=platform

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--cloud-credential-namestringName of cloud credential for filtering clusters-Optional
--cloud-credential-uidstringUID of cloud credential for filtering clusters-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--include-secrets, -sboolInclude secrets when reading cluster detailsfalseOptional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the cluster (for inspect operation)-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional
--uid, -ustringUID of the cluster (for inspect operation)-Optional

px pxb get contexts

List all available PX-Backup contexts from ~/.pxb/config

Aliases: context, ctx

Examples:

# List all contexts
pxb get contexts

# List contexts with output format
pxb get contexts -o yaml

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
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional

px pxb get license

Get comprehensive license information and status for the organization.

This command retrieves detailed license information including:

  • License status (Active, Expired, etc.)
  • Feature information and entitlements
  • License counts and consumption
  • Expiration dates and validity periods
  • License types and enforcement details

The command provides a complete overview of the current licensing state for the organization, including all activated features and their usage.

Examples:

# Get license information
pxb get license

# Get license information in JSON format
pxb get license --output json

# Get license information in YAML format
pxb get license --output yaml

# Load configuration from JSON file
pxb get license --file /path/to/inspect-config.json

# Airgapped usage reports (default pagination)
pxb get license --airgapped-usage

# Airgapped usage with specific page
pxb get license --airgapped-usage --max-objects 50 --object-index 100

# Load airgapped usage configuration from JSON file
pxb get license --airgapped-usage --file /path/to/usage-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--airgapped-usageboolShow airgapped license usage reportsfalseOptional
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringJSON configuration file path-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objects, -muint64Maximum number of usage objects to return100Optional
--object-index, -iuint64Starting index for pagination (0-based)0Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional

px pxb get loglevel

Get the current log level of the px-backup server.

This command queries the server to retrieve the current logging level configuration. The log level controls the verbosity of server logs and can be one of: TRACE, DEBUG, INFO.

Examples:

# Get current server log level
pxb get loglevel

# Get log level in JSON format
pxb get loglevel --output json

# Get log level in YAML format
pxb get loglevel --output yaml

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
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional

px pxb get managed-clusters

Get managed clusters from cloud providers like AWS.

This command can either inspect a specific managed cluster by name or enumerate all managed clusters from the specified cloud provider. The operation is automatically determined based on whether a cluster name is provided.

Supported cloud providers:

  • AWS (Amazon Web Services)

The command requires cloud credentials to authenticate with AWS and discover clusters in the specified region.

Examples:

# List all AWS managed clusters in us-west-2
pxb get managed-clusters --provider aws --cloud-credential-name aws-creds --region us-west-2

# Inspect specific AWS managed cluster
pxb get managed-clusters --name my-eks-cluster --provider aws --cloud-credential-name aws-creds --region us-west-2

# List with pagination (AWS only)
pxb get managed-clusters --provider aws --cloud-credential-name aws-creds --region us-west-2 --max-results 20 --next-token "token123"

# Load configuration from JSON file
pxb get managed-clusters --file /path/to/config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--cloud-credential-namestringName of cloud credential to use (required)-Optional
--cloud-credential-uidstringUID of cloud credential to use-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringJSON configuration file path-Optional
--include-secretsboolInclude sensitive information in the responsetrueOptional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-results, -mint64Maximum number of results to return (AWS only, default: 10)10Optional
--name, -nstringName of the specific managed cluster to inspect-Optional
--next-tokenstringAWS pagination token for next set of results-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--provider, -pstringCloud provider type: aws (required)-Optional
--region, -rstringAWS region to scan for clusters (required for AWS)-Optional
--tls-certificatestringtls certificate-Optional
--uidstringUID of the specific managed cluster to inspect-Optional

px pxb get organization

Get organization information and details.

This command can either inspect a specific organization by name or UID, or enumerate all organizations that the user has access to. The operation is automatically determined based on whether an organization identifier is provided.

For user-facing CLI, this command provides read-only access to organization information without the ability to create, update, or delete organizations.

Aliases: org, o

Examples:

# List all accessible organizations
pxb get organizations

# Get specific organization by name
pxb get organization --name "my-org"

# Get organizations in JSON format
pxb get organizations --output json

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 organization to inspect-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional

px pxb get permission

Get role permissions for the current user.

This command retrieves the permissions that the current user has based on their assigned roles. It shows which services the user can access and what level of access they have for each service.

Examples:

# Get current user's permissions
pxb get permission

# Get permissions with detailed output
pxb get permission --output wide

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
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional

px pxb get receiver

Get receiver details or list multiple receivers.

This command can operate in two modes:

  1. INSPECT MODE: When --name or --uid is specified, it retrieves detailed information about a specific receiver
  2. ENUMERATE MODE: When no specific receiver is specified, it lists multiple receivers with filtering options

The command automatically determines the mode based on the provided parameters.

The command supports both CLI flags and YAML/JSON file input for complex configurations.

Examples:

# Get details of a specific receiver by name
pxb get receiver --name smtp-alerts

# Get details of a specific receiver by UID with secrets
pxb get receiver --uid receiver-12345 --include-secrets

# List all receivers
pxb get receiver

# List receivers with custom pagination
pxb get receiver --max-objects 50

# List receivers with sorting
pxb get receiver --sort-by name --sort-order ascending

# Get receivers from JSON configuration file
pxb get receiver --file /path/to/get-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--filestringYAML/JSON file containing complete receiver get configuration-Optional
--include-secretsboolInclude sensitive information in output (passwords, keys)falseOptional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objectsuint64Maximum number of receivers to return100Optional
--name, -nstringName of the receiver to inspect-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--sort-bystringField to sort by (name, creation-time)-Optional
--sort-orderstringSort order (ascending, descending)ascendingOptional
--tls-certificatestringtls certificate-Optional
--type, -tstringType of receivers to filter (email)-Optional
--uidstringUID of the receiver to inspect-Optional

px pxb get recipient

Get recipient details or list multiple recipients.

This command can operate in two modes:

  1. INSPECT MODE: When --name or --uid is specified, it retrieves detailed information about a specific recipient
  2. ENUMERATE MODE: When no specific recipient is specified, it lists multiple recipients with filtering options

The command automatically determines the mode based on the provided parameters.

The command supports both CLI flags and YAML/JSON file input for complex configurations.

Examples:

# Get details of a specific recipient by name
pxb get recipient --name critical-alerts

# Get details of a specific recipient by UID
pxb get recipient --uid recipient-12345

# List all email recipients
pxb get recipient --type email

# List recipients with custom pagination
pxb get recipient --max-objects 50 --type email

# List recipients with sorting
pxb get recipient --sort-by name --sort-order ascending

# Get recipients from JSON configuration file
pxb get recipient --file /path/to/get-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringYAML/JSON file containing complete recipient get configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objectsuint64Maximum number of recipients to return100Optional
--name, -nstringName of the recipient to inspect-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--sort-bystringField to sort by (name, creation-time)-Optional
--sort-orderstringSort order (ascending, descending)ascendingOptional
--tls-certificatestringtls certificate-Optional
--type, -tstringType of recipients to list (email)emailOptional
--uidstringUID of the recipient to inspect-Optional

px pxb get resourcetypes

Get the list of Kubernetes resource types that are supported by PX-Backup for backup operations.

This command queries a specific cluster to discover all the Kubernetes resource types that can be backed up by PX-Backup. The resource types are dynamically discovered from the cluster's API server and filtered based on PX-Backup's capabilities.

The command requires cluster name to determine which cluster's resource types to retrieve. The cluster UID is optional and can be provided for additional identification.

Examples:

# Get resource types for a cluster by name
pxb get resourcetypes --cluster-name "prod-cluster"

# Get resource types for a cluster with both name and UID
pxb get resourcetypes --cluster-name "prod-cluster" --cluster-uid "cluster-12345-abcde"

# Get resource types in JSON format
pxb get resourcetypes --cluster-name "prod-cluster" --output json

# Load configuration from JSON file
pxb get resourcetypes --file /path/to/config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--cluster-namestringName of the cluster to get resource types from (required)-Optional
--cluster-uidstringUID of the cluster to get resource types from (optional)-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringJSON configuration file path-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional

px pxb get restore

Get restore details or list multiple restores.

This command can operate in two modes:

  1. INSPECT MODE: When --name or --uid is specified, it retrieves detailed information about a specific restore
  2. ENUMERATE MODE: When no specific restore is specified, it lists multiple restores with filtering and sorting options

ENUMERATE MODE supports extensive filtering options:

  • Name and cluster filtering with substring matching
  • Status-based filtering (Success, Failed, PartialSuccess, etc.)
  • Time range filtering with RFC3339 timestamps
  • Label-based filtering with local --labels flag (takes precedence over global flag)
  • Owner and backup object type filtering

The command automatically determines the mode based on the provided parameters and supports both CLI flags and JSON file input for complex configurations.

Examples:

# Get details of a specific restore by name
pxb get restore --name my-restore

# Get details of a specific restore by UID
pxb get restore --uid restore-12345

# List all restores with default pagination
pxb get restore

# List restores with custom pagination and filtering
pxb get restore --max-objects 50 --owners user1,user2

# List restores with pagination (second page)
pxb get restore --max-objects 50 --object-index 50

# List restores with sorting
pxb get restore --sort-by CreationTimestamp --sort-order Descending

# List restores without detailed resources (faster)
pxb get restore --include-detailed-resources=false --max-objects 200

# List VM restores only
pxb get restore --backup-object-type VirtualMachine

# Filter restores by name pattern
pxb get restore --name-filter "prod-"

# Filter restores by cluster name
pxb get restore --cluster-name-filter "production"

# Filter restores by status
pxb get restore --status Success,PartialSuccess

# Filter restores by time range (last 24 hours)
pxb get restore --start-time "2024-01-01T00:00:00Z" --end-time "2024-01-02T00:00:00Z"

# Filter restores by labels (using local flag)
pxb get restore --labels env=production,team=backend

# Combine multiple filters
pxb get restore --name-filter "app-" --status Success --cluster-name-filter "prod" --max-objects 20

# Get restores from JSON configuration file
pxb get restore --file /path/to/get-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--backup-object-typestringFilter by backup object type: 'All' or 'VirtualMachine'-Optional
--cluster-name-filterstringFilter restores by cluster name pattern (substring match)-Optional
--cluster-uid-filterstringFilter restores by cluster UID-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--end-timestringFilter restores created before this time (RFC3339 format: 2024-01-07T23:59:59Z)-Optional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringYAML/JSON file containing complete restore get configuration-Optional
--include-detailed-resourcesboolInclude detailed resource information in outputtrueOptional
--labelsstringToStringFilter restores by labels (key=value,key2=value2)[]Optional
--max-objectsuint64Maximum number of restores to return100Optional
--name, -nstringName of the restore to inspect-Optional
--name-filterstringFilter restores by name pattern (substring match)-Optional
--object-indexuint64Starting index for pagination (0-based)0Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--ownersstringArrayFilter by restore owners (comma-separated usernames)[]Optional
--sort-bystringSort restores by field (Name, CreationTimestamp)-Optional
--sort-orderstringSort order (Ascending, Descending)-Optional
--start-timestringFilter restores created after this time (RFC3339 format: 2024-01-01T00:00:00Z)-Optional
--statusstringArrayFilter by restore status: Success, Failed, PartialSuccess, Aborted, InProgress, Invalid[]Optional
--tls-certificatestringtls certificate-Optional
--uidstringUID of the restore to inspect-Optional

px pxb get role

Get role details or list multiple roles.

This command can operate in two modes:

  1. INSPECT MODE: When --name or --uid is specified, it retrieves detailed information about a specific role
  2. ENUMERATE MODE: When no specific role is specified, it lists multiple roles with filtering and sorting options

The command automatically determines the mode based on the provided parameters.

Examples:

# Get details of a specific role by name
pxb get role --name my-role

# Get details of a specific role by UID
pxb get role --uid role-12345

# List all roles with default pagination
pxb get role

# List roles with custom pagination and filtering
pxb get role --max-objects 50 --owners user1,user2

# List roles with sorting
pxb get role --sort-by CreationTimestamp --sort-order Descending

# List roles without detailed rules information (faster)
pxb get role --include-rules=false --max-objects 200

# Get roles from JSON configuration file
pxb get role --file /path/to/get-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringJSON file containing complete role get configuration-Optional
--include-rulesboolInclude detailed rules information in outputtrueOptional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objectsuint64Maximum number of roles to return100Optional
--name, -nstringName of the role to inspect-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--ownersstringSliceFilter roles by owners (comma-separated)[]Optional
--sort-bystringSort roles by field (Name, CreationTimestamp, LastUpdateTimestamp)-Optional
--sort-orderstringSort order (Ascending, Descending)-Optional
--tls-certificatestringtls certificate-Optional
--uidstringUID of the role to inspect-Optional

px pxb get rule

Get rule details or list multiple rules.

This command can operate in two modes:

  1. INSPECT MODE: When --name or --uid is specified, it retrieves detailed information about a specific rule
  2. ENUMERATE MODE: When no specific rule is specified, it lists multiple rules with filtering and sorting options

The command automatically determines the mode based on the provided parameters.

Examples:

# Get details of a specific rule by name
pxb get rule --name my-rule

# Get details of a specific rule by UID
pxb get rule --uid rule-12345

# List all rules with default pagination
pxb get rule

# List rules with custom pagination and filtering
pxb get rule --max-objects 50 --owners user1,user2

# List rules with sorting
pxb get rule --sort-by CreationTimestamp --sort-order Descending

# List rules without detailed rules information (faster)
pxb get rule --include-rules-info=false --max-objects 200

# Get rules from JSON configuration file
pxb get rule --file /path/to/get-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringYAML/JSON file containing complete rule get configuration-Optional
--include-rules-infoboolInclude detailed rules information in outputtrueOptional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objectsuint64Maximum number of rules to return100Optional
--name, -nstringName of the rule to inspect-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--ownersstringSliceFilter rules by owners (comma-separated)[]Optional
--sort-bystringSort rules by field (Name, CreationTimestamp, LastUpdateTimestamp)-Optional
--sort-orderstringSort order (Ascending, Descending)-Optional
--tls-certificatestringtls certificate-Optional
--uidstringUID of the rule to inspect-Optional

px pxb get schedulepolicy

Get schedule policies from the system.

When name or UID is provided, performs an inspect operation to get detailed information about a specific schedule policy. Otherwise, enumerates all schedule policies that match the specified criteria.

The command supports both CLI flags and JSON file input for complex configurations.

Examples:

# List all schedule policies
pxb get schedulepolicy

# Get a specific schedule policy by name
pxb get schedulepolicy --name my-policy

# Get a specific schedule policy by UID (inspect mode)
pxb get schedulepolicy --uid policy-uid-123

# List schedule policies with specific labels
pxb get schedulepolicy --labels "env=production,team=platform"

# Get schedule policies from JSON configuration file
pxb get schedulepolicy --file /path/to/get-config.json

# Filter with labels from file
pxb get schedulepolicy --labels-file /path/to/labels.json

# Get schedule policies in JSON format
pxb get schedulepolicy --output json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringJSON file containing complete schedule policy get configuration-Optional
--labelsstringToStringFilter schedule policies by labels (format: key1=value1,key2=value2)[]Optional
--labels-filestringJSON file containing labels configuration for filtering-Optional
--name, -nstringName of the schedule policy to get (if combined with --uid, performs inspect)-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--tls-certificatestringtls certificate-Optional
--uid, -ustringUID of the schedule policy to inspect-Optional

px pxb get volumeresourceonlypolicy

Get volume resource only policy details or list multiple policies.

This command can operate in two modes:

  1. INSPECT MODE: When --name and --uid are specified, it retrieves detailed information about a specific policy
  2. ENUMERATE MODE: When no specific policy is specified, it lists multiple policies with filtering and sorting options

Volume resource only policies define which volume types should have their data skipped during backup operations.

The command supports both CLI flags and YAML/JSON file input for complex configurations.

Examples:

# List all volume resource only policies
pxb get volumeresourceonlypolicy

# Get specific policy by name and UID
pxb get volumeresourceonlypolicy --name my-policy --uid policy-12345

# List policies with custom output format
pxb get volumeresourceonlypolicy --output json

# List policies with sorting
pxb get volumeresourceonlypolicy --sort-by Name --sort-order Ascending

# List policies with labels filter
pxb get volumeresourceonlypolicy --labels "env=prod,team=platform"

# List limited number of policies
pxb get volumeresourceonlypolicy --max-objects 10

# Get policies from JSON configuration file
pxb get volumeresourceonlypolicy --file /path/to/get-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--end-timestringFilter by end time (RFC3339 format, e.g., 2024-12-31T23:59:59Z)-Optional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringYAML/JSON file containing complete volume resource only policy get configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--max-objectsuint64Maximum number of policies to return (0 = no limit)0Optional
--name, -nstringName of the volume resource only policy to inspect-Optional
--name-filterstringFilter policies by name (substring match)-Optional
--object-indexuint64Starting index for pagination (0-based)0Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--sort-bystringSort by field: CreationTimestamp, Name, LastUpdateTimestamp-Optional
--sort-orderstringSort order: Ascending, Descending-Optional
--start-timestringFilter by start time (RFC3339 format, e.g., 2024-01-01T00:00:00Z)-Optional
--tls-certificatestringtls certificate-Optional
--uidstringUID of the volume resource only policy to inspect-Optional
--volume-types-filterstringSliceFilter by volume types: pxd, csi, nfs[]Optional