Truth in IT
    • Sign In
    • Register
        • Videos
        • Channels
        • Pages
        • Galleries
        • News
        • Events
        • All
Truth in IT Truth in IT
  • Data Management ▼
    • Converged Infrastructure
    • DevOps
    • Networking
    • Storage
    • Virtualization
  • Cybersecurity ▼
    • Application Security
    • Backup & Recovery
    • Data Security
    • Identity & Access Management (IAM)
    • Zero Trust
    • Compliance & GRC
    • Endpoint Security
  • Cloud ▼
    • Hybrid Cloud
    • Private Cloud
    • Public Cloud
  • Webinar Library
  • TiPs
  • DRAW

Automate GitHub Backups with Rubrik API & Actions

Rubrik
06/15/2026
0 (0%)
Share
  • Comments
  • Download
  • Transcript
Report Like Favorite
  • Share/Embed
  • Email
Link
Embed

Transcript


basically everything has to pass before the code hits production. But your backups, well, those are still running on a schedule, completely disconnected from your deployments. But what if they didn't have to be? What if backups could be integrated into the pipeline, just like all the other processes? What if we could be sure we have a duplicate copy of our repo in the event that a merge fails, or better yet, block that actual merge if the backup fails, ensuring you always have the last line of defense? Well, that's exactly what we're going to build today with Rubrik. Hi, I'm Mike from Rubrik, and today we're building what I'm calling Backup as Code. We're going to create a GitHub action that triggers an on-demand Rubrik snapshot every time code is merged into the main branch of our GitHub repository. So any time that a pull request is approved or any time the main branch is updated, Rubrik will automatically take the backup of the repo as it was before, so we always have that last known good state. Now, if you want to see the full Rubrik solution for protecting GitHub beyond just what we're building today, check out the Rubrik Explorer demo. Link's down in the description. But for now, let's just get into it. So before we actually wire anything up, let's look at what the action actually does. Here's the repo that we're going to be working with, and I'm going to go ahead and we'll take a look at the action.yaml here. This is the contract. It really defines the inputs that the action expects, things like our RSC URI, our client ID and secret for authentication, the repository name, the SLA domain that we want to use for the backup, and then we have this wait flag, which simply controls whether the action's just going to trigger the backup and move on, or it's going to stick around and pull until it completes. Now, this is a composite action, so under runs, we can see here it's going to install Python, it's going to install the request library, and it's going to call our backup script. So let's take a look at that actual script. Now, the flow here, pretty straightforward. First, we authenticate to Rubrik Security Cloud using our OAuth credentials. This is a standard token exchange, and then it's going to resolve the GitHub repository inside RSC. So it takes the repo name from the action input, looks up the idea via GraphQL endpoint, does the same thing for the SLA domain, and once we have both these IDs, it's going to go ahead and fire off the on-demand snapshot mutation. Now, again, we can see if wait is set to true here, it's going to enter this polling loop and check the activity series status every 10 seconds until Rubrik reports back with either a success or a failure. Now, if the backup succeeds, we have exit code zero. If it fails, exit code one, and that's what's going to kill our workflow. So here's the repo that we're working with, and I'm going to go ahead and create a new workflow file here under GitHub workflows, and we're going to call this RubrikBackup.yaml, and I'm going to go ahead and paste all the syntax in here to the action code. So let's walk through this. So the trigger here is pretty simple. We're going to fire on any push domain, so every single merge is going to kick this off. The job itself is going to run on Ubuntu. It's going to go ahead and check out the repo and then call the Rubrik on-demand backup action, which is pointing to my GitHub account at the moment, but you can go ahead, fork this, do whatever you want to it, change it, you know, tailored to your organization's needs. So we're going to pass our RSC URI, client ID, and secret. These are all stored as GitHub secrets, so we specify the repository context, the SLA we want. In this case, we're going to say gold, and then we're going to go ahead and set our key flag here, which is wait to true. So this tells the action to pull Rubrik until the snapshot either succeeds or fails. If it fails, the workflow itself is going to fail. There's going to be no green check marks, no merge. Now, before we run this, we actually need to make sure that our secrets are in place, so let's head back over to our repo settings and check that out. So under secrets and variables here, I'm going to click on actions, and you can see we've added three repository secrets, the RSC URI, the client ID, and the client secret. These are going to come from a service account that is set up within Rubrik Security Cloud, nothing special here. Just make sure that the service account has the permission to trigger on-demand snapshots for the objects that you're targeting. So with everything in place here, let's have some fun and run it. So I've already gone ahead and committed some changes and created a PR to get those changes merged into production, so I'm going to go ahead and approve this PR and see what happens. So the merge now is in process. We can see that our actions kicked off, so let's dive in for more details. So we can see here the action authenticating to RSC, resolving the repo, looking up the SLA, all that fun stuff, and now it's polling. So every 10 seconds, it's checking back with Rubrik and waiting for that success status. Now, let's jump over to Rubrik Security Cloud and kind of see the other side of this, and as we come in here, we can see there's our on-demand job. It's been triggered. It's running, protecting that repo for us, and there it is. It's completed successfully for us on the Rubrik side, so let's now flip back to GitHub. And voila, green checkmark. The action picked up that success status, exited cleanly, and the workflow passed. So that merge now has a known good recovery point tied directly to this commit. And that's it. Event-driven, verifiable, and enforced right inside the same repo where your code lives. If you're already enforcing tests and policies in your pipeline, there's no reason that backups should be the exception. Now, the link to the action is down in the description. Feel free, like I said, to fork it, modify it, tailor it to your organization's needs, and also down there, you'll find a link to our self-guided interactive hands-on labs where you can check out Rubrik's GitHub protection solution for yourself. Thanks so much for watching, and we'll see you in the next one. Microsoft Mechanics www.microsoft.com www.microsoft.com

TL;DR

  • Custom GitHub Action triggers Rubrik snapshots automatically on every merge to main branch, integrating backups directly into CI/CD workflows
  • Action uses Rubrik Security Cloud APIs with OAuth authentication to resolve repository IDs, apply SLA policies, and execute on-demand backup mutations
  • Polling mechanism monitors backup job status and can fail the workflow if backup fails, preventing merges without verified recovery points

Summary

This tutorial demonstrates how to integrate Rubrik backup operations directly into GitHub CI/CD pipelines using a custom GitHub Action. The presenter walks through building what he calls 'Backup as Code' — a workflow that triggers an on-demand Rubrik snapshot every time code is merged into the main branch. The implementation uses Rubrik's GraphQL API to authenticate via OAuth, resolve repository and SLA domain IDs, and execute snapshot mutations. The action includes a polling mechanism that monitors backup job status and can block merges if backups fail, treating data protection with the same enforcement rigor as security scans or unit tests. The demonstration covers the action's YAML contract, the Python backup script that handles API interactions, workflow configuration, and a live execution showing the complete cycle from pull request approval through successful backup verification in Rubrik Security Cloud.

Chapters

0:00 - The Backup Gap in CI/CD
0:47 - Introducing Backup as Code
1:25 - Action Architecture Walkthrough
3:03 - Workflow Configuration Setup
4:47 - Live Execution Demo

Key Quotes

0:28 "What if we could be sure we have a duplicate copy of our repo in the event that a merge fails, or better yet, block that actual merge if the backup fails, ensuring you always have the last line of defense? ..."
1:05 "Rubrik will automatically take the backup of the repo as it was before, so we always have that last known good state."
6:06 "If you're already enforcing tests and policies in your pipeline, there's no reason that backups should be the exception."

FAQ

What permissions does the Rubrik service account need for this GitHub Action?

The service account configured in Rubrik Security Cloud must have permissions to trigger on-demand snapshots for the GitHub repositories you're targeting. The authentication uses OAuth credentials (client ID and secret) stored as GitHub repository secrets.

Can the action trigger backups without blocking the merge workflow?

Yes, the action includes a 'wait' flag that controls behavior. When set to false, it triggers the backup and continues without polling. When set to true (as demonstrated), it polls Rubrik every 10 seconds until the backup succeeds or fails, blocking the merge on failure.


Categories:
  • » Webinar Library » Rubrik
  • » Cybersecurity » Application Security
  • » Data Management » DevOps
  • » Data Protection
Channels:
News:
Events:
Tags:
  • Backup & Recovery
  • DevSecOps
  • How-To
  • Technical Deep Dive
  • GitHub Actions
  • Backup Automation
  • CI
  • CD Integration
  • API-Driven Data Protection
  • DevOps Workflows
  • Event-Driven Backups
  • Infrastructure as Code
  • Repository Protection
Show more Show less

Browse videos

  • Related
  • Featured
  • By date
  • Most viewed
  • Top rated
  •  

              Video's comments: Automate GitHub Backups with Rubrik API & Actions

              Upcoming Webinar Calendar

              • 06/17/2026
                12:00 PM
                06/17/2026
                Action1: The Remediation Gap: Vulnerability Management in the Age of AI
                https://www.truthinit.com/index.php/channel/2010/action1-the-remediation-gap-vulnerability-management-in-the-age-of-ai/
              • 06/23/2026
                01:00 PM
                06/23/2026
                The AI-Powered VMware Alternative
                https://www.truthinit.com/index.php/channel/2009/the-ai-powered-vmware-alternative/
              • 06/24/2026
                11:00 AM
                06/24/2026
                LATAM: Accelerating Insights on AI Through an Engaging Webinar Series
                https://www.truthinit.com/index.php/channel/2012/accelerating-insights-on-ai-through-an-engaging-webinar-series/
              • 06/25/2026
                01:00 PM
                06/25/2026
                Generative AI Security: Preventing AI from Becoming a Data Breach Multiplier
                https://www.truthinit.com/index.php/channel/1998/generative-ai-security-preventing-ai-from-becoming-a-data-breach-multiplier/
              • 06/30/2026
                01:00 PM
                06/30/2026
                Master Active Directory Certificate Services for Long-term Success
                https://www.truthinit.com/index.php/channel/2018/master-active-directory-certificate-services-for-long-term-success/
              • 07/01/2026
                04:00 AM
                07/01/2026
                Integrating Security in AI: Automated Red Teaming Strategies for Private Models
                https://www.truthinit.com/index.php/channel/1969/integrating-security-in-ai-automated-red-teaming-strategies-for-private-models/
              • 07/01/2026
                04:00 AM
                07/01/2026
                Schutz von KI in Anwendungen, Agenten und APIs.
                https://www.truthinit.com/index.php/channel/2008/schutz-von-ki-in-anwendungen-agenten-und-apis/
              • 07/01/2026
                01:00 PM
                07/01/2026
                Stop Your AI from Controlling You: Strategies for Retaining Power
                https://www.truthinit.com/index.php/channel/2021/stop-your-ai-from-controlling-you-strategies-for-retaining-power/
              • 07/02/2026
                10:00 AM
                07/02/2026
                Resilience Insights from Hybrid Threats When the Cloud Faces Challenges
                https://www.truthinit.com/index.php/channel/2011/resilience-insights-from-hybrid-threats-when-the-cloud-faces-challenges/
              • 07/14/2026
                11:00 AM
                07/14/2026
                In-Depth Analysis of the Latest Features in Netwrix 1Secure
                https://www.truthinit.com/index.php/channel/2014/in-depth-analysis-of-the-latest-features-in-netwrix-1secure/
              • 07/21/2026
                04:00 AM
                07/21/2026
                Strategies for Managing AI Governance and Securing App-to-LLM API Traffic
                https://www.truthinit.com/index.php/channel/1967/strategies-for-managing-ai-governance-and-securing-app-to-llm-api-traffic/
              • 07/22/2026
                06:30 AM
                07/22/2026
                Insights and Strategies for Effective Data Privacy and Protection Practices
                https://www.truthinit.com/index.php/channel/2000/insights-and-strategies-for-effective-data-privacy-and-protection-practices/
              • 07/29/2026
                04:00 AM
                07/29/2026
                Real-Time Strategies for Safeguarding Against Prompt Injections
                https://www.truthinit.com/index.php/channel/1968/real-time-strategies-for-safeguarding-against-prompt-injections/

              Upcoming Events

              • Jun
                17

                Action1: The Remediation Gap: Vulnerability Management in the Age of AI

                06/17/202612:00 PM ET
                • Jun
                  23

                  The AI-Powered VMware Alternative

                  06/23/202601:00 PM ET
                  • Jun
                    24

                    LATAM: Accelerating Insights on AI Through an Engaging Webinar Series

                    06/24/202611:00 AM ET
                    • Jun
                      25

                      Generative AI Security: Preventing AI from Becoming a Data Breach Multiplier

                      06/25/202601:00 PM ET
                      • Jun
                        30

                        Master Active Directory Certificate Services for Long-term Success

                        06/30/202601:00 PM ET
                        More events
                        Truth in IT
                        • Sponsor
                        • About Us
                        • Terms of Service
                        • Privacy Policy
                        • Contact Us
                        • Preference Management
                        Desktop version
                        Standard version