The main difference between backup and recovery is that backup is a copy of the data that can be used in a database failure whereas recovery is the process of restoring a database to the correct state. when a fault occurs.
DBMS (Database Management System) is software that helps manage databases easily and effectively, allowing users to organize data in an organized manner. DBMS provides multiple advantages. It allows you to store, manipulate and retrieve data from databases. It also enables transactions and provides data protection. Backup and recovery are two main concepts related to DBMS.
Key Areas Covered
1. What is backup?
– Definition, Functionality
2. What is recovery
– Definition, Functionality
3. What is the relationship between backup and recovery?
– Association scheme
4. What is the difference between backup and recovery?
– Comparison of key differences
Backup, Logical Backup, Physical Backup, Recovery
What is backup?
A backup is a representative copy of the data. It includes important elements of a database, such as control files, data files, etc. There may be unexpected failures in the databases. Therefore, it is a better solution to keep a backup of the database. There are two main types of backups. They are the physical and logical backups.
Physical backups are copies of physical database files, such as data files, checkpoint files, archived redo logs, and log files. They are copies of files that store database information in another location. They are the basis of the recovery mechanism in the database.
The other type of backup is logical database files. These logical backups contain the logical data that is extracted from a database. It consists of views, functions, tables, procedures, etc. However, taking only logical backups is not very beneficial because they only provide structural information. In general, taking backups is useful as it helps in a database failure.
what is recovery
Recovery helps restore a database to the correct state when an error occurs. In other words, it allows the database to come to a consistent state after a sudden failure. Therefore, the recovery process improves the reliability of the database.
It is possible to recover the database using log-based recovery. A record is a sequence of records that contains records of a transaction. The record of each transaction is kept in some stable storage. Helps to recover the database during a failure. The log contains information about the transaction to be executed, the modified values and the status of the transaction. All this information will be stored in the order of execution.
Also, it is possible to recover in concurrent transactions. Records can be interleaved when two transactions are running simultaneously. It is a difficult process to recover the system and return all records to an earlier point. A checkpoint is a solution to this problem. Control points work as reference points.
This mechanism removes old logs from the system and stores them permanently in a storage system. Declares a point at which the DBMS was in a consistent state. It also involves tasks such as writing log records from main memory to secondary storage and writing checkpoint records to the log file. When a transaction fails, the recovery system adds the checkpoint to the transaction.
Relationship between backup and recovery
- Backups can speed recovery.
Difference Between Backup and Recovery
Backup is a copy of data that is used to restore the original after a data loss event. Recovery is the process of recovering inaccessible, lost, damaged, corrupted or formatted data to its original state. These definitions explain the main difference between backup and recovery.
A backup is a replication of data while recovery is a process to store the database.
Backup and recovery are two main concepts related to DBMS. The difference between backup and recovery is that backup is a copy of the data that can be used in a database failure whereas recovery is the process of restoring a database to the state correct when a fault occurs.
1.”Data Recovery: Dos and Don’ts” By BagoGames via (CC BY 2.0) via Flickr