Site icon Ron Ekins' – Oracle Technology, DevOps and Kubernetes Blog

Backup PDS managed Kubernetes database to OCI S3 Object Storage

In this post I am going to share how to backup Portworx Data Services (PDS) managed Kubernetes databases to Oracle Cloud Infrastructure (OCI) S3 Object Storage buckets.

OCI Object Storage

Create OCI Bucket

Logon to Oracle Cloud Infrastructure (OCI) and from the Dashboard select Object Storage or via the hamburger menu navigate to Storage -> Object Storage -> Buckets.

Select your required Compartment, and click Create Bucket

Object Storage and Archive Storage

Provide a Bucket Name, and confirm storage options, for this post I will use the Standard Default Storage Tier.

OCI also provides an archive storage tier for long-term storage which may be of interest as it is one-tenth of the cost of Standard object storage

Object Storage & Archive Storage – Create Bucket

Note: Bucket names must be unique, if you have used the name even in another Compartment expect to see an error message.

By default the bucket is Private, however if required you can change the visibility by clicking on the 3 vertical ellipsis on the right hand side and updating it to Public.

Customer Secret Key

Before we can backup our PDS database to OCI we need to generate a Customer Secret for authentication.

From the OCI dashboard, Click on the Profile icon (top right), navigate to User Settings -> Customer Secret Keys and click Generate Secret Key providing a descriptive name.

Customer Secret Keys

Enter secret key Name

Generate Secret Key

Once generated you will need to select Copy, this will be the Secret Key, which we will be using later.

Generated Key

Now, click on the newly created Secret Name to obtain the Access Key, again save this for later.

Object Storage Namespace Name

From the OCI dashboard, Click on your Profile icon (top right), navigate to Tenancy

The Object Storage Namespace and default S3 compartments should be visible.

Tenancy details

Alternatively, you can use the OCI command line interface, for example.

% oci os ns get                                                                                                                                    
  "data": "<Object Storage Namespace>"

Portworx Data Services (PDS)

From the left hand panel click on Settings (gear icon) to access the settings options.

PDS Settings

Click on Add Backup Credentials and select S3 Compatible.

Provide a Name, the OCI Access Key, Secret Key and Endpoint captured earlier.

Add S3 Compatible Cloud Account

The newly created Cloud Account should now be visible.

Backup Credentials

Click on Targets and select Add Backup Targets.

Select Cloud Account, enter Name, Bucket Name and Region, for example.

Add S3 Compatible Backup Target

Click on the 3 vertical ellipsis, and select View Details, wait till the required Deployment Target has a green tick.

Backup Deployment

Now select Deployments from the left hand panel (disk icon) and click on type of deployment.

To Take Ad-hoc Backup, select Backup Target and click Backup

Take Ad-hoc Backup

After a few minutes the backup job will appear in the Backup Jobs panel.

Backup Jobs

Oracle Object Storage

Return to OCI and navigate to the bucket, for example Storage -> Object Storage -> Bucket Details

Object Storage Bucket Details

It’s also possible to see details of the backup from the Kubernetes cluster by using pxctl cloudsnap status, for example.

% pxctl cloudsnap status --name 5b320cd7-5833-4881-882d-d4754ee276bb
Defaulted container "portworx" out of: portworx, csi-node-driver-registrar
5b320cd7-5833-4881-882d-d4754ee276bb	455952688535669561	Backup-Done	481 MiB		7.331008066s	Tue, 31 May 2022 15:51:35 UTC


In this post I shared how how can use the Portworx Data Services (PDS) to backup PDS managed Kubernetes databases to Oracle Cloud Infrastructure (OCI) S3 Object Storage.

Exit mobile version