Open BAK File

Information, tips and instructions

Database Backup

Databases are one of the key components of the modern software. Almost any software you interact with over the internet uses databases to store and retrieve information. Backing up data from databases is extremely important task because any data loss of corruption in the database could lead to disastrous consequences. That is why over years several methods were developed to backup and restore data from the database. Below we will describe most popular approaches to database backups.

Physical Backup

Physical backup of a database includes backup of all files used in the database. To ensure integrity physical backup should be performed by a software provided by database vendor to make sure that data in the backup is consistent and includes all files required by the database. It may include data files, control files, redo logs and more. If you just copy the database files it is possible that you will do it in the middle of the database operation and only partial transaction data will be saved. This will lead to the database engine failure when you try to restore database from such a backup. That’s why you should follow strictly to the vendor instructions when performing a physical backup of the database.

  • If backup is performed when database is currently running it is called hot backup.
  • If backup is performed on a stopped database it is called cold backup.

Logical Backup

Logical backup is a backup which backups logical components of the databases like tables, indexes, triggers, stored procedures and more. Logical backups provide a very granular level of the database backup because each individual database entity is stored as a separate entry in the backup file. That means that you may be able to restore only specific entity from the backup rather than restoring an entire database. At the same time full logical backups are typically slower because they require database engine to go through entities and write them out to the backup. In case of physical database backup is just a file copy operation is required with no additional processing.

It is helpful to have both logical and physical backups stored for production systems. Physical backups may be used for full disaster recovery scenarios and logical database may be used for incremental recovery.