“Application-consistent” vs “crash-consistent” is one of those phrases that sounds like marketing jargon but is actually the most operationally consequential distinction in backup work. The difference decides whether your backup restores cleanly or restores with innodb_force_recovery=4, whether your replica resumes replication or needs to be rebuilt, whether your application starts immediately or needs database repair. This article defines the terms precisely, maps each common backup pattern to which consistency level it achieves, and walks through the decision tree we apply when designing a backup strategy for a new engagement.
How to verify
For any backup tool already in production, ask three questions of its configuration:
# 1. Does the tool issue a database quiesce before the snapshot/copy?
grep -i "pre-backup\|hook\|freeze" /etc/<backup-tool>/config
# 2. Does the storage layer guarantee atomic snapshots of the data + log directories together?
mount | grep -E '(mysql|postgres|mongo)'
lvs -o name,vg_name,attr
# 3. After restore in a scratch environment, does the engine start without recovery messages?
journalctl -u postgresql | grep -i 'recovery'
journalctl -u mysql | grep -i 'recovery\|crash'
If the answers are “no quiesce / data and log on separate volumes with no atomic snapshot / recovery messages on every restore”, you have a crash-consistent backup at best — sometimes worse.
What’s happening
Crash-consistent means: a snapshot of the storage layer at one instant, as if someone unplugged the power. The application is mid-transaction; its in-memory state is gone; only what was written to disk persists. The application starts from this image as if it had crashed — its own crash-recovery code runs (redo logs, journals, fsck) and either succeeds or fails depending on whether the disk state happened to be recoverable.
Application-consistent means: the application is told to stop writing, flush its in-memory state to disk, and acknowledge that it’s at a known consistent point. Then the snapshot happens. When the application restarts from this image, it skips recovery — there’s nothing to recover because the disk state is internally consistent.
The difference is not academic:
- A crash-consistent backup of MySQL with
innodb_flush_log_at_trx_commit=1will almost always restore via InnoDB crash recovery. “Almost always” is not the same as “always”; we have seen 1-in-200 cases where a torn-page write at snapshot time caused the recovery to fail, requiringinnodb_force_recoveryand data loss. - A crash-consistent backup of a database with multiple tablespaces on separate volumes (where the snapshot was not atomic across volumes) restores to an inconsistent state and may corrupt silently.
- A crash-consistent backup of an application that writes its own files (think Git, Maildir, document stores) restores files that the application can read, but the application’s notion of “what was written” may not match the file state.
Application-consistent is achieved through three mechanisms:
- Database quiesce:
FLUSH TABLES WITH READ LOCK(MySQL),pg_backup_start()(PostgreSQL),db.fsyncLock()(MongoDB), shutdown of the writer (some NoSQL stores). - Filesystem freeze:
fsfreeze -fblocks new writes and waits for in-flight writes to complete, then the snapshot fires, thenfsfreeze -ureleases it. - VSS on Windows: the Volume Shadow Copy Service coordinates with VSS-aware applications (SQL Server, Exchange, IIS) to pause and flush before the snapshot.
The trade-off: application-consistent backups require coordination with the application, which means downtime (FTWRL blocks writes for the snapshot duration) or write-locks (pg_backup_start does not block but coordinates differently). Crash-consistent backups can be taken without touching the application but trade that simplicity for restore risk.
The decision
Our decision tree for a new engagement:
-
Database workload? If yes, the backup tool must issue an application-consistent capture via the database’s own protocol. For MySQL: Percona XtraBackup, mysqldump, or LVM snapshot + FTWRL. For PostgreSQL: pgBackRest, WAL-G, or LVM snapshot + pg_backup_start. For MongoDB:
mongodumpor filesystem snapshot withdb.fsyncLock(). Crash-consistent is not acceptable for databases. -
Filesystem-only data (web content, user uploads, document stores)? Crash-consistent is acceptable but only when the application can be restarted cleanly after a power-cut. If the application has its own write-ahead log (Git, Bazaar) crash-consistency is usually fine. If the application uses many-small-files with rename-based atomic updates (Maildir, qmail-style queues), crash-consistency is generally OK because the application is itself designed to survive crashes.
-
VM-level snapshots (cloud volume snapshots, ESXi snapshots)? These are crash-consistent unless the guest’s quiesce agent participates (qemu-guest-agent on KVM, VMware Tools, AWS Backup with quiesce). We never trust a VM snapshot of a database without confirming the agent quiesce ran.
-
Kubernetes PVs? Velero backup hooks let you script the quiesce on the pod side before the volume snapshot. We use them for databases; for stateless workloads, the snapshot alone is fine.
-
The “we take snapshots every hour” pitch. Whenever a client says this, we ask “and what quiesces the application?” The answer is almost always “nothing.” That’s a crash-consistent backup; we either add the quiesce or replace the tool.
Operational notes
- Always run a restore drill in a scratch environment. The drill is the only test that distinguishes a healthy chain from a “successful backup” report that doesn’t restore. We do quarterly for production databases.
- Multi-volume databases (data + WAL on separate volumes, multiple tablespaces) require atomic snapshots across all volumes. Cloud-provider “multi-volume snapshot” features exist (AWS Snapshot Lock, Azure Snapshot Sets) but verify the consistency claim with a restore test.
- “Crash-consistent” does not mean “useless.” For everything except database engines and write-ahead-log applications, crash-consistent is the right cost/value point. Reserve application-consistent for workloads where the recovery cost would be greater than the quiesce cost.
- The hardest case is microservices with multiple databases. Each database needs its own application-consistent capture; the snapshots must be coordinated to a single logical timestamp if cross-database referential integrity matters. We use Velero hooks + per-database tooling for this.
- Application-consistent backups still need WAL/transaction logs for full recovery, not just the snapshot. A snapshot at T0 plus WAL until T0+5 lets you restore to T0+5; the snapshot alone restores only to T0.
In the engagements we run, the consistency level of every backup tier is a decision we record explicitly — daily backup is application-consistent (the only acceptable level for databases), the hourly tier is crash-consistent (acceptable for the filesystem half of the workload), the offsite copy preserves the consistency level of whatever it copies. The full strategy we wrap is at /en/services/managed-operations/, and the operating model for clustered databases sits in Clustered Environments.