NoSQL databases are often perceived in operation as “easy to scale” – when it comes to backup, sobering moments follow. “A dump is enough” rarely works for distributed systems, and even a successful backup run tells you little about whether a consistent state can be RESTored from it. This article addresses precisely that: Backups for NoSQL systems (using MongoDB and Cassandra as examples) require deliberately planned consistency points (defined, coherent data states), a reliable incremental strategy and, above all, a RESTore process that remains reproducible under time pressure.
The focus is on what admins and operators actually need day to day: prerequisites, typical pitfalls, verification steps, implementation, troubleshooting and a rollback strategy. Where commands are useful, there are copyable blocks – without getting lost in tool marketing or framework internals.
Backups for NoSQL systems in practice
Many NoSQL systems are distributed (multiple nodes), use replication (data stored redundantly) and allow eventual consistency (delayed convergence). That is good for availability – bad for naive backup methods.
Typical operational failure patterns:
- “Backup completed, RESTore is broken”: Data were not consistent at the time of backup (e.g. a snapshot without a clean checkpoint or without a matching transaction/log position).
- Cluster-wide state missing: Only data files were backed up, but no metadata/cluster configuration (replica set config, keyfiles, TLS keys, schema/indices, token/topology info).
- Incremental chain is unusable: A segment is missing, log rotation was too aggressive, or time windows don’t overlap (for MongoDB, e.g. Oplog range too small).
- RESTore takes too long: RTO (maximum tolerable recovery time) is ignored until an incident occurs – then rebuilds, repairs, replays or network bandwidth become blocking factors.
The consequence: NoSQL backup is less “copy files” and more a defined data state plus a traceable path back – including testing.
Basic concepts: consistency point, RPO/RTO and “incremental” in the NoSQL context
Consistency point means: there exists a point in time/state at which the data are presented such that the database process will accept them as valid on startup and they are logically consistent. In traditional databases this is achieved via write-ahead logs (WAL) and checkpoints. NoSQL systems have equivalents – but they differ.
RPO (Recovery Point Objective) is the maximum tolerable data loss measured in time (e.g. 15 minutes). RTO (Recovery Time Objective) is the maximum tolerable recovery duration (e.g. 2 hours). Both values determine whether you rely on snapshots, log shipping, incremental strategies, replication or combinations thereof.
Incremental backup means in practice: you do not back up the full dataset every time, but only changes since the last checkpoint. In NoSQL this is often log-based (e.g. MongoDB Oplog) or file-/segment-based (e.g. Cassandra SSTables plus commitlog). Important: “incremental” is only as good as the reconstruction chain and its validation.
Consistency points in MongoDB: snapshots, checkpoints and Oplog
Depending on version/storage engine, MongoDB typically uses WiredTiger. WiredTiger creates checkpoints (consistent on-disk states) and additionally uses journaling (recovery logic). For backups the decisive factor is which objective you pursue:
- Crash-consistent: Data files are copied while the system is running (e.g., a storage snapshot). MongoDB can, on startup, reconstruct a consistent state from the journal/recovery — but that is not automatically a “clean” application consistency point across multiple nodes.
- Replication-/point-in-time-consistent: You back up a state that corresponds to a defined Oplog point in time (Oplog = operation log, a ring buffer of replicated changes in the Replica Set). This allows you to restore up to a specific point in time (PITR-like, point-in-time recovery).
Proven pattern: Backup from a Secondary (or Hidden) Node
In Replica Sets it is common to take the backup from a Secondary or a Hidden node (Hidden = participates in replication but does not serve reads). Advantage: less load on the Primary. Risk: if the Secondary lags significantly (replication lag), you will back up a state that is considerably older compared with the Primary — relevant for your RPO.
Before backing up, check at minimum: replication status, lag, oplog window. Example commands:
mongosh --quiet --eval 'rs.printReplicationInfo()'
mongosh --quiet --eval 'rs.status().members.map(m => ({name:m.name, state:m.stateStr, optimeDate:m.optimeDate, health:m.health}))'Why this helps: rs.printReplicationInfo() shows, among other things, the oplog time span („log length“). If your incremental approach is based on the oplog, the oplog range must be larger than your backup interval plus buffer (maintenance windows, incidents, delays).
Snapshot backup: obtaining a consistent state without stopping MongoDB
If you use storage snapshots (LVM, ZFS, SAN/array, cloud volume snapshots), the goal is a point-in-time filesystem state. That is initially only “crash-consistent”. For MongoDB this is often sufficient, provided you include the journal in the backup and the snapshot is cleanly atomic (no partially completed writes across multiple volumes).
Practical operational rules:
- One volume per MongoDB data path (or a snapshot taken synchronously across all involved volumes). If data and journal are on separate volumes, both must fall into the same snapshot point in time.
- Do not copy files with rsync while the server is running as a “cheap backup”. It often appears to work until the first time it doesn’t.
If your goal recovery to an exact point in time, you additionally need an oplog-based chain or a mechanism that records the log position. A snapshot without a reference point can be started, but cannot be deterministically rolled forward „to 10:37:15“.
Incremental in MongoDB: Oplog as change stream – with two caveats
For „incrementals“ the Oplog is the obvious choice: it contains the replicated operations. Two typical caveats:
- Oplog is a ring: If your Oplog is undersized, it overwrites old entries. Then your incremental chain breaks, even if all backup jobs are „green“.
- Topology and role changes: Failover, rollback scenarios or re-syncs can cause a node to have a different history. In such cases, „advancing the Oplog“ without a clear source is risky.
Operationally this means: size the Oplog window so that it covers multiple backup cycles, and monitor lag and Oplog retention. In addition, RESTore tests should always include a „log-replay“ step; otherwise PITR remains theoretical.
Consistency points in Cassandra: SSTables, Commitlog and snapshot logic
Apache Cassandra is a distributed wide-column system. Data first land in the Memtable (in-memory structure) and are then written to disk as SSTables (Sorted String Tables, immutable file segments). Additionally there is the Commitlog (write-ahead log), which secures writes until they are flushed to SSTables.
For backups this means:
- A consistent state often consists of SSTables plus the corresponding commitlog segments (if you want to be closer to „up to the last write“).
- „Snapshot“ in Cassandra usually means: hardlinks/copies of the current SSTables per keyspace/table – not necessarily a storage snapshot.
- Because Cassandra is distributed, cluster-wide consistency is harder: a snapshot on node A is not automatically the same state as on node B.
Cassandra snapshots: fast, but only as good as your RESTore path
Cassandra can create snapshots per node, typically via nodetool. That is fast because SSTables are immutable and often only hardlinks are created. Example:
# Snapshot für einen Keyspace auf einem Node
nodetool snapshot --tag nightly_2026-08-19 my_keyspace
# Auflistung vorhandener Snapshots
nodetool listsnapshotsWhy this works: SSTables are not modified after being written. A snapshot references exactly those files. When it fails: If during RESTore you do not know precisely which SSTables belong to which point in time and which topology, or if you only have snapshots from a subset of the nodes (depending on replication factor and token distribution).
Incremental backups in Cassandra: „incremental backups“ vs. truly incremental
Cassandra offers „incremental backups“ as a feature where new SSTables are additionally hardlinked/copied into a backup directory. That is useful, but not a complete backup concept: you still need snapshots as a baseline and must control the chain (retention, cleanup, RESToration).
Important operational aspects:
- Compaction (background process for merging SSTables) generates new SSTables and makes old ones obsolete. That affects which files you need to back up and how quickly backup directories grow.
- Commitlog: Depending on RPO/RTO requirements it may be necessary to back up commitlog segments or at least ensure that snapshots are taken after a flush to minimize commitlog dependencies.
- Repair: Cassandra requires regular repairs (reconciliation between replicas). A RESTore without a subsequent repair strategy can lead to „silent“ inconsistencies.
Building incrementals correctly: three strategies that work in practice
Mechanisms differ between MongoDB and Cassandra, but planning often follows similar patterns. Three strategies that recur in operations:
1) Full + Log-Shipping (PITR-like)
You regularly create a full backup (snapshot/dump) and persistently back up logs/change streams. In MongoDB this is typically Oplog-based; in Cassandra it is typically commitlog-oriented (or handled via external streaming/CDC approaches, if available). Advantage: good RPO. Disadvantage: RESTore is more complex because replays and ordering must be correct.
2) Full + „Block-/File-Incremental“ (storage/backup system produces deltas)
Here a backup system handles deduplication and block incrementals (e.g., at the filesystem level). Advantage: less database-specific logic. Risk: you will get „deltas“, but no guaranteed application consistency if the consistency point is not produced cleanly (quiesce/checkpoint/coordinated snapshots).
3) Replication is not backup — but a useful building block
Replication (replica set, multi-DC in Cassandra) primarily protects against node failures and increases availability. It does not replace backups, because logical errors (deletions, faulty jobs, ransomware using valid credentials) are replicated. In practice, replication is combined with backups to reduce RTO and to use backups as the „last resort“.
RESTore reality: what you must always back up in addition to the data
Many RESTore problems do not stem from missing data files but from a missing „operational environment“. Define what belongs to a recoverable state:
- Configuration: mongod.conf / cassandra.yaml, JVM options, parameters for storage, network, auth.
- Security material: TLS certificates/keys, keyfiles, keystores/truststores, KMS/Vault references, passwords/secrets (with their own backup concept).
- Cluster metadata: replica set name, seed nodes, token/rack/DC topology (Cassandra), auth/RBAC definitions.
A good approach is to store these artifacts versioned (e.g., in a secured Git repo) and additionally capture them in the backup, so that a RESTore remains possible even in the event of tool/repo failures.
Practical how-to: preflight checks before every NoSQL backup
Preflight means: you check conditions that cannot be repaired later. The checks are short, but they save hours during a RESTore.
MongoDB preflight: replication, oplog, storage, locks
- Replica set stable, no re-sync, no persistent lag
- Oplog window larger than the backup interval + buffer
- Sufficient free space for snapshot/export and for a RESTore test
- No maintenance (e.g., index rebuild) conflicting with the snapshot window
# Basisstatus und Oplog-Fenster prüfen
mongosh --quiet --eval 'rs.status().ok'
mongosh --quiet --eval 'rs.printReplicationInfo()'
# Optional: wichtige Server-Infos (Version, Storage Engine)
mongosh --quiet --eval 'db.serverStatus().version'
mongosh --quiet --eval 'db.serverStatus().storageEngine'Cassandra preflight: cluster health, pending compactions, repair/streaming
- All nodes „UN“ (Up/Normal), no unstable nodes
- No large streaming operations or runaway pending compactions
- Backup tag/naming scheme consistent (for later correlation)
nodetool status
nodetool tpstats
nodetool compactionstatsInterpretation: A snapshot taken during heavy compaction is not inherently „wrong“, but you must expect growth and longer runtimes. For operators the decisive point is: snapshots should be predictable, not „it will finish sometime“.
Plan the RESTore: sequence, checks and fallback strategy
RESTore is not a single command but a controlled sequence. A RESTore runbook with clear gates (go/no-go) and a rollback plan has proven effective.
RESTore gates: three checkpoints you should not skip
- Artifacts complete? Data + config + security material + version information. Missing keys or incorrect config will cost time later.
- Target environment correct? Versions compatible (MongoDB/Cassandra), kernel/filesystem appropriate, storage performance sufficient. A RESTore onto „any VM“ is often the start of a long night of work.
- Validation after RESTore: service starts, cluster stable, consistency/integrity checks, application smoke tests, monitoring back to green.
Fallback strategy: if the RESTore does not complete cleanly
Plan a defined fallback instead of improvising ad hoc:
- Parallel RESTore: perform the RESToration in an isolated environment (separate VLAN/namespace), then perform a controlled switch-over (DNS/load-balancer). This prevents a half-finished RESTore from overwriting production data.
- Read-only phase: If possible, put applications into read-only (or degraded) mode to stop data changes before you roll back.
- Last known good backup: Define which generation is considered a “Known Good” (has passed a RESTore test), and document the path to it.
Troubleshooting: Common pitfalls in MongoDB and Cassandra backups
MongoDB: Oplog too small, failover at the wrong time, snapshot without journal
Symptom: Incremental replay not possible because oplog gaps occur.
Cause: The oplog window does not cover the interval, or you are backing up from a node with an unstable history (rollback).
Countermeasures:
- Increase and monitor oplog sizing (trend over days/weeks).
- Fix the backup source (e.g. Hidden Secondary) and account for failover scenarios in the backup logic.
- Design the snapshot strategy so that journal and data paths are consistently backed up together.
Cassandra: Snapshot only on some nodes, wrong order, repair gap
Symptom: RESTore starts but data is incomplete or queries return different results depending on the node.
Cause: Snapshot was not coordinated cluster-wide (for all relevant replicas), or RESTore was put into production without a subsequent repair strategy.
Countermeasures:
- Automate the snapshot runbook per node and collect success centrally (do not „hope via SSH“).
- Always couple RESTore with a defined post-RESTore plan (e.g. repair/validation), aligned with replication factor and consistency level.
- Keep retention and cleanup disciplined: strict discipline on tags/retention periods, otherwise the chain is no longer traceable.
Backup validation: How to test recoverability without risking production
„Backup successful“ is only a signal that data were written. Whether they are recoverable is shown only by a test. For NoSQL a staged approach is recommended:
- Technical RESTore test: RESTore data into an isolated environment, DB starts, cluster forms, basic functions operate.
- Logic-/smoke tests: Example queries, counts, spot checks (e.g. important collections/keyspaces), optional checksum/comparison methods.
- RTO measurement: Time the operations (download/decrypt/RESTore/rebuild/repair). If the RTO does not meet requirements, optimize RESTore paths, not just increase backup frequency.
Important for day-to-day operations: RESTore tests do not have to verify „everything“ every time. But there should be a regular complete drill in which the team runs the process, documents logs and timings, and improves the runbook.
Checklist: Minimal standard for backups of MongoDB and Cassandra
- Defined targets: RPO/RTO in writing, incl. exceptions (maintenance windows, large deployments).
- Source node specified: MongoDB prefers Secondary/Hidden, Cassandra snapshot plan per node.
- Consistency point documented: time/date, oplog/log position, snapshot ID, version information.
- Incremental chain monitored: oplog window, log retention, storage growth, compaction effects.
- Config & Security safeguarded: configurations, keys, certificates, secret references.
- RESTore runbook available: sequence of steps, gates, rollback, responsibilities.
- Regular RESTore tests: isolated, documented, with RTO measurement.
Conclusion: NoSQL backup is a RESTore project – not just a backup run
With MongoDB and Cassandra it’s not the “whether” but the “how”: Consistency points must be deliberately created and made traceable, Incrementals need a robust chain (Oplog/Logs/SSTables) and RESToration must exist as a practiced process. If you establish preflight checks, clean metadata and regular RESTore exercises, backups turn from a compliance task into a reliable operational tool – even when at 03:00 in the morning nobody has time for experiments.
Mongodb Backup and Cassandra Backup are also important for this topic. This article puts these aspects into context clearly and shows what matters in day-to-day operations.