How ODAC Backs Up Databases Without Downtime

December 1, 2026
12 min read
3 reads
How ODAC Backs Up Databases Without Downtime

Every self-hosting engineer knows the 3:00 AM backup trap. You write a quick cron script to archive your data directory and push it to object storage, only to discover months later during an outage that copying live database files mid-write produced a torn, unbootable mess.

The traditional workaround is even worse: stop your containers every night so the files hold still. That turns "automated backups" into scheduled downtime, which defeats the entire point of running production infrastructure.

ODAC v2.4.0 ends that trade-off. You now get client-side encrypted off-server backups, database-consistent captures without stopping a single running app, smart retention thinning, and previewed one-click restores directly from the Dashboard at app.odac.run and the odac CLI.

Why Home-Rolled Backup Scripts Fail in Production

A reliable backup system is not a tar command wrapped in a shell script. Production apps mutate state continuously, databases hold in-flight transactions in memory, and storage targets fail silently when disks fill up or remote objects rot.

When we designed backups for ODAC, we refused to accept three common compromises:

  • No downtime for captures: Stopping or pausing live applications just to read their volumes safely is unacceptable for production workloads.
  • No blind trust in storage: A backup you have never verified is just a wish, and a full backup disk should never stall maintenance or erase your newest recovery point.
  • No accidental lockouts or overwrites: Encryption keys must never sit next to the data they protect, and restoring a backup should never silently wipe live production traffic by default.

Whether you manage a single server or a multi-region fleet, every backup workflow starts inside the Dashboard at app.odac.run, with full terminal parity when you prefer the CLI.

Step 1: Connect an Encrypted Off-Server Target

Local snapshots protect you from an accidental deployment mistake, not from a dead SSD, ransomware, or a lost server. Your first line of real disaster recovery is an off-server storage target.

Open your project at app.odac.run, click the Backups lifebuoy icon in the left sidebar, and click New backup job at the bottom of the Backup jobs card. Under Target, choose the storage backend that fits your infrastructure:

  • S3-compatible storage: AWS S3, Cloudflare R2, Backblaze B2, Wasabi, MinIO, or any S3 endpoint (with an optional Connect without TLS toggle for private endpoints).
  • Network shares: SMB or NFS storage on your local network or NAS.
  • WebDAV: Standard WebDAV endpoints over HTTPS.
  • Folder: A secondary disk mounted on the host (ODAC warns you if a target is local-only or shares the same disk as your live app data).

Every backup target is encrypted on your server before a single byte leaves the machine. During setup, ODAC checks your target connection and generates a 160-bit recovery key (or lets you supply your own passphrase of at least 16 characters under Use a key of my own).

ODAC Backups page showing the inline New backup job form configured for PostgreSQL and shop with an S3 target, Balanced retention, and 200 GB size limit

ODAC displays this recovery key once and lets you copy it or download a recovery file before confirming the target. Store that recovery file in a password manager or an off-server vault: if both your server and your recovery key are lost, nobody (including ODAC) can decrypt those backups.

One-time 160-bit recovery key confirmation screen with Copy and Download recovery file buttons and the confirmation checkbox enabled

If you prefer setting up targets from your terminal, the CLI provides the exact same zero-knowledge flow:

odac backup target add --name offsite-r2 --s3 prod-backups \
  --endpoint r2.odac.run --access-key AKIA... \
  --recovery-file ./offsite-recovery.json

The terminal prints your 160-bit key once, writes the recovery file, and asks you to type yes to confirm that you stored it safely off-server.

Step 2: Schedule Zero-Downtime Jobs With Smart Retention

Once your target is ready, configure what gets backed up and how often. In the New backup job inline form at app.odac.run, give your job a name, choose a schedule (Every hour, Every 6 hours, Every 12 hours, Every day, or Every week), and select the apps to protect.

From your Servers page or CLI, you can also configure server-wide jobs that automatically cover all current and future apps alongside ODAC's own server state (configuration, certificates, DKIM keys, and mail). Leaving future apps out of a hardcoded list is one of the most common causes of backup gaps, so server-wide coverage ensures new deployments are protected from day one.

Most backup tools prune old history by deleting the oldest files once a fixed count is reached, forcing an ugly choice between huge storage bills and short history. ODAC uses calendar-anchored retention thinning instead.

In the Dashboard, choose Fewer, Balanced, or More under How many old backups to keep, and optionally set a Size limit (GB). Recent backups stay dense so you can recover within tight intervals, while older backups thin out smoothly over months and years.

Even better, ODAC never deletes the newest backup of a job, so a job that hits temporary storage issues never leaves you empty-handed. Linked databases and apps captured in the same run are always kept or pruned together, guaranteeing that an app and its database never come back from mismatched timestamps.

After saving your job, the Backup jobs card shows every schedule at a glance. Each row features a circular capacity ring (green when healthy, red if a run failed, and spinning blue while a backup is in progress) that reveals the exact backup count and space usage when you hover over it.

Expand any job row to inspect recent runs with their timestamps, triggers (Scheduled, Manual, or After a deploy), and consistency badges, or click the play icon to trigger Back up now immediately.

ODAC Backup jobs card with the nightly-offsite job expanded, showing Scheduled and Manual runs, Consistent and Live copy badges, and the Back up now button

You can create the exact same 6-hour, budget-capped policy from the CLI:

odac backup job create --name nightly-offsite --target offsite-r2 \
  --all --server --every 6h --density normal --budget 200g

Step 3: Database-Consistent Backups Without Stopping Apps

A backup is only useful if the database inside it can actually start cleanly. Rather than freezing your application containers, ODAC inspects every app in a job and automatically selects the safest capture method for each piece of data while your apps keep serving live traffic.

Every backed-up app receives a clear consistency badge in both the Dashboard and odac backup points:

  • Consistent: Captured as a single transaction or online database snapshot that restores cleanly without recovery replay. Supported natively for PostgreSQL, MySQL, MariaDB, Redis, Valkey, KeyDB, MongoDB (replica sets), ClickHouse, and SQLite (even if the container has no SQLite CLI installed).
  • Crash-consistent: Captured when an app is cleanly stopped (such as during a maintenance window), matching a clean power-off state that databases recover from on boot.
  • Live copy: Captured while files are actively being written, used for plain application volumes or engines that cannot produce a single-transaction snapshot.

Because real-world infrastructure has edge cases, ODAC is transparent when an engine cannot guarantee single-transaction consistency. Standalone MongoDB containers (without a replica set) and MySQL tables using MyISAM, Aria, or MEMORY storage engines fall back to a Live copy with a clear warning.

Similarly, if a PostgreSQL container provides its password exclusively through POSTGRES_PASSWORD_FILE, or if a host lacks the spare memory Redis needs for a background fork, ODAC records a warning in the run log and captures the files safely instead of crashing your live service.

Running a custom database or proprietary storage engine? Declare a recognized engine or define your own dump and restore hooks directly in your app recipe's backup field:

{
  "backup": {
    "hook": {
      "dump": ["my-db-cli", "export", "--stdout"],
      "restore": ["my-db-cli", "import", "--stdin"],
      "file": "export.bin",
      "consistency": "consistent",
      "covers": ["/var/lib/my-db"]
    }
  }
}

ODAC streams the output of your custom dump command straight into your encrypted backup and excludes the covered container paths from duplicate file reads.

Step 4: Coverage Warnings, Automated Verification, and Fair Share

Silent failures are the silent killer of disaster recovery plans. ODAC actively audits your backup posture and surfaces warnings in the Dashboard and via odac backup coverage whenever something needs attention:

  • Unprotected stateful apps: Alerts you if an app holding persistent volumes or a database is not included in any backup job.
  • Missing database links: Flags when a job backs up an application without backing up the linked database it depends on.
  • Local-only or same-disk targets: Warns when none of your targets live off-server.
  • Cloned server conflicts: Detects if a cloned VM is trying to write to the same target directory as the original server and pauses writes automatically so neither server corrupts the other's history.

Once a week, ODAC also runs automated integrity verification on every backup target, reading and validating a random sample of stored files (5% on local disks, SMB, and NFS shares; 1% on S3 and WebDAV targets to keep egress costs minimal). If any file shows damage or missing blocks, ODAC flags the target immediately and escalates subsequent checks to full verification until the issue is resolved.

For teams running multiple servers against a single shared disk, SMB share, or NFS export, ODAC coordinates storage space fairly without needing any central coordinator. Each server tracks its own footprint, keeps a protective free-space floor (the larger of 10% or 5 GB) on filesystem targets, and never deletes another server's backups.

Step 5: Local Snapshots, Safe Previews, and Rollback-Safe Restores

Sometimes you do not need to pull gigabytes from S3 because a migration just went sideways five minutes ago. Alongside off-server backups, ODAC maintains fast, automatic local Snapshots before deployments, app deletions, ODAC updates, version changes, and restores.

Switch to the Snapshots tab in the Backups header at app.odac.run (or run odac snapshot list in the terminal) to browse every app's local recovery points, complete with trigger labels, sizes, and consistency badges.

ODAC Backups page on the Snapshots tab with PostgreSQL expanded, displaying recent local snapshots, triggers, sizes, Consistent badges, and Restore buttons

When it is time to recover data from either a Backup or a Snapshot, clicking Restore opens the Restore data preview dialog. ODAC never modifies live data blindly: it reads the restore point first and shows you an exact preview of what will happen before you commit.

You get two distinct restore modes tailored to the job:

  • As a new app (default for backups): Restores the backed-up data into a brand-new cloned app right next to your live service. ODAC automatically updates linked environment references so the clone talks to its own restored database instead of touching production, and strips domains and host ports so traffic stays unaffected.

ODAC Restore data modal in As a new app mode showing the code-unchanged notice, restore preview for PostgreSQL-restored, and Restore as a new app button

  • In place (default for snapshots): Replaces the live app's data directly. Before touching a single byte, ODAC takes a fresh safety snapshot (Before a restore), warns you of the exact time window of recent data that will be overwritten, stops the app and any apps linked to it during the swap, and requires you to type the app's exact name to confirm.

ODAC Restore data modal in In place mode showing the red recent-data replacement warning, paused linked shop app notice, typed confirmation, and Replace the data button

Every restore protects against catastrophic mistakes. If you try an in-place restore from a backup taken on an older major database version (such as restoring PostgreSQL 17 data into a PostgreSQL 18 container), ODAC blocks the restore and instructs you to roll the app version back on the Live Canvas first.

While an in-place restore runs, you can follow progress live on the Live Canvas, where the restoring app and any paused linked apps appear dimmed with a Restoring data... indicator until everything restarts cleanly. If a power failure or crash interrupts the restore mid-flight, ODAC automatically rolls your data back to its previous state so you are never left with half-restored volumes.

ODAC Live Canvas showing the shop and PostgreSQL app cards dimmed in the Restoring data state during an active in-place restore

Need to migrate apps to brand-new hardware? Connect the same off-server target using your recovery key on the new server, browse the previous server's restore points in the Dashboard or via odac backup target servers -t offsite-r2, and launch a restore directly onto the new machine:

odac backup points -t offsite-r2 --server <old-server-id>
odac backup restore apps -t offsite-r2 --server <old-server-id> --run <run-id> --apps shop

If an entire machine is lost and you also included ODAC's own server state in your backup job, spin up a fresh server, attach your target with its recovery key, and recover the server configuration, certificates, and mail setup directly from the local CLI:

odac backup restore state -t offsite-r2

For security, full server state recovery is intentionally restricted to the local CLI on a fresh machine with no existing apps, and is never exposed through the web dashboard.

Ship Stateful Apps Without the 3:00 AM Anxiety

Backups only matter on the worst day of your infrastructure's life. By combining zero-downtime database consistency, client-side encryption, automated integrity verification, and previewed restores in one unified workflow, ODAC v2.4.0 removes the fragile glue code that makes self-hosted disaster recovery brittle.

Head to app.odac.run, open Backups on your project, and connect your first off-server target in under two minutes.