Home >>DBMS Tutorial >DBMS Data Backup

DBMS Data Backup

DBMS Data Backup

Loss of Volatile Storage

All the active logs, disk buffers, and related data are stored in volatile storage such as RAM. Moreover, it stores all the transactions that are currently being executed. What happens if such a volatile storage system suddenly crashes? Obviously, it would take away all of the database's logs and active copies. This makes recovery nearly impossible, as all that is needed to recover the data is lost.

In the case of loss of volatile storage, the following techniques could be used

  • In order to save the contents of the database periodically, we can have checkpoints at various stages.
  • The volatile memory state of the active database can be periodically dumped into a stable memory, which can also contain logs, active transactions, and buffer blocks.
  • Whenever the database contents are dumped from a non-volatile memory to a stable one, < dump > may be marked on a log file.


  • It can restore the latest dump when the system recovers from a failure.
  • It can maintain as checkpoints a redo-list and an undo-list.
  • By consulting undo-redo lists, it can recover the system in order to restore the state of all transactions until the last checkpoint.

Database Backup & Recovery from Catastrophic Failure

A catastrophic failure is one where it corrupts a stable, secondary storage device. All the valuable information that is stored inside the storage device is lost. To recover data from such a catastrophic failure, we have two separate methods.

  • Remote backup & minu; Here a backup copy of the database is saved at a remote location from where it can be recovered in case of a catastrophe.
  • Alternatively, it is possible to control database backups on magnetic tapes and store them in a safer place. This backup can later be transferred onto a freshly installed database to bring it to the point of backup.

Grown-up databases are too bulky to be backed up frequently. In such cases, we have techniques where we can restore a database just by looking at its logs. All we need to do here, then, is take a backup of all the logs at frequent time intervals. The database can be backed up once a week, and the logs being very small can be backed up every day or as frequently as possible.

Remote Backup

In the case that the primary location where the database is located is destroyed, remote backup provides a sense of security. Remote backup may be offline or online or in real-time. In case it is offline, it is maintained manually.

restore image

To database administrators and investors, online backup systems are more real-time and lifesavers. An online backup system is a process where two distant places simultaneously back up any bit of real-time data. One of them is directly linked to the system and the other is held as a backup in a remote place.

The backup mechanism senses the failure as soon as the primary database storage fails and switches the user system to remote storage. This is sometimes so instant that a failure can't even be came to realize by the users.