Type of Database Backup - Physical and Logical
Last Updated :
12 Aug, 2022
Pre-requisites: Various types of Backup
A database backup is a copy of storage that is stored on a server. Backup is used to prevent unexpected data loss. If original data gets lost, then with the help of a backup, it is easy to gain access to the data again.
There are two types of database backup.
- Physical backup
- Logical backup
Physical Backup:
Physical database backups are backups of physical files that are used to store and recover databases. These include different data files, control files, archived redo logs, and many more. Typically, physical backup data is kept in the cloud, offline storage, magnetic tape, or on a disc.
There are two methods to perform a physical backup :
1. Operating system utilities
2. Recovery manager
This type of backup is useful when the user needs to restore the complete database in a short period. It is beneficial to provide details of transactions and changes made in databases. It is considered the foundation of the recovery mechanism. This form of backup has the drawback of slowing down database operations.
Advantages:
- It is useful when the user needs to restore the complete database in a short period.
- They provide details of transactions and changes made in databases.
Disadvantage:
- This slows down database operations.
Logical Backup:
It contains logical data which is retrieved from the database. It contains a view, procedure, function, and table. This is useful When users want to restore or transfer a copy of the database to a different location. Logical backups are not as secure as physical backups in preventing data loss. It only provides structural details. Every week, complete logical backups should be performed. Logical backups are used as a supplement to a physical backup.
Advantages:
- This is useful when the user needs to restore the complete database to the last time.
- It was more complex and provides granular recovery capabilities.
Disadvantages:
- Critical for recovery of special components.
- less secure compared to physical backup.
- It only provides structural details.
Physical Backup Vs Logical Backup:
Physical Backup
| Logical Backup
|
---|
Physical database backups are backups of physical files that are used to store and recover databases. | Logical database backups are backups of logical files that are retrieved from the database. |
It contains data files, control files, and archived redo logs. | It contains a view, a procedure, a function, and a table. |
It copies data files when data is running or stopped. | Using the EXPORT keyword Logical backup is done |
A user needs to restore the complete database in a short period of time. | This is useful when users want to restore or transfer a copy of the database to a different location. |
More secure than logical backup. | Less secure as compared to Physical backup. |
Both backup strategies are beneficial. The user can select their technology based on their requirements and organizational demands.
Similar Reads
Physical and Logical Data Independence Data independence refers to the ability to change the schema (structure) at one level without affecting the schema at higher or lower levels in the DBMS architecture. It ensures that changes in the data storage and structure do not impact the overall functioning or application programs using the dat
4 min read
Concept of Time in database A database is used to model the state of some aspect of the real world outside in the form of relation. In general, database system store only one state that is the current state of the real world, and do not store data about previous and past states, except perhaps as audit trails. If the current s
2 min read
What is Cold Backup and Hot Backup in Oracle? In Oracle database management, backup strategies play a critical role in ensuring data availability, security, and recoverability. Two primary backup methods, hot and cold backups, are employed to safeguard database information. A hot backup is performed while the database is online and operational,
6 min read
Difference between Physical and Logical Data Independence Data Independence therefore refers to the nature whereby one can change the structure of the database without having to change its implementation or data. There are two types of data independence: The first type is the Physical one as well as the second type is the Logical one. As will be seen, both
6 min read
Logical Database A Logical Database is a special type of ABAP (Advance Business Application and Programming) that is used to retrieve data from various tables and the data is interrelated to each other. Also, a logical database provides a read-only view of Data. Structure Of Logical Database:A Logical database uses
4 min read