### Install Portworx Backup with Istio Source: https://docs.portworx.com/portworx-backup-on-prem/install/install/non-airgapped/non-airgapped-install Example Helm install command for environments with Istio enabled. Do not use the --no-hooks flag. ```bash helm install px-central charts/px-central --namespace central --version 2.11.0 --set persistentStorage.enabled=true,persistentStorage.storageClassName="",pxbackup.enabled=true,istio.enabled=true ``` -------------------------------- ### Witness installation output Source: https://docs.portworx.com/portworx-enterprise/operations/disaster-recovery/px-metro/witness-node-setup Example output indicating successful operation of the witness node. ```text Status: PX is operational Telemetry: Disabled or Unhealthy Metering: Disabled or Unhealthy License: Trial (expires in 30 days) .. .... ``` -------------------------------- ### InstallApplication API Request Payload Source: https://docs.portworx.com/portworx-data-services/pds-api-tcapplication Example request body for installing an application, including meta, config, and status objects. ```json { "meta": { "uid": "string", "name": "string", "description": "string", "resourceVersion": "string", "labels": { "property1": "string", "property2": "string" }, "annotations": { "property1": "string", "property2": "string" }, "parentReference": { "type": "string", "version": "string", "uid": "string" } }, "config": { "pds": { "global": { "dataServiceTlsEnabled": true } } }, "status": { "version": "string", "phase": "PHASE_UNSPECIFIED", "health": "HEALTH_UNSPECIFIED", "conditions": { "property1": "string", "property2": "string" } } } ``` -------------------------------- ### Apply Multipath and Udev Configurations with CloudInitConfig Source: https://docs.portworx.com/portworx-enterprise/platform/install/suse-virtualization This CloudInitConfig example demonstrates how to add Udev rules and multipath configuration files to a SUSE Virtualization environment. It also ensures the multipathd service is enabled and started. ```yaml apiVersion: node.harvesterhci.io/v1beta1 kind: CloudInit metadata: name: spec: contents: | stages: network: - name: "Configure Everpure" files: - path: /etc/udev/rules.d/99-pure-storage.rules permissions: 0644 content: | - path: /etc/multipath.conf content: | permissions: 0644 - name: "Start multipathd service" systemctl: enable: - multipathd start: - multipathd filename: 99_multipathd.yaml matchSelector: {} ``` -------------------------------- ### Example Portworx Service Output (OpenShift) Source: https://docs.portworx.com/portworx-enterprise/operations/disaster-recovery/async-dr/prepare-px-cluster This is an example output of the 'oc get service' command, showing a Portworx service configured as a LoadBalancer with its assigned external IP and ports on OpenShift. ```text NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE portworx-service LoadBalancer 10.233.56.13 192.0.2.10 9001:30278/TCP,9020:30908/TCP,9021:32598/TCP 18h ``` -------------------------------- ### Install Helm Source: https://docs.portworx.com/portworx-backup-on-prem/install/install/non-airgapped/pre-install Download and install the Helm CLI tool on a local machine. ```bash curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 chmod 700 get_helm.sh ./get_helm.sh ``` -------------------------------- ### Retrieve and list backup resources using pxb Source: https://docs.portworx.com/px-cli/px-pxb/get Examples of using the pxb get backup command to inspect specific backups or list them with various filters, pagination, and sorting options. ```bash # 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 ``` -------------------------------- ### Install witness node Source: https://docs.portworx.com/portworx-enterprise/operations/disaster-recovery/px-metro/witness-node-setup Execute the installation script with the cluster ID, etcd endpoints, and version parameters. ```bash bash witness-install.sh --cluster-id="" \ --etcd="etcd:http://:2379,etcd:http://:2379,etcd:http://:2379" \ --docker-image=portworx/px-enterprise:"" ``` -------------------------------- ### ApplicationRegistrations output example Source: https://docs.portworx.com/portworx-enterprise/deploy-your-applications/stateful-applications/application-registration Example output showing the list of default ApplicationRegistrations with their respective kinds and versions. ```text NAME KIND CRD-NAME VERSION SUSPEND-OPTIONS KEEP-STATUS adminnetworkpolicy AdminNetworkPolicy policy.networking.k8s.io v1alpha1 false alertmanager Alertmanager monitoring.coreos.com v1 false alertmanagerconfig AlertmanagerConfig monitoring.coreos.com v1alpha1 false bgpconfiguration BGPConfiguration crd.projectcalico.org v1 false bgpfilter BGPFilter crd.projectcalico.org v1 false bgppeer BGPPeer crd.projectcalico.org v1 false blockaffinity BlockAffinity crd.projectcalico.org v1 false caliconodestatus CalicoNodeStatus crd.projectcalico.org v1 false clusterinformation ClusterInformation crd.projectcalico.org v1 false felixconfiguration FelixConfiguration crd.projectcalico.org v1 false globalnetworkpolicy GlobalNetworkPolicy crd.projectcalico.org v1 false globalnetworkset GlobalNetworkSet crd.projectcalico.org v1 false hostendpoint HostEndpoint crd.projectcalico.org v1 false ipamblock IPAMBlock crd.projectcalico.org v1 false ipamconfig IPAMConfig crd.projectcalico.org v1 false ipamhandle IPAMHandle crd.projectcalico.org v1 false ippool IPPool crd.projectcalico.org v1 false ipreservation IPReservation crd.projectcalico.org v1 false kubecontrollersconfiguration KubeControllersConfiguration crd.projectcalico.org v1 false networkpolicy NetworkPolicy crd.projectcalico.org v1 false networkset NetworkSet crd.projectcalico.org v1 false podmonitor PodMonitor monitoring.coreos.com v1 false portworxdiag PortworxDiag portworx.io v1 false probe Probe monitoring.coreos.com v1 false prometheus Prometheus monitoring.coreos.com v1 spec.replicas,int false prometheusrule PrometheusRule monitoring.coreos.com v1 false servicemonitor ServiceMonitor monitoring.coreos.com v1 false thanosruler ThanosRuler monitoring.coreos.com v1 false tier Tier crd.projectcalico.org v1 false volumeplacementstrategy VolumePlacementStrategy portworx.io v1beta2 false volumeplacementstrategy VolumePlacementStrategy portworx.io v1beta1 false volumesnapshot VolumeSnapshot snapshot.storage.k8s.io v1 false volumesnapshot VolumeSnapshot snapshot.storage.k8s.io v1beta1 false volumesnapshotclass VolumeSnapshotClass snapshot.storage.k8s.io v1 false volumesnapshotclass VolumeSnapshotClass snapshot.storage.k8s.io v1beta1 false volumesnapshotcontent VolumeSnapshotContent snapshot.storage.k8s.io v1 false ``` -------------------------------- ### Configure and start license server Source: https://docs.portworx.com/portworx-enterprise/reference/cli/lsctl/manual-install Defines the docker-compose service configuration and starts the container. ```yaml # update image version below with current $latest_stable version: '2.2' services: px-els-main: container_name: px-els image: portworx/px-els:1.0.0 # command: -air-gapped -nic eth0 -extl-port 7070 # command: -enable-ssl -ssl-certs /ssl/server-bundle.crt -ssl-key /ssl/server.key privileged: true network_mode: host restart: always volumes: - /opt/pwx-ls/bin:/export_bin - /var/lib/pwx-ls:/data - /proc:/hostproc - /opt/pwx-ls/ssl:/ssl healthcheck: test: ["CMD", "curl", "-fI", "http://127.0.0.1:7069/api/1.0/instances/~/health"] interval: 2m30s timeout: 30s retries: 3 ``` ```bash docker-compose up -d ``` ```text Creating px-els ... done ``` -------------------------------- ### Example Helm Values Configuration Source: https://docs.portworx.com/portworx-central-on-prem/upgrade/px-backup This is an example of the `values.yaml` file. Customize fields like `persistentStorage.storageClassName` and `pxbackup.orgName`. ```yaml oidc: centralOIDC: defaultPassword: examplePassword defaultUsername: exampleUser operatorToChartUpgrade: true persistentStorage: enabled: true storageClassName: px-sc pxbackup: orgName: exampleOrg pxcentralDBPassword: exampleDbPassword ``` -------------------------------- ### SDK Version Response Example Source: https://docs.portworx.com/portworx-enterprise/reference/developer-sdk Example JSON output returned by the version identity endpoint. ```json {"sdk_version":{"minor":101,"patch":34,"version":"0.101.34"}... ``` -------------------------------- ### Azure CLI Output Example Source: https://docs.portworx.com/portworx-enterprise/platform/secure/key-management/azure-kv Example output containing credentials generated after service principal creation. ```json Creating 'Contributor' role assignment under scope '/subscriptions/' The output includes credentials that you must protect. Be sure that you do not include these credentials in your code or check the credentials into your source control. For more information, see https://aka.ms/azadsp-cli { "appId": "xxxxxxxx-63xx-4axx-86xx-xxxd9ad33xxx", "displayName": "", "password": "_5j8Q~-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxdhY", "tenant": "xxxxxxxx-f4b7-xxxx-bexx-773895b9xxxx" } ``` -------------------------------- ### Install Application Source: https://docs.portworx.com/portworx-data-services/pds-api-tcapplication Installs a specified application on the target cluster. ```APIDOC ## POST /core/v1/clusters/{clusterId}/applications ### Description Installs a specified application on the target cluster. ### Method POST ### Endpoint /core/v1/clusters/{clusterId}/applications ### Parameters #### Path Parameters - **clusterId** (string) - Required - Unique identifier of the cluster where the application needs to be installed. #### Request Body - **meta** (object) - Required - Metadata for the application. - **uid** (string) - Optional - Unique identifier. - **name** (string) - Optional - Name of the application. - **description** (string) - Optional - Description of the application. - **resourceVersion** (string) - Optional - Resource version. - **labels** (object) - Optional - Key-value pairs for labels. - **property1** (string) - Optional - Example label property. - **property2** (string) - Optional - Example label property. - **annotations** (object) - Optional - Key-value pairs for annotations. - **property1** (string) - Optional - Example annotation property. - **property2** (string) - Optional - Example annotation property. - **parentReference** (object) - Optional - Reference to the parent resource. - **type** (string) - Optional - Type of the parent resource. - **version** (string) - Optional - Version of the parent resource. - **uid** (string) - Optional - UID of the parent resource. - **config** (object) - Required - Desired configuration of the Application. - **pds** (object) - Optional - PDS configuration. - **global** (object) - Optional - Global PDS settings. - **dataServiceTlsEnabled** (boolean) - Optional - Enables or disables data service TLS. - **status** (object) - Required - Status of the Application. - **version** (string) - Optional - Status version. - **phase** (string) - Optional - Current phase of the application (e.g., PHASE_UNSPECIFIED). - **health** (string) - Optional - Health status of the application (e.g., HEALTH_UNSPECIFIED). - **conditions** (object) - Optional - Conditions related to the application status. - **property1** (string) - Optional - Example condition property. - **property2** (string) - Optional - Example condition property. ### Request Example ```json { "meta": { "uid": "string", "name": "string", "description": "string", "resourceVersion": "string", "labels": { "property1": "string", "property2": "string" }, "annotations": { "property1": "string", "property2": "string" }, "parentReference": { "type": "string", "version": "string", "uid": "string" } }, "config": { "pds": { "global": { "dataServiceTlsEnabled": true } } }, "status": { "version": "string", "phase": "PHASE_UNSPECIFIED", "health": "HEALTH_UNSPECIFIED", "conditions": { "property1": "string", "property2": "string" } } } ``` ### Response #### Success Response (200) - **meta** (object) - Metadata of the installed application. - **config** (object) - Configuration of the installed application. - **status** (object) - Status of the installed application. #### Response Example ```json { "meta": { "uid": "string", "name": "string", "description": "string", "resourceVersion": "string", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z", "labels": { "property1": "string", "property2": "string" }, "annotations": { "property1": "string", "property2": "string" }, "parentReference": { "type": "string", "version": "string", "uid": "string" }, "resourceNames": { "property1": "string", "property2": "string" } }, "config": { "namespace": "string", "version": "string", "pds": { "global": { "dataServiceTlsEnabled": true } } }, "status": { "version": "string", "phase": "PHASE_UNSPECIFIED", "health": "HEALTH_UNSPECIFIED", "conditions": { "property1": "string", "property2": "string" } } } ``` ``` -------------------------------- ### Stork Pod Status Example (Kubernetes) Source: https://docs.portworx.com/portworx-enterprise/operations/migration/cluster-admin-namespace Example output showing Stork pods running in Kubernetes. ```text NAME READY STATUS RESTARTS AGE stork-6fdd7d567b-4w86q 1/1 Running 0 63s stork-6fdd7d567b-lj47r 1/1 Running 0 60s stork-6fdd7d567b-m6pk7 1/1 Running 0 59s ``` -------------------------------- ### StorageCluster Configuration Example Source: https://docs.portworx.com/portworx-enterprise/platform/upgrade/airgap-upgrade Example YAML configuration for a StorageCluster resource with optional smart upgrade settings. ```yaml apiVersion: core.libopenstorage.org/v1 kind: StorageCluster metadata: name: portworx namespace: spec: image: portworx/oci-monitor: # For smart upgrades, ensure that the below lines are uncommented and `disruption.allow` is set to false. You can use the `maxUnavailable` field to control the maximum number of Portworx nodes that can be upgraded at a time. #updateStrategy: # type: RollingUpdate # rollingUpdate: # maxUnavailable: 5 # minReadySeconds: 0 # disruption: # allow: false ``` -------------------------------- ### Start and Verify License Server Source: https://docs.portworx.com/portworx-enterprise/reference/cli/lsctl/install-backup-server Commands to launch the container and monitor logs for successful startup. ```bash docker-compose up -d ``` ```text Creating px-els ... done ``` ```bash docker-compose logs -f ``` ```text Attaching to px-els-backup ... time="2022-12-14T08:23:43Z" level=info msg="License server RUNNING as PxProxyServer{id=0xc0001a4f30,ver=px-els/2.3.2-0-g64173d7,addr=:7070,SSL=false} ..." ``` -------------------------------- ### Vault KV Get Output Example Source: https://docs.portworx.com/portworx-enterprise/platform/install/pure-storage/flashblade/prepare This is an example of the expected output when successfully retrieving the 'pureJson' secret. It shows the structure of the JSON data stored. ```text ========== Data ========== Key Value --- ----- pure.json { "FlashBlades": [ { "MgmtEndPoint": "FB end point", "APIToken": "", "NFSEndPoint": "" } ] } ``` -------------------------------- ### Restore Kubernetes Resources with pxb Source: https://docs.portworx.com/px-cli/px-pxb/create Examples demonstrating various restore scenarios including namespace mapping, resource replacement, and file-based configuration. ```bash # Create a simple restore from backup pxb create restore --name my-restore --backup-name my-backup --cluster target-cluster # Create a restore with namespace mapping pxb create restore --name my-restore --backup-name my-backup --cluster target-cluster --namespace-mapping "source-ns=target-ns,app-ns=new-app-ns" # Create a restore with resource replacement pxb create restore --name my-restore --backup-name my-backup --cluster target-cluster --replace-policy Delete # Create a restore from JSON file pxb create restore --name my-restore --file /path/to/restore.json # Create a VM restore with specific resources pxb create restore --name vm-restore --backup-name vm-backup --cluster target-cluster --backup-object-type VirtualMachine # Create a restore with storage class mapping pxb create restore --name my-restore --backup-name my-backup --cluster target-cluster --storage-class-mapping "old-sc=new-sc" # GRANULAR RESTORE - Namespace filtering # Restore only specific namespaces pxb create restore --name filtered-restore --backup-name my-backup --cluster target-cluster --include-namespaces prod-app,prod-db # Restore namespaces matching a pattern, excluding some pxb create restore --name pattern-restore --backup-name my-backup --cluster target-cluster --namespace-name-pattern "^prod-.*" --exclude-namespaces prod-test # Restore with namespace prefix (requires dynamic filter criteria, not just include-namespaces) pxb create restore --name prefix-restore --backup-name my-backup --cluster target-cluster --namespace-name-pattern "^app.*" --target-namespace-prefix "restored-" # Restore specific resource types from namespaces pxb create restore --name gvk-restore --backup-name my-backup --cluster target-cluster --include-namespaces prod-app --ns-resources apps/v1/Deployment,/v1/Pod # Restore specific resources by name pxb create restore --name resource-restore --backup-name my-backup --cluster target-cluster --ns-include-resources "web-deploy:prod:apps:v1:Deployment,api-svc:prod::v1:Service" # GRANULAR RESTORE - VM filtering # Restore VMs matching a name pattern pxb create restore --name vm-pattern-restore --backup-name vm-backup --cluster target-cluster --vm-name-pattern "^web-.*" # Restore VMs by OS type pxb create restore --name vm-os-restore --backup-name vm-backup --cluster target-cluster --vm-os-names ubuntu,centos # Restore specific VMs (include only) pxb create restore --name vm-include-restore --backup-name vm-backup --cluster target-cluster --include-vms "prod/web-vm-1,prod/web-vm-2" ``` -------------------------------- ### Example StorageClass output Source: https://docs.portworx.com/portworx-enterprise/provision-storage/create-pvcs/create-first-pvc Sample output showing Portworx StorageClasses with their provisioner and configuration details. ```text NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE px-csi-db pxd.portworx.com Delete Immediate true 43d px-csi-db-cloud-snapshot pxd.portworx.com Delete Immediate true 43d px-csi-db-cloud-snapshot-encrypted pxd.portworx.com Delete Immediate true 43d px-csi-db-encrypted pxd.portworx.com Delete Immediate true 43d px-csi-db-local-snapshot pxd.portworx.com Delete Immediate true 43d px-csi-db-local-snapshot-encrypted pxd.portworx.com Delete Immediate true 43d px-csi-replicated pxd.portworx.com Delete Immediate true 43d px-csi-replicated-encrypted pxd.portworx.com Delete Immediate true 43d px-db kubernetes.io/portworx-volume Delete Immediate true 43d px-db-cloud-snapshot kubernetes.io/portworx-volume Delete Immediate true 43d px-db-cloud-snapshot-encrypted kubernetes.io/portworx-volume Delete Immediate true 43d px-db-encrypted kubernetes.io/portworx-volume Delete Immediate true 43d px-db-local-snapshot kubernetes.io/portworx-volume Delete Immediate true 43d px-db-local-snapshot-encrypted kubernetes.io/portworx-volume Delete Immediate true 43d px-replicated kubernetes.io/portworx-volume Delete Immediate true 43d px-replicated-encrypted kubernetes.io/portworx-volume Delete Immediate true 43d stork-snapshot-sc stork-snapshot Delete Immediate true 43d ``` -------------------------------- ### Example Portworx Service Output Source: https://docs.portworx.com/portworx-enterprise/operations/disaster-recovery/async-dr/prepare-px-cluster This is an example output of the 'get service' command, showing a Portworx service configured as a LoadBalancer with its assigned external IP and ports. ```text NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE portworx-service LoadBalancer 10.233.56.13 192.0.2.20 9001:30278/TCP,9020:30908/TCP,9021:32598/TCP 18h ``` -------------------------------- ### Get software version Source: https://docs.portworx.com/portworx-enterprise/reference/cli/service Displays the version information for the installed Portworx software. ```bash pxctl service info ``` ```text PX (OCI) Version: PX (OCI) Build Version: PX Kernel Module Version: ``` -------------------------------- ### Get upgrade help Source: https://docs.portworx.com/portworx-enterprise/reference/cli/basics Display help documentation for upgrade-related commands. ```bash pxctl upgrade --help ``` -------------------------------- ### Initialize PX CLI for Backup Source: https://docs.portworx.com/px-cli/install-px-cli Configure the PX CLI with the necessary API and authentication URLs. ```bash px pxb init config\ --px-backup-api-url http://: \ --pxcentral-auth-url http://: ``` -------------------------------- ### Restore command output Source: https://docs.portworx.com/portworx-enterprise/reference/cli/cloud-snaps Example output confirming the start of a restore operation. ```text Cloudsnap restore started successfully on volume: 104172750626071399 with task name:xxxxxxxx-xxxx-xxxx-xxxx-f37b327d9225 ``` -------------------------------- ### Create and Label Namespaces Example Source: https://docs.portworx.com/portworx-backup-on-prem/use-px-backup/labels/namespace-labels Demonstrates creating two namespaces and applying different labels to them, illustrating label management. ```bash kubectl create ns ns1 kubectl label namespaces ns1 a=b kubectl label namespaces ns1 c=d kubectl create ns ns2 kubectl label namespaces ns2 c=d ``` -------------------------------- ### Create schedule policies with pxb Source: https://docs.portworx.com/px-cli/px-pxb/create Various examples demonstrating how to configure different backup schedules using CLI flags or external configuration files. ```bash # Create a simple daily backup policy pxb create schedulepolicy --name daily-policy --daily-time "2:00AM" --daily-retain 7 # Create a comprehensive policy with multiple schedules pxb create schedulepolicy --name comprehensive-policy \ --interval-minutes 60 --interval-retain 5 --interval-incremental-count 3 \ --daily-time "01:00AM" --daily-retain 7 --daily-incremental-count 6 \ --weekly-day Monday --weekly-time "03:00AM" --weekly-retain 4 \ --monthly-date 1 --monthly-time "04:00AM" --monthly-retain 12 # Create weekly backup with multiple days pxb create schedulepolicy --name multi-day-weekly \ --weekly-day "Monday,Wednesday,Friday" \ --weekly-time "11:00PM" \ --weekly-retain 4 # Create bi-weekly backup (every alternate week) pxb create schedulepolicy --name biweekly-policy \ --weekly-day Monday \ --weekly-time "11:00PM" \ --weekly-retain 8 \ --weekly-bi-weekly # Create bi-weekly with multiple days pxb create schedulepolicy --name biweekly-multi \ --weekly-day "Monday,Friday" \ --weekly-time "10:00PM" \ --weekly-retain 8 \ --weekly-bi-weekly # Create selective monthly backup (specific date, all months) pxb create schedulepolicy --name selective-monthly \ --monthly-selective-date 15 \ --monthly-selective-time "02:00AM" \ --monthly-selective-retain 12 # Create selective monthly backup (specific date, specific months) pxb create schedulepolicy --name selective-quarterly \ --monthly-selective-date 1 \ --monthly-selective-time "03:00AM" \ --monthly-selective-retain 4 \ --monthly-selective-months "jan,apr,jul,oct" # Create relative monthly backup (first Monday of every month) pxb create schedulepolicy --name relative-monthly \ --monthly-relative-day Monday \ --monthly-relative-weekly-index first \ --monthly-relative-time "04:00AM" \ --monthly-relative-retain 12 # Create relative monthly backup (last Friday of every month) pxb create schedulepolicy --name last-friday \ --monthly-relative-day Friday \ --monthly-relative-weekly-index last \ --monthly-relative-time "11:00PM" \ --monthly-relative-retain 12 # Create an object-lock enabled policy pxb create schedulepolicy --name object-lock-policy --for-object-lock --auto-delete \ --daily-time "02:00AM" --interval-minutes 30 # Create from JSON configuration file pxb create schedulepolicy --file /path/to/policy.json # Create with labels from file pxb create schedulepolicy --name production-policy --daily-time "02:00AM" --labels-file /path/to/labels.json # Mix CLI flags with granular file inputs pxb create schedulepolicy --name comprehensive-policy --daily-time "01:00AM" --labels-file /path/to/labels.json ``` -------------------------------- ### Download specific version of air-gapped install script Source: https://docs.portworx.com/portworx-central-on-prem/install/license-server Download the air-gapped install script for a specific Portworx version by providing the `version` query parameter. This example downloads version 2.11.0. ```bash curl -o pxcentral-ag-install-licenseserver.sh -L "https://install.portworx.com/pxcentral-air-gapped?version=2.11.0&px-license-server=true" ``` -------------------------------- ### Example Initiator Name Output Source: https://docs.portworx.com/portworx-enterprise/platform/install/pure-storage/pure-cbs/prepare This is an example output from checking the initiator name, showing the current InitiatorName configuration. ```text InitiatorName=iqn.1994-05.com.redhat:xxxxx ``` -------------------------------- ### Get PX-CSI Version Source: https://docs.portworx.com/px-cli/px-csi/version Retrieves the current version of the Portworx CSI driver installed in your Kubernetes cluster. ```APIDOC ## GET /px csi version ### Description Get the version of PX-CSI. ### Method GET ### Endpoint `px csi version` ### Parameters #### Query Parameters - **--namespace, -n** (string) - Optional - Kubernetes namespace where PX-CSI pods are running ### Request Example ```bash kubectl px csi version -n kube-system ``` ### Response #### Success Response (200) - **version** (string) - The version string of the PX-CSI driver. #### Response Example ```json { "version": "2.10.0" } ``` ``` -------------------------------- ### Example Version Manifest Configuration Source: https://docs.portworx.com/portworx-enterprise/platform/install/bare-metal/kubernetes-non-airgap/custom-registry Example of a version manifest file using custom registry paths for components. ```yaml version: 2.13.3 components: stork: custom-registry.acme.org/portworx/backup/stork:23.2.1 autopilot: 192.168.1.2:5433/tools/autopilot:1.3.7 nodeWiper: [2001:db8:3333:4444:5555:6666:7777:8888]:5443/portworx/px-node-wiper:2.13.2 ``` -------------------------------- ### ApplicationRegistration Table Output Source: https://docs.portworx.com/portworx-enterprise/deploy-your-applications/stateful-applications/application-registration Example output from 'storkctl get appreg' command, showing registered application details. ```text NAME KIND CRD-NAME VERSION SUSPEND-OPTIONS KEEP-STATUS cassandra CassandraDatacenter cassandra.datastax.com v1beta1 spec.stopped,bool false ``` -------------------------------- ### Provisioning commit labels reference Source: https://docs.portworx.com/portworx-enterprise/reference/cli/cluster Example syntax for configuring provisioning commit labels. ```bash --provisioning-commit-labels '[{"OverCommitPercent": , "SnapReservePercent": , "LabelSelector": {"": ""}},{"OverCommitPercent": , "SnapReservePercent":} ]' ``` -------------------------------- ### Get Node Taints with yq Source: https://docs.portworx.com/portworx-enterprise/operator-release-notes Use this command to retrieve taints on cluster nodes when using yq. Ensure yq is installed. ```bash kubectl --kubeconfig= get nodes -oyaml | yq -r . | yq -r '.items[].spec.taints' ``` -------------------------------- ### Inspect and List Roles with pxb Source: https://docs.portworx.com/px-cli/px-pxb/get Examples demonstrating how to retrieve specific role details or list roles with custom filters, pagination, and sorting. ```bash # 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 ``` -------------------------------- ### Example px-backup-config structure Source: https://docs.portworx.com/portworx-backup-on-prem/configure/configure-configmap/px-backup-config Initial structure of the ConfigMap before adding custom parameters. ```yaml apiVersion: v1 data: BACKUP_SYNC_REQUEST_CPU: "0.2" kind: ConfigMap metadata: name: px-backup-config namespace: ``` -------------------------------- ### Get Node Taints with jq Source: https://docs.portworx.com/portworx-enterprise/operator-release-notes Use this command to retrieve taints on cluster nodes when using jq. Ensure jq is installed. ```bash kubectl --kubeconfig= get nodes -ojson | jq -r . | jq -r '.items[].spec.taints' ``` -------------------------------- ### Create Azure and NFS Backup Locations Source: https://docs.portworx.com/px-cli/px-pxb/create Examples of configuring different cloud and network-based backup storage providers. ```bash pxb create backuplocation --name azure-backup --provider azure --path my-container/backups --cloud-credential-name azure-creds --azure-environment AZURE_GLOBAL ``` ```bash pxb create backuplocation --name azure-china --provider azure --path my-container/backups --cloud-credential-name azure-creds --azure-environment AZURE_CHINA --azure-resource-group my-resource-group ``` ```bash pxb create backuplocation --name nfs-backup --provider nfs --path /backups --nfs-server-addr 192.168.1.100 --nfs-mount-options "vers=4,rsize=1048576" ``` ```bash pxb create backuplocation --name quick-s3 --provider s3 --path test-bucket --cloud-credential-name aws-creds --validate-cloud-credential=false ``` -------------------------------- ### Get Node Taints with yq Source: https://docs.portworx.com/portworx-enterprise/operator-release-notes Use kubectl and yq to retrieve taints from cluster nodes. Ensure yq is installed on your machine. ```bash kubectl --kubeconfig= get nodes -oyaml | yq -r . | yq -r '.items[].spec.taints' ``` -------------------------------- ### Get Node Taints with jq Source: https://docs.portworx.com/portworx-enterprise/operator-release-notes Use kubectl and jq to retrieve taints from cluster nodes. Ensure jq is installed on your machine. ```bash kubectl --kubeconfig= get nodes -ojson | jq -r . | jq -r '.items[].spec.taints' ``` -------------------------------- ### Portworx PX-StoreV2 Drive Configuration Example Source: https://docs.portworx.com/portworx-enterprise/platform/install/aws/aws-redhat-openshift-with-console-plugin Example output showing Portworx drive configuration using PX-StoreV2 datastore. This indicates the pod uses the PX-StoreV2 datastore. ```text Defaulted container "portworx" out of: portworx, csi-node-driver-registrar PX drive configuration: Pool ID: 0 Type: PX-StoreV2 UUID: 58ab2e3f-a22e-xxxx-xxxx-xxxxxxxxxxxx IO Priority: HIGH Labels: kubernetes.io/arch=amd64,kubernetes.io/hostname=username-vms-silver-sight-3,kubernetes.io/os=linux,medium=STORAGE_MEDIUM_SSD,beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,iopriority=HIGH Size: 25 GiB Status: Online Has metadata: No Balanced: Yes Drives: 0: /dev/sda, Total size 32 GiB, Online Cache Drives: No Cache drives found in this pool Metadata Device: 1: /dev/sdd, STORAGE_MEDIUM_SSD ``` -------------------------------- ### Start repository container for NFS Source: https://docs.portworx.com/portworx-enterprise/platform/install/aws/aws-eks-airgapped Run the Portworx repository container as a service to facilitate NFS package installation in air-gapped environments. ```bash docker run -p 8080:8080 docker.io/portworx/px-repo:1.2.0 ``` -------------------------------- ### Example Output of Migrated Resources Source: https://docs.portworx.com/portworx-enterprise/operations/disaster-recovery/async-dr/failover-app This is an example output showing the status of pods, services, deployments, and replica sets after a migration. ```yaml NAME READY STATUS RESTARTS AGE pod/zk-544ffcc474-6gx64 1/1 Running 0 18h NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/zk-service ClusterIP 10.233.22.60 3306/TCP 18h NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/zk 1/1 1 1 18h NAME DESIRED CURRENT READY AGE replicaset.apps/zk-544ffcc474 1 1 1 18h ``` -------------------------------- ### Cassandra Commit Log Error Example Source: https://docs.portworx.com/portworx-data-services/pds-platform/how-to-guides/advanced-security-features/recover-cassandra-pods This log message indicates a checksum failure during commit log initialization, preventing Cassandra pods from starting. ```text cassandra ERROR 18:22:11 Exiting due to error while processing commit log during initialization. cassandra org.apache.cassandra.db.commitlog.CommitLogReadHandler$CommitLogReadException: Mutation checksum failure at 23031717 in Next section at 23028485 in CommitLog-7-1676881531203.log ``` -------------------------------- ### Update Package Repositories (PhotonOS) Source: https://docs.portworx.com/portworx-enterprise/platform/install/vks Update package repositories on PhotonOS before installing additional packages. This command is part of the optional setup for encrypted volumes. ```bash yum update -y ``` -------------------------------- ### Monitor Portworx Central Installation Source: https://docs.portworx.com/portworx-central-on-prem/install/px-central Check the status of the Portworx Central post-installation hook pods. This command helps identify any errors during the setup process. ```bash kubectl get po --namespace px-backup -ljob-name=pxcentral-post-install-hook -o wide | awk '{print $1, $3}' | grep -iv error ``` -------------------------------- ### Example version manifest with custom registries Source: https://docs.portworx.com/portworx-enterprise/platform/install/aws/aws-eks-airgapped Example configuration showing custom registry paths for components using DNS, IPv4, and IPv6. ```yaml version: 2.13.3 components: stork: custom-registry.acme.org/portworx/backup/stork:23.2.1 autopilot: 192.168.1.2:5433/tools/autopilot:1.3.7 nodeWiper: [2001:db8:3333:4444:5555:6666:7777:8888]:5443/portworx/px-node-wiper:2.13.2 ``` -------------------------------- ### List receivers with sorting Source: https://docs.portworx.com/px-cli/px-pxb/get Use this command to list receivers and sort them by name in ascending order. No specific setup is required beyond having the pxb CLI installed. ```bash pxb get receiver --sort-by name --sort-order ascending ``` -------------------------------- ### Install Portworx Backup with Istio Enabled Source: https://docs.portworx.com/portworx-backup-on-prem/install/install/air-gapped/air-gapped-install Sample Helm command to install Portworx Backup with default options, enabling Istio service mesh. Ensure to append `istio.enabled=true` if Istio is used, but not if Istio is in ambient mode. The `hostName` parameter is mandatory if multiple applications use the same prefix and Istio sidecar mode is active. ```bash helm install px-central charts/px-central --namespace central --version 2.11.0 --set persistentStorage.enabled=true,persistentStorage.storageClassName="",pxbackup.enabled=true,istio.enabled=true ``` -------------------------------- ### Example output of successful IBM Block CSI driver installation Source: https://docs.portworx.com/portworx-enterprise/operations/scale-portworx-cluster/expand-storage-pool/expand-storage-pool-managed-by-px This output confirms that the IBM Block CSI driver version 4.4 has been successfully enabled on your cluster. ```text OK Name Version Health State Health Status vpc-block-csi-driver 4.4* (4.3 default) - Enabling ``` -------------------------------- ### Get PX-CSI Version Source: https://docs.portworx.com/px-cli/px-csi/version Use this command to retrieve the currently installed version of the PX-CSI driver. The optional namespace flag can specify the Kubernetes namespace where PX-CSI pods are running. ```bash # Get the version of PX-CSI kubectl px csi version ``` -------------------------------- ### Download air-gapped license server install script Source: https://docs.portworx.com/portworx-central-on-prem/install/license-server Download the `pxcentral-ag-install-licenseserver.sh` script for air-gapped installations. The `-L` flag follows redirects. ```bash curl -o pxcentral-ag-install-licenseserver.sh -L “https://install.portworx.com/pxcentral-air-gapped?px-license-server=true” ``` -------------------------------- ### Get host IDs for offline activation (HA) Source: https://docs.portworx.com/portworx-enterprise/reference/cli/lsctl/add-licenses Execute this command on a license server in a high availability setup to retrieve host IDs needed for an offline activation file. ```bash /opt/pwx-ls/bin/lsctl ha info ``` -------------------------------- ### Example OpenShift StorageClass output Source: https://docs.portworx.com/portworx-enterprise/provision-storage/create-pvcs/create-first-pvc Sample output showing Portworx StorageClasses in an OpenShift environment. ```text NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE px-csi-db pxd.portworx.com Delete Immediate true 43d px-csi-db-cloud-snapshot pxd.portworx.com Delete Immediate true 43d px-csi-db-cloud-snapshot-encrypted pxd.portworx.com Delete Immediate true 43d px-csi-db-encrypted pxd.portworx.com Delete Immediate true 43d px-csi-db-local-snapshot pxd.portworx.com Delete Immediate true 43d px-csi-db-local-snapshot-encrypted pxd.portworx.com Delete Immediate true 43d px-csi-replicated pxd.portworx.com Delete Immediate true 43d px-csi-replicated-encrypted pxd.portworx.com Delete Immediate true 43d px-db kubernetes.io/portworx-volume Delete Immediate true 43d px-db-cloud-snapshot kubernetes.io/portworx-volume Delete Immediate true 43d px-db-cloud-snapshot-encrypted kubernetes.io/portworx-volume Delete Immediate true 43d px-db-encrypted kubernetes.io/portworx-volume Delete Immediate true 43d px-db-local-snapshot kubernetes.io/portworx-volume Delete Immediate true 43d px-db-local-snapshot-encrypted kubernetes.io/portworx-volume Delete Immediate true 43d px-replicated kubernetes.io/portworx-volume Delete Immediate true 43d px-replicated-encrypted kubernetes.io/portworx-volume Delete Immediate true 43d ``` -------------------------------- ### Get Helm Values and Update Repo Source: https://docs.portworx.com/portworx-backup-on-prem/install/upgrade/password-policy Retrieve current Helm installation values and update the Helm repository before upgrading. Ensure you replace `` with your actual Portworx Backup namespace. ```bash helm get values --namespace px-central -o yaml > values-current.yaml helm repo add portworx http://charts.portworx.io/ && helm repo update ``` -------------------------------- ### Restrict Portworx Deployment with Node Labels Source: https://docs.portworx.com/portworx-enterprise/operations/troubleshooting/scale-or-restrict Use this command to prevent Portworx from installing and starting on specified nodes by applying the `px/enabled=false` label. This is applicable when Portworx is not yet deployed in the cluster. ```bash kubectl label nodes minion2 minion5 px/enabled=false --overwrite ```