Backing-up cloud-native apps with Portworx to FlashBlade

jboothomas
4 min readSep 18, 2020

Today let’s look at how to leverage Pure Storage FlashBlade as a backup target for Portworx. By using Pure Storage FlashBlade we will benefit from fast backup and rapid recovery for our containerised environments.

FlashBlade the highly parallel all Flash storage platform, built with web-scale applications in mind, is the perfect fit as a backup repository for cloud-native applications. Its ability to ingest multiple streams fits perfectly in the highly distributed world of containerised applications. Learn more of why its architecture and design principles matter on the Pure Storage website.

Simply put Portworx + Flashblade enables on-premises or hybrid cloud backup / restore operations to meet the most stringent of SLAs.

So let’s start ! Within my Portworx backup interface I have added my Kubernetes cluster (running portworx ):

First we need to add our FlashBlade S3 connection information this is done via the Settings menu:

I select add an AWS/S3 compliant object store and provide my credentials, access key and secret key, as well as a name refereed to here as the Cloud Account Name:

I then configure a backup location, using the above created cloud account, my FlashBlade data VIP as the endpoint and , depending on SSL settings, disabling SSL:

Back on the main Portworx page I select my Kubernetes cluster so as to open the Applications page where I have created a px-bx-demo namespace with a pvc to use:

I select backup and specify the job settings:

As I set the backup job to immediate execution, it will kick off as shown in the Portworx backup interface:

If we wait a short while our backup will show up as successful:

Now let’s backup/restore a deployment after adding some data to it’s persistent volume to validate. For this purpose I have deployed nginx with a persistent volume claim mounted to /data. I have then copied over the contents of /bin and /lib to this mount point:

root@nginx-76d6c75954-8c2pj:/data# ls
bin lib

As prior, from the Portworx backup interface I select my deployment to backup. I will use the same settings as my previous job.

Using my favourite S3 browser I can see that for each job it has created objects that reflect my namespace and the backup jobs :

I will delete from within Kubernetes the elements we just backed up:

$kubectl -n pxbx-demo get deployment
NAME READY UP-TO-DATE AVAILABLE AGE
nginx 1/1 1 1 11m
$ kubectl -n pxbx-demo delete deployment nginx
deployment.apps "nginx" deleted
$ kubectl -n pxbx-demo get deployment
No resources found in pxbx-demo namespace
$kubectl -n pxbx-demo get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
px-pvc Terminating pvc-c1aa2313-a8e9-4bff-8179-9224571e7a52 10Gi RWO px-sc 28m
$ kubectl -n pxbx-demo get pvc
No resources found in pxbx-demo namespace.

Now back in the Portworx backup interface let’s run the restore operation:

I can select to restore all items or only certain items, as well as overwrite or not, I’ll keep this simple:

The job will start, and the interface automatically takes us to the restore screen.

In Kubernetes we can see our deployment, pod and pvc recreated and eventually come up as running, and in Portworx our restore shows up as finished:

I can check that the folders under /data were preserved on the PVC in my restored deployment:

$ kubectl -n pxbx-demo exec -it  nginx-76d6c75954-tlx69 -- ls /data
bin lib

All though in this example I showed the workflow for one container, as both systems, Portworx and FlashBlade, are designed with webscale in mind their combined strength will enable true delivery for SLA intensive cloud-native applications on kubernetes platforms be it on-premises or in the cloud.

--

--

jboothomas

Infrastructure engineering for modern data applications