Skip to content

Daily

Get warned when a cluster backup is missing

You hear about any backed-up cluster whose newest snapshot failed or is more than a day old.

Runs
Daily
Apps
MongoDB
AI
Not needed
Access
Project Read Only

Send this to your assistant

Create a ClickRuntime automation: every day at 6am, check the latest backup snapshot of each of my Atlas clusters and email me any where it failed or is older than 24 hours.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Cloud backups feel safe until you try to restore one. In Atlas, a snapshot can fail after a configuration change, a paused cluster may stop producing snapshots, or a policy change can shorten the schedule, and none of this is obvious unless you look. The first time a team notices is when they need last night's data after a bad migration and find the newest snapshot is nine days old.

Each day ClickRuntime lists your projects and clusters, fetches the snapshots for each one, and checks the newest snapshot's status and createdAt time. If the latest is failed, or nothing completed in the last day, you get an alert naming the cluster.

Teams storing customer or financial data in Atlas, or preparing for a compliance review, tend to rely on it.

What you get out of it

  • You learn backups broke before you need one

    An alert the morning after a failed snapshot gives you a day to fix the policy. Discovering it during a data loss event leaves you with last week's data. You have a full day to fix the policy instead of discovering the gap after a bad migration.

  • Missing snapshots count, not just failures

    A cluster that silently stopped producing snapshots has no failed status to report. Checking the newest createdAt time catches that case too, which simple failure alerts miss. Failure alerts alone miss a cluster that simply stopped producing snapshots, and the createdAt check catches that case.

  • Recovery point is known

    When the daily check passes, you know the newest restore point is under 24 hours old. That figure is something you can quote to customers and managers with confidence. That figure is one you can quote to customers and managers with confidence.

  • Evidence for compliance

    Many frameworks require proof that backups run and are monitored. A daily check with a log of results in the ClickRuntime dashboard demonstrates that monitoring exists. A daily check and its logged results show that monitoring exists, which many reviews ask for.

  • Every cluster is covered

    New clusters are picked up automatically because the check lists them each day. A cluster created last week for a client project cannot drift outside the safety net. A cluster created last week for a client project cannot sit outside the safety net.

How it works

What happens, step by step

  1. Every day ClickRuntime goes through every backed-up cluster in your MongoDB Atlas projects.

  2. It looks at each cluster's newest backup snapshot.

  3. If that snapshot failed, or is more than a day old, it is flagged.

  4. You get an email naming each affected cluster and when its last snapshot was taken.

Before it runs live

  • Connect MongoDB

What you get

RunsDaily
Get warned when a cluster backup is missingtoday, 9:00Succeeded
Email · Atlas backupsacme-prod/orders-cluster: latest snapshot completed at 2026-10-17T06:02

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other MongoDB steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
get_alerted_when_a_backup_snapshot_fails_or_is_missing.pyexample
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, notify

from requests.auth import HTTPDigestAuth

ATLAS = "https://cloud.mongodb.com/api/atlas/v2"

def atlas(path, **params):
    auth = HTTPDigestAuth(credentials.secret("ATLAS_PUBLIC_KEY"), credentials.secret("ATLAS_PRIVATE_KEY"))
    resp = http.get(f"{ATLAS}{path}", auth=auth, params=params, headers={"Accept": "application/vnd.atlas.2024-08-05+json"})
    resp.raise_for_status()
    return resp.json()

@on_trigger
def run(event):
    cutoff = datetime.now(timezone.utc) - timedelta(hours=24)
    problems = []
    for g in atlas("/groups")["results"]:
        for c in atlas(f"/groups/{g['id']}/clusters")["results"]:
            snaps = atlas(f"/groups/{g['id']}/clusters/{c['name']}/backup/snapshots")["results"]
            latest = max(snaps, key=lambda s: s["createdAt"], default=None)
            if not latest:
                problems.append(f"{g['name']}/{c['name']}: no snapshots")
            elif latest["status"] == "failed" or datetime.fromisoformat(latest["createdAt"].replace("Z", "+00:00")) < cutoff:
                problems.append(f"{g['name']}/{c['name']}: latest snapshot {latest['status']} at {latest['createdAt'][:16]}")
    if problems:
        notify.email_me(f"{len(problems)} Atlas backup problems", "\n".join(problems))
    return {"problems": len(problems)}

FAQ

Common questions

What does the check consider a failure?
A newest snapshot with status failed, or a newest completed snapshot older than 24 hours. Both produce an alert that names the project, cluster and the last good snapshot time. The alert names the project, cluster and time of the last good snapshot so you can start investigating at once.
Does it work on shared M0 or M2 clusters?
Free and shared tiers do not support the same cloud backup snapshots, so there is nothing to check on them. The automation applies to dedicated clusters that have cloud backup enabled. Backup settings on the cluster itself should be checked in Atlas if nothing shows up there.
Can the freshness window be longer?
Yes. If you back up weekly rather than daily, set the window to eight days. Match it to your backup policy so alerts only fire when a snapshot is genuinely overdue. Match it to the policy you actually run so the alert fires only when a snapshot is genuinely overdue.
What permissions does it need?
Project Read Only. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get warned when a cluster backup is missing” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.