Automating FlashBlade File System Snapshots with Python

Getting ready for Python3

In this Blog, I will share how you can use the python to manage and automate Pure Storage FlashBlade File System snapshots.

Before we can start we need to install the Pure Storage FlashBlade Python SDK, also as Python2 is now deprecated so let’s start using Python3.

Below are the steps I took to install python3.6, pip and the Pure Storage FlashArray and FlashBlade python SDK’s on my Oracle Linux Rel7 database server.

# yum list *release-el7
# yum install -y oracle-epel-release-el7 oracle-release-el7
# yum install -y python36
# yum install -y python36-pip
# pip3.6 install --upgrade pip
# pip3.6 install purestorage
# pip3.6 install purity_fb

FlashBlade Documentation

You can find the Pure Storage FlashBlade REST API Guide at the Pure Storage Support Site and Python documentation at this site includes installation and usage details, so definitely a good place to start.

Getting Example Code

If you want to try out the code examples shown below you can ‘pull’ the python code and others from the Pure Storage public GitHub repository.

Creating FlashBlade FileSystem Snapshots

Let’s start by setting up some variables that we can reuse during the examples.

Set-up bash variables
pureTakeFBsnapshot syntax
FlashBlade FileSystem Snapshot automation with Python

We can check that our new file System snapshot has been created using our Linux shell or via FlashBlade WebUI.

File System Snapshot – Linux
Filesystem Snapshot – FlashBlade WebUI

Listing FlashBlade FileSystem Snapshots

Below you can see an example Python script I have developed to list FlashBlade FileSystem snapshots, this also available via GitHub.

List_FBSnaps syntax
Listing FlashBade Snapshots

In my next Blog I will show how file system snapshots can be registered in an Oracle Recovery Manager (RMAN) catalog.

[twitter-follow screen_name=’RonEkins’ show_count=’yes’]

One thought on “Automating FlashBlade File System Snapshots with Python

Add yours

Leave a Reply

Create a website or blog at

Up ↑

%d bloggers like this: