Serverless Backups Automation

Serverless Backups Automation

This is the second part of two blog series on serverless functions (also known as Functions-as-a-Service) in Oracle Cloud Infrastructure (OCI). In my first blog, I covered an overview of what is a serverless function and gave an example of a function that backs up an EPM Cloud application by invoking a Python based function. If you did not read the first part, here is the link.

In this second part, I will be focusing on automating the process from start to end using OCI Alarms and Notifications.

In a nutshell, the automation solution relies on monitoring services to track an object storage bucket and trigger an alarm if the number of backups is less than a predefined number, the same alarm trigger will call a function to backup the EPM application. The following diagram demonstrates what the solution components are.

No alt text provided for this image

Here is a breakdown of the solution:

  1. Key Vault - This is used to hold the encrypted credentials to avoid hard coding credentials and URL details in the function code
  2. Monitoring - This service provides object storage metrics that determine when the automation kicks in.
  3. Alarms - an alarm is used to monitor object storage buckets, and will kick off notification services if a condition is met
  4. Notifications - Notification topics are used to notify system administrators when the alarm is in firing mode and also used to invoke the function
  5. Functions - as described in my previous blog, this is the Python-based function that backs up the EPM Cloud application by calling a REST endpoint

Let me start with the vault, nothing fancy here, I just created a software key (software option is cheaper than HSM) and created two secrets to store my user password and authentication token and updated the function configuration to reference them as follows.

No alt text provided for this image
No alt text provided for this image


The next step is to create a subscription and notification topics to associate with the alarm. The administration team members will subscribe to this topic and will get notified every time the alarm is in firing mode. I have two subscriptions, one to send a notification email and another to trigger the backup function as follows.

No alt text provided for this image

The final step is to create an alarm definition and configure it kick off if a certain condition is met. In my example, the alarm will kick off when the storage bucket has less than five backup files in the last hour.

No alt text provided for this image

Depending on the alarm condition, you may have to manually place the backup files before enabling the alarm. For example, if the alarm fires when number of files are less than 30, then you need some backups to be in the bucket, otherwise, the alarm will fire away the moment you enable it for the first time assuming the bucket is empty.

Every time the alarm is in firing mode, the oracle function will be invoked and the subscribers will receive an email notification as follows.

No alt text provided for this image

Here is a screenshot of the function metrics that includes function invocations and duration and here you can see the function has been invoked.

No alt text provided for this image

And the object storage bucket is looking good the backup files are piling up nicely.

No alt text provided for this image

This concludes my two part series on serverless backups. Hope you find it helpful.

要查看或添加评论,请登录

Omar Shubeilat的更多文章

  • Untyped variables in Groovy

    Untyped variables in Groovy

    This is another quick blog about untyped variables in Groovy and how a simple trick could make your life easier, and…

    1 条评论
  • Quick Tip - Mass delete option in EPCM

    Quick Tip - Mass delete option in EPCM

    If you've been using the newly released Enterprise Profitability and Cost Management cloud service you would have…

    1 条评论
  • Quick Tips - EPM Cloud Groovy CsvWriter Class

    Quick Tips - EPM Cloud Groovy CsvWriter Class

    I was asked by someone if it was possible to extract data from single currency EPM Cloud deployment, transform the…

    7 条评论
  • Quick Tip - Copy data across different POVs in EPCM/PCMCS

    Quick Tip - Copy data across different POVs in EPCM/PCMCS

    This is a quick post about a question I had answered on Customer Cloud connect and I thought it is a good idea to share…

  • Exporting EPM Dimensional Security to Oracle Autonomous DB

    Exporting EPM Dimensional Security to Oracle Autonomous DB

    This is a quick-tip post that has been sitting in my drafts folder for quite some time. I had a requirement to export…

  • Synchronising EDM Dimensions with Essbase Cloud

    Synchronising EDM Dimensions with Essbase Cloud

    This is a quick tip blog about integrating metadata between Enterprise Data Management (EDM) and Essbase Cloud by way…

    2 条评论
  • Groovy and Essbase Cloud APIs

    Groovy and Essbase Cloud APIs

    This post is a quick tip about using Groovy to work with Essbase Cloud Java APIs for those who prefer to code in Groovy…

    2 条评论
  • The Case for Serverless Backups using Oracle Functions

    The Case for Serverless Backups using Oracle Functions

    This post is the first post of two part series about serverless functions in Oracle Cloud Infrastructure, why they…

    1 条评论
  • Quick tip - Deploying Essbase 21c in Oracle Cloud Infrastructure

    Quick tip - Deploying Essbase 21c in Oracle Cloud Infrastructure

    This post is about some tips on how to successfully deploy Essbase 21c marketplace offering in OCI. Thanks to OCI's…

  • Fully Automated Cloud-based EPM Backups in OCI

    Fully Automated Cloud-based EPM Backups in OCI

    I've been having a bit of time on my hands lately thanks to the current covid lockdown we have in Australia and I got…

    1 条评论

社区洞察

其他会员也浏览了