# The Importance Of Fast Recover From Data Loss

+ Purpose of rapid data loss recover: repair data as soon as possible and recover business.


![left](./student-guide/diagram/22-The-importance-of-fast-recovery-01-01.png)

------------------------------------------------------------

In the course of the operation of business systems, it is not uncommon for data to be accidentally deleted. First priority: repair data as soon as possible and get recover business!
Depending on the data backup method, we can divide the common methods of data recover into:
Typical DBA tasks

recover from physical/logical backups. recover time is generally positively correlated with the amount of data, and the business side impact will increase relatively.

Database Schema — Supports Aged Replication latency Slave
A secondary database exists in a database high-availability architecture, and the secondary database supports deferred replication. Such as MySQL latency replication, Oracle DataGuard latency, etc. Satisfies rapid recover in the implement data loss.
  - Disadvantages
    - High hardware cost: need to build a set of secondary database
    - Limited time span to recover data and is relatively inflexible: determined by parameters related to late-delayed replication

Data playback platform
Complete data playback process to meet rapid data recover. For example, MySQL is based on native data playback in binlog row format, which facilitates quick data recover in case of data loss.
  - Advantages
    - Platform automation, easy operation, one-click data recover
  - Disadvantages
    - Higher cost
      - Labor cost: development and construction platform
      - Hardware cost: separate log storage server or secondary database

Fast recover based on MVCC
 recover based on MVCC historical versions, such as Oracle's Flashback table.
  - Advantages
    - Data recover is simple and convenient, reducing the complexity of recover tasks: read historical data via standard SQL interface
    - Timely recover: no need to play back up files, read data based on MVCC, what you see is what you get
    - Low hardware costs: costs are manageable, except for MVCC historical versions that take up additional storage space
  - Disadvantages
    - Limited time span for recover data: due to performance issues, historical versions of data are periodically deleted and not kept indefinitely