TerminusX Logo Colour

Database Disaster Recovery

How TerminusDB can save you time in daily life

A database disaster is an event that causes data loss or any serious disruption to applications and services. The cause of a disaster can be numerous: power failure, hardware failure, cyber-attacks, natural disasters, fire, earthquakes, vandalism, and human error. Some database server disasters cannot be prevented. That’s why a good database disaster recovery plan is important.


Disaster recovery plan.

Here are a few examples of cloud database disaster recovery solutions that provide some security following an outage:

  • Active geo-replication
  • Auto-failover groups
  • Geo-restore
  • Zone-redundant databases

In reality, how often does your database face earthquakes, fire, or other natural disasters?

Not very often.

What is the biggest issue?

Human error cause for database disaster

That’s right it’s…

Let's look at a typical case of database human error...

Human error causing lost data

Let’s recap quickly. 

At 9 am, the database is backed up. 10 minutes later some correct data is inserted.

9:25, a user adds some incorrect data. Even worse, at 9:45, a user overwrites the correct data inserted earlier with wrong data.

At 10:00 am the database is backed up.


Data is lost!

The database recovery plan is in place, and there are two backups. One at 9:00 am and one at 10:00 am.

If someone notices the errors, or applications start malfunctioning there is one option. The 10:00 am backup contains the wrong data. This is no good.

If we rollback to the 9:00 am backup, we get back to the correct data, but the data added at 9:10 is lost.

TerminusDB with built in version control for human error proof database disaster recovery

Let us now explore the same scenario as above, but this time using TerminusDB with its version control functionality.

Database version control provides disaster resilience for human error

Have we lost our data?

No! In TerminusDB, data recovery and repair is made easy using a very simple solution:

  • Time-travel – You can move backward and forwards through each commit to the database. Each commit, be it a new entry, update, or deletion, is stored with a unique commit ID. These commits are snapshots of your data at that moment in time.
  • Branch – Travel back in time to the commit where errors occurred. A user can then remove or correct inaccurate data. Furthermore, users can change multiple commits to fix various issues, such as the example here, the user will need to fix the data inputs from 9:25 and 9:45.
  • JSON diff & patch – Another useful tool for database professionals is diff and patch. This is particularly relevant when comparing large JSON documents. Users can quickly see what’s changed in the commit and then decide the appropriate course of action to fix issues.

How does TerminusDB do revision control?

TerminusDB uses delta encoding, a way of storing and transmitting data in the form of deltas (differences) between sequential data rather than complete files. Deltas are stored in succinct terminusdb-store structures.

TerminusDB is an immutable data store. When data is written to a store, it does not change or mutate existing data. The immutable nature means information about what was committed, at what date and time, and by whom are stored within a commit-graph.

The commit-graph provides revision control functionality. It contains all the information required for time-travel, branch, squash, reset and rebase operations. 

With TerminusDB, all you need to worry about is the nuclear apocalypse. Human errors are no longer a concern.

Revision control is more than database disaster recovery

These TerminusDB features are a great way to save you time and ensure data loss is at a minimum. However, they also provide many other benefits for your applications, particularly when you have collaborative applications with many users. Have a read about how TerminusDB’s database version control provides the backbone of collaborative applications

Why not give TerminusDB a try?

TerminusDB - Open source now and forever

Build quickly with the simplicity of JSON documents and turn objects into powerful knowledge graphs to solve complex problems. Open source, now and forever.

TerminusX - A toolkit to build applications

TerminusX is a cloud self-service data platform built on TerminusDB to enable rapid and collaborative development of applications and data products.

Latest Stories
Talk to the team
If you've got questions or want to be part of the TerminusDB community, come say hi on Discord.