px pxb delete
Delete px-backup resources
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 delete backup
Delete a backup and its associated resources.
This command queues a backup for deletion. The backup will be removed from the backup location and all associated metadata will be cleaned up. You can identify the backup by name or UID. Optionally, you can specify which cluster should perform the deletion operation.
Examples:
# Delete backup by name
pxb delete backup --name my-backup
# Delete backup by UID
pxb delete backup --uid backup-12345
# Delete backup through specific cluster
pxb delete backup --name my-backup --cluster-name production-cluster
# Delete backup with cluster UID specification
pxb delete backup --name my-backup --cluster-uid cluster-67890
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--cluster-name | string | Name of cluster to perform deletion through | - | Optional |
--cluster-uid | string | UID of cluster to perform deletion through | - | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--file, -f | string | YAML/JSON file containing backup delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the backup to delete | - | 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 backup to delete (optional, can be used with name for precise identification) | - | Optional |
px pxb delete backuplocation
Delete 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 backup location (required, optional with --file) | - | 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 backup location (optional, can be used with name for precise identification) | - | Optional |
px pxb delete backupschedule
Delete one or more backup schedules.
This command can delete a specific backup schedule by name and UID, or perform bulk deletion using various filtering options. When deleting schedules, you can choose whether to also delete the associated backups that were created by the schedule.
Examples:
# Delete a specific backup schedule (single delete)
pxb delete backupschedule --name my-schedule --uid 1111-2222
# Bulk delete by explicit objects (name:uid pairs)
pxb delete backupschedule --include-objects "sched-a:aaaa,sched-b:bbbb"
# Bulk delete using name filters (regex)
pxb delete backupschedule --include-filter ".*test.*" --exclude-filter "^keep-"
# Bulk delete by policy references (name:uid)
pxb delete backupschedule --policy-refs "daily:pppp,weekly:qqqq" --backup-object-type All --cluster-scope All --include-filter "*"
# Bulk delete across all clusters for all object types
pxb delete backupschedule --backup-object-type All --cluster-scope All --include-filter "*"
# Bulk delete within specific clusters (list of refs)
pxb delete backupschedule --backup-object-type All --cluster-scope "cluster1:cccc,cluster2:dddd" --include-filter "*"
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--backup-object-type | string | Delete schedules by backup object type: NS|VM|All | - | Optional |
--bulk-uid-check-relaxation | bool | Relax UID check for bulk operations when using name-only references (e.g., policy-refs with name only) | false | Optional |
--cluster-scope | string | Cluster scope: All | name[:uid][,name2[:uid2]...] | - | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--exclude-filter | string | Exclude filter (regex) for bulk deletion; mutually exclusive with --exclude-objects | - | Optional |
--exclude-objects | stringSlice | Exclude specific backup schedules by name or name:uid (comma-separated) from bulk deletion | [] | Optional |
--force | bool | Force deletion even if schedule is in use | false | Optional |
--include-filter | string | Include filter (regex) for bulk deletion; mutually exclusive with --include-objects | - | Optional |
--include-objects | stringSlice | Include specific backup schedules by name or name:uid (comma-separated) for bulk deletion | [] | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the backup schedule to delete | - | 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 |
--policy-refs | stringSlice | Delete schedules by schedule policy references (name or name:uid) | [] | Optional |
--tls-certificate | string | tls certificate | - | Optional |
--uid, -u | string | UID of the backup schedule to delete | - | Optional |
px pxb delete cloudcredential
Delete a cloud credential and remove it from the system.
This command permanently removes a cloud credential from the system. Once deleted, the credential cannot be recovered and any backups or operations using this credential will fail until a new credential is configured.
The command supports both CLI flags and JSON file input for complex configurations.
Examples:
# Delete cloud credential by name
pxb delete cloudcredential --name aws-cred
# Delete cloud credential by name and UID
pxb delete cloudcredential --name aws-cred --uid cred-12345
# Delete from configuration file
pxb delete cloudcredential --file /path/to/cloud-credential-delete-config.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 |
--file | string | Path to YAML/JSON file containing cloud credential delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the cloud credential (required) | - | Yes |
--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 cloud credential (optional, can be used with name for precise identification) | - | Optional |
px pxb delete cluster
Delete a cluster with options to handle associated backups and restores.
Examples:
# Delete cluster (basic)
pxb delete cluster --name my-cluster
# Delete cluster by UID
pxb delete cluster --uid cluster-12345-abcde
# Delete cluster and associated restores
pxb delete cluster --name my-cluster --delete-restores
# Delete cluster and all associated backups (SuperAdmin only)
pxb delete cluster --name my-cluster --delete-all-cluster-backups
# Force delete without confirmation
pxb delete cluster --name my-cluster --force
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--delete-all-cluster-backups | bool | Delete all backups on the cluster (SuperAdmin only) | false | Optional |
--delete-restores | bool | Delete restores related to the cluster | false | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--force | bool | Force deletion without confirmation prompt | false | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the cluster (required) | - | 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, -u | string | UID of the cluster (optional, can be used with name for precise identification) | - | Optional |
px pxb delete context
Delete a context from ~/.pxb/config. Cannot delete the last remaining context.
Examples:
# Delete a context
pxb delete context dev
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 |
px pxb delete receiver
Delete a receiver.
This command deletes a receiver configuration. The receiver is identified by name (--name required) and you may optionally provide --uid. Once deleted, the receiver will no longer be able to send alert notifications.
The command supports both CLI flags and JSON file input for complex configurations.
Examples:
# Delete a receiver by name and UID
pxb delete receiver --name smtp-alerts --uid receiver-12345
# Delete with confirmation
pxb delete receiver --name production-alerts --uid receiver-67890
# Delete from JSON configuration file
pxb delete receiver --file /path/to/delete-config.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 |
--file | string | YAML/JSON file containing complete receiver delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the receiver to delete (required, optional with --file) | - | 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 receiver to delete (optional, can be used with name for precise identification) | - | Optional |
px pxb delete recipient
Delete a recipient.
This command deletes a recipient configuration. The recipient is identified by name (--name required) and you may optionally provide --uid. Once deleted, the recipient will no longer receive alert notifications.
The command supports both CLI flags and YAML/JSON file input for complex configurations.
Examples:
# Delete a recipient by name and UID
pxb delete recipient --name critical-alerts --uid recipient-12345
# Delete with confirmation
pxb delete recipient --name team-alerts --uid recipient-67890
# Delete from JSON configuration file
pxb delete recipient --file /path/to/delete-config.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 |
--file, -f | string | YAML/JSON file containing complete recipient delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the recipient to delete | - | 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 recipient to delete (optional, can be used with name for precise identification) | - | Optional |
px pxb delete restore
Delete a restore.
This command deletes a restore operation. Note that deleting a restore does not undo the restore operation - it only removes the restore record from px-backup. The restored resources will remain in the target cluster.
The command supports both CLI flags and JSON file input for complex configurations.
Examples:
# Delete a restore by name
pxb delete restore --name my-restore
# Delete a restore by UID
pxb delete restore --uid restore-12345
# Delete from JSON configuration file
pxb delete restore --file /path/to/delete-config.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 |
--file, -f | string | YAML/JSON file containing complete restore delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the restore to delete | - | 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 restore to delete (optional, can be used with name for precise identification) | - | Optional |
px pxb delete role
Delete a role.
This command deletes a role that was previously created for access control in px-backup. The role must be identified by either name or UID. Note that roles currently assigned to users cannot be deleted.
Examples:
# Delete a role by name
pxb delete role --name my-role
# Delete a role by UID
pxb delete role --uid role-12345
# Delete from JSON configuration file
pxb delete role --file /path/to/delete-config.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 |
--file, -f | string | JSON file containing complete role delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the role to delete | - | 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 role to delete | - | Optional |
px pxb delete rule
Delete a rule.
This command deletes a rule that was previously created for pre/post backup execution. The rule must be identified by either name or UID. Note that rules currently in use by backup schedules or backup operations cannot be deleted.
Examples:
# Delete a rule by name
pxb delete rule --name my-rule
# Delete a rule by UID
pxb delete rule --uid rule-12345
# Delete a rule by name with confirmation
pxb delete rule --name my-rule --confirm
# Delete from JSON configuration file
pxb delete rule --file /path/to/delete-config.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 |
--file, -f | string | YAML/JSON file containing complete rule delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the rule to delete | - | 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 rule to delete | - | Optional |
px pxb delete schedulepolicy
Delete an existing schedule policy from the system.
This operation will permanently remove the schedule policy. Make sure no backup schedules are currently using this policy before deletion.
The command supports both CLI flags and JSON file input for complex configurations.
Examples:
# Delete a schedule policy by name
pxb delete schedulepolicy --name my-policy
# Delete a schedule policy by name and UID for additional safety
pxb delete schedulepolicy --name my-policy --uid policy-uid-123
# Delete from JSON configuration file
pxb delete schedulepolicy --file /path/to/delete-config.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 |
--file, -f | string | JSON file containing complete schedule policy delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the schedule policy to delete | - | 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, -u | string | UID of the schedule policy to delete (optional, can be used with name for precise identification) | - | Optional |
px pxb delete volumeresourceonlypolicy
Delete a volume resource only policy.
This command removes a volume resource only policy from the system. The policy will be deleted only if it's not currently in use by any backup or backup schedule operations. The policy is identified by name (--name required), and you may optionally provide --uid.
The command supports both CLI flags and YAML/JSON file input for complex configurations.
Examples:
# Delete policy by name
pxb delete volumeresourceonlypolicy --name my-policy
# Delete policy by name and UID
pxb delete volumeresourceonlypolicy --name my-policy --uid policy-12345
# Delete from YAML/JSON configuration file
pxb delete volumeresourceonlypolicy --file /path/to/delete-config.yaml
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 |
--file, -f | string | YAML/JSON file containing complete volume resource only policy delete configuration | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the volume resource only policy | - | 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 volume resource only policy (optional, can be used with name for precise identification) | - | Optional |