People who code: we want your input. Take the Survey

Making copies of data which may be restored after a data loss event or to recover data from some earlier point in time.

Backups have two distinct purposes. The primary purpose is to recover data after its loss, be it by data deletion or corruption. The secondary purpose of backups is to recover data from an earlier time, according to a user-defined data retention policy.

There are two types of backup : Physical and Logical


Cold backups copy database files when the database is offline. This would be done by shutting down the database, copying the database files, and starting the database back up. Although this is a reliable backup method, many databases have availability requirements that preclude its use.

Hot backups use software that understands the state of the database to make a consistent copy of the database files without requiring the database to be taken offline.

Some systems can capture transaction logs which can be used in conjunction with an earlier backup to effectively have a backup for any point in time for which the logs cover.

Some OS and disk systems can take a snapshot of the database files providing a point in time which the files can be restored to. When this type of backup is done and the snapshot is restored, the system will behave similarly to a loss of power and likely will need recovery.


A logical backup makes a copy of the objects in the database independent of their physical location. This copy could have an export specific format or be in the form of SQL statements.

See the backup article on Wikipedia for further information.