Home > Database > SQL > body text

What are the basic techniques for database recovery?

王林
Release: 2020-07-13 09:19:58
Original
13418 people have browsed it

The basic techniques for database recovery are: 1. Data dump; 2. Register log files. Data dumping is the basic technique used in database recovery. Dumping is a process in which the DBA regularly copies the entire database to tape or another disk and saves it.

What are the basic techniques for database recovery?

#Data dumping and registering log files are the basic techniques for database recovery.

(Recommended learning: mysql tutorial)

Related introduction:

1. Data dump:

Data dump is Basic techniques used in database recovery. The so-called dump is the process in which the DBA regularly copies the entire database to a tape or another disk and saves it. These spare data become standby copies or backup copies.

Dumps can be divided into static dumps and dynamic dumps.

Static dump is a dump operation performed when there are no running transactions in the system. That is, when the dump operation starts, the database is in a consistent state, and no access or modification activities to the database are allowed during the dump. Obviously, what you get from a static dump must be a consistent copy of the data.

Dynamic dump means that the database is allowed to be accessed or modified during the dump. However, the data on the backup copy at the end of the dump is not guaranteed to be correct and valid. To this end, it is necessary to register the modification activities of each transaction to the database during the dump period and create a log file. In this way, the backup copy plus the log file can restore the database to the correct state at a certain moment.

Dumps can be divided into two methods: massive dumps and incremental dumps.

Mass dump refers to dumping the entire database each time. Incremental dump refers to dumping only the data updated since the previous dump. From a recovery perspective, it is generally more convenient to use backup copies obtained from mass dumps for recovery.

Data dump methods can be divided into four categories: dynamic incremental dump, dynamic mass dump, static incremental dump, and static mass dump.

2. Registration log file:

The log file is a file used to record transaction update operations on the database. There are two main formats of log files: log files in records and log files in data blocks.

To ensure that the database is recoverable, two principles must be followed when registering log files:

  • The order of registration is strictly in accordance with the time order of concurrent transaction execution

  • Must log files first and then write to the database

The above is the detailed content of What are the basic techniques for database recovery?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template