惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
J
Java Code Geeks
小众软件
小众软件
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
C
Check Point Blog
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
腾讯CDC
T
The Blog of Author Tim Ferriss
大猫的无限游戏
大猫的无限游戏
量子位
M
MIT News - Artificial intelligence
Last Week in AI
Last Week in AI
L
LangChain Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How I built a tool that actually proves your backups work...
Atomic Mango · 2026-04-24 · via DEV Community

Atomic Mango

body:

Every developer has a backup script. Almost nobody verifies that the backup actually restores.
I learned this the hard way. Not in a production emergency — but close enough to make me uncomfortable. The script ran, the file was there, the cron job was green. Everything looked fine. Until I tried to restore it in a test environment and it failed silently.
That's the Schrödinger's backup problem: you don't know if your backup works until you open the box. And most people open the box during an emergency.
So I built Database Guardian Pro to solve this properly.

How it works:

The core idea is simple: don't just save the dump, actually restore it.
After every backup, the tool:

Takes the dump file:

Spins up an ephemeral Docker container with a clean database engine
Injects the dump and forces a full restore
Runs integrity checks — tables exist, data is readable
Destroys the container

If the restore fails, you get an alert on Discord or Slack immediately. If it succeeds, the backup is marked as valid. Not before.
No residue. No impact on your host system. No assumptions.

Why Docker:

The whole point is isolation. You don't want the verification to touch your production database or your host filesystem. Ephemeral containers are perfect for this — they exist for the duration of the test and nothing else.
Using the Docker SDK for Python made this straightforward. Spin up a container, run the restore, check the output, destroy it. The entire verification cycle takes seconds.

It also monitors live database health:

While I was building the backup verification, I added real-time monitoring for the databases themselves. It connects to MySQL, PostgreSQL, MongoDB, Redis and SQLite, checks connectivity and response times every 30 seconds, and streams status to a web dashboard via WebSocket.
Alerts only fire when state changes — not on every check. No spam.

What I learned building this:

The hardest part wasn't the Docker integration. It was resisting the urge to over-engineer it. The first version had too many abstractions, too many config options, too much "enterprise" thinking for a tool that needed to be simple to set up.
The version I'm happy with does two things well: it tells you if your databases are up, and it proves your backups actually work.

The repo:

The full source is on GitHub:
If you want the packaged version with Docker Compose, Grafana dashboards, and Nginx config, it's available on Gumroad for €10.

Happy to answer questions about the implementation in the comments

A comment that pushed me to go further:

After posting about the project on r/sideprojects, someone left a comment that stuck with me:
"Curious in your setup — are you just checking integrity at backup time or also verifying restore paths regularly? Because that's where we saw most things quietly break."
That was the question I hadn't fully answered yet. I was validating at backup time, but not running scheduled restore checks on older backups. Their team had seen backups that were technically completing but restoring outdated or incomplete data — because nothing was validating the full restore path end-to-end.
That comment is directly why the tool now runs a weekly restore check on the most recent backup and a monthly audit on a random sample of the last 6 months. It was the right call and I wouldn't have thought to structure it that way without that nudge.