Skip to main content

px pxb delete

Delete 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 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

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--cluster-namestringName of cluster to perform deletion through-Optional
--cluster-uidstringUID of cluster to perform deletion through-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringYAML/JSON file containing backup delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the backup to delete-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 backup to delete (optional, can be used with name for precise identification)-Optional

px pxb delete backuplocation

Delete 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 backup location (required, optional with --file)-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 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

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--backup-object-typestringDelete schedules by backup object type: NS|VM|All-Optional
--bulk-uid-check-relaxationboolRelax UID check for bulk operations when using name-only references (e.g., policy-refs with name only)falseOptional
--cluster-scopestringCluster scope: All | name[:uid][,name2[:uid2]...]-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--exclude-filterstringExclude filter (regex) for bulk deletion; mutually exclusive with --exclude-objects-Optional
--exclude-objectsstringSliceExclude specific backup schedules by name or name:uid (comma-separated) from bulk deletion[]Optional
--forceboolForce deletion even if schedule is in usefalseOptional
--include-filterstringInclude filter (regex) for bulk deletion; mutually exclusive with --include-objects-Optional
--include-objectsstringSliceInclude specific backup schedules by name or name:uid (comma-separated) for bulk deletion[]Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the backup schedule to delete-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--policy-refsstringSliceDelete schedules by schedule policy references (name or name:uid)[]Optional
--tls-certificatestringtls certificate-Optional
--uid, -ustringUID 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

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 cloud credential delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the cloud credential (required)-Yes
--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 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

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--delete-all-cluster-backupsboolDelete all backups on the cluster (SuperAdmin only)falseOptional
--delete-restoresboolDelete restores related to the clusterfalseOptional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--forceboolForce deletion without confirmation promptfalseOptional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the cluster (required)-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 (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

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 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

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 delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the receiver to delete (required, optional with --file)-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 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

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 delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the recipient to delete-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 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

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 restore delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the restore to delete-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 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

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 delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the role to delete-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 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

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 delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the rule to delete-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 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

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 delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the schedule policy to delete-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 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

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 volume resource only policy delete configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the volume resource only policy-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 volume resource only policy (optional, can be used with name for precise identification)-Optional