Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell PowerFlex 4.5.x Administration Guide

Backup and restore using VM snapshots

If the PowerFlex management platform (PFMP) is running on VMs, you can backup and restore using VMware VM snapshots, as long as you perform some steps to shut down the database and VMs.

If the cluster is deployed on VMWare VMs, you can simply take the snapshots from the vSphere Client user interface, or you can use a CLI command on the ESX system that is hosting the VMs.

For VM snapshots, the database and VMs need to be shut down first before reliable snapshot(s) can be taken.

CAUTION:When you shut down the database and VMs, you effectively shut down the PFMP. The user interface will not be accessible and any running jobs will fail when the system comes back on. The VMs should be shut down and snapshots taken once the database is shut down.

Follow the steps below to shut down the database and VMs. For every command listed below, you first need to set the k alias and namespace.

  1. Set the k alias and default namespace:
    # Run this to make it easier to run the rest of the code and set the default namespace.
    alias k="kubectl -n $(kubectl get pods -A | grep -m 1 -E 'platform|pgo|helmrepo' | cut -d' ' -f1)"
    kubectl config set-context default --namespace=$(kubectl get pods -A | grep -m 1 -E 'platform|pgo|helmrepo|docker' | cut -d' ' -f1)
    
  2. Verify the pgo controller pod and all database pods are up and running with no errors in the logs:
    # Get the PostgreSQL operator pod and PostgreSQL cluster pods to verify.
    echo $(kubectl get pods -l="postgres-operator.crunchydata.com/control-plane=pgo" --no-headers -o name && kubectl get pods -l="postgres-operator.crunchydata.com/instance" --no-headers -o name) | xargs kubectl get -o wide
    
  3. Gracefully shut down the database cluster:
    # Trigger a shutdown
    k patch $(k get postgrescluster -o name) --type merge --patch '{"spec":{"shutdown": true}}'
  4. At this point, you can shut down the VMs to take snapshots and adjust resources, as needed. Follow the next steps after the VMs are powered back on.
  5. Verify the shutdown occurred:
    # Verify the shutdown
    # Only the PostgreSQL operator pod "pgo" should remain when running this command.
    echo $(kubectl get pods -l="postgres-operator.crunchydata.com/control-plane=pgo" --no-headers -o name && kubectl get pods -l="postgres-operator.crunchydata.com/instance" --no-headers -o name) | xargs kubectl get -o wide
    
  6. Run this command to start the cluster back up:
    # Trigger a shutdown
    k patch $(k get postgrescluster -o name) --type merge --patch '{"spec":{"shutdown": false}}'
  7. Verify the startup occurred:
    # Verify the database pods started and are in a running state
    echo $(kubectl get pods -l="postgres-operator.crunchydata.com/control-plane=pgo" --no-headers -o name && kubectl get pods -l="postgres-operator.crunchydata.com/instance" --no-headers -o name) | xargs kubectl get -o wide
    

To restore to the previous point in time, you can revert the VMs from the snapshots in the vSphere Client user interface.


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\