px pxb share
Share resources with users and groups
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 share backup
Update backup sharing permissions for specific users and groups.
This command allows you to grant or revoke different levels of access to backups:
- View: Read-only access to backup information
- Restorable: View access plus ability to restore from the backup
- FullAccess: Complete administrative access including delete and modify operations
The command supports both CLI flags and JSON file input for complex configurations.
Examples:
# Add groups with different access levels
pxb share backup --name my-backup --uid backup-12345 --add-groups "team1=View,team2=Restorable,admin-team=FullAccess"
# Add collaborators with access levels
pxb share backup --name my-backup --uid backup-12345 --add-collaborators "user-123=View,user-456=FullAccess"
# Remove specific groups and collaborators
pxb share backup --name my-backup --uid backup-12345 --remove-groups team1,team2 --remove-collaborators user-123
# Update from JSON configuration file
pxb share backup --file /path/to/backup-share-config.json
# Comprehensive sharing update
pxb share backup --name my-backup --uid backup-12345 --add-groups "devops=FullAccess" --add-collaborators "admin-user-789=FullAccess" --remove-groups old-team
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--add-collaborators | stringToString | Add collaborators with access levels (format: user-123=View,user-456=FullAccess) | [] | Optional |
--add-groups | stringToString | Add groups with access levels (format: group1=View,group2=Restorable,group3=FullAccess) | [] | Optional |
--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 backup share 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 (required, optional with --file) | - | 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 |
--remove-collaborators | stringSlice | Remove collaborators from backup access (list of user IDs) | [] | Optional |
--remove-groups | stringSlice | Remove groups from backup access (list of group IDs) | [] | Optional |
--tls-certificate | string | tls certificate | - | Optional |
--uid, -u | string | UID of the backup | - | Optional |
px pxb share cluster
Share a cluster with users and groups, optionally including cluster backups.
Examples:
# Share cluster with users
pxb share cluster --cluster my-cluster --cluster-uid cluster-123 --users user-123,user-456
# Share cluster with groups
pxb share cluster --cluster my-cluster --cluster-uid cluster-123 --groups team1,team2
# Share cluster with users and groups, including backups
pxb share cluster --cluster my-cluster --cluster-uid cluster-123 --users user-123 --groups team1 --share-cluster-backups
# Share cluster from JSON file
pxb share cluster --file cluster-share-config.json
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--cluster, -c | string | Name of the cluster | - | Optional |
--cluster-uid, -u | string | UID of the cluster (optional) | - | 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 cluster share configuration | - | Optional |
--groups | stringSlice | Group IDs to share the cluster with (comma-separated) | [] | 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 |
--share-cluster-backups | bool | Also share existing backups on this cluster with the users/groups | false | Optional |
--tls-certificate | string | tls certificate | - | Optional |
--users | stringSlice | User IDs to share the cluster with (comma-separated) | [] | Optional |