Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Data consistency of backup and disaster recovery

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

The consistency problem generally refers to whether the logical relationship between the data is consistent (correct and complete). For example, for example, when A user is writing data N, B user begins to read data N. because A user has just written half of it, the data read by B user is not logically consistent, which is a kind of consistency problem.

Consistency problems exist in all fields, and most of them are about distributed storage consistency, database consistency, and crash consistency.

Our black side is mainly concerned with the consistency problem in data backup, which is related to the consistency problem mentioned above, but not exactly the same.

The consistency problem in data backup refers to whether the backed up files and data are consistent with the data to be backed up. Two main factors lead to:

1. Due to the existence of various cache, the data actually stored on the hard disk is not consistent with what the user actually sees.

2. In the process of backup, the data may change, resulting in the data before and after the backup in an inconsistent state.

For consistency issues in backups, the black party's solution varies according to the backup method:

1. For scheduled backups:

(1) regular backup of ordinary files, windows system, you can use vss volume shadow backup to solve the consistency problem. VSS service itself ensures that the data is consistent when creating volume snapshot.

(2) the backup of database files can be solved by the backup interfaces provided by the database, and these interfaces API are responsible for ensuring data consistency.

For those who do not provide the API API, they are directly backed up in the form of ordinary files. At this time, there is a problem of crash consistency, that is, the data changes during the backup process. However, considering the robustness of the database itself, data inconsistencies are generally checked, thus triggering rollback to the last consistent state. In practice, it is feasible (but not perfect in theory).

(3) for OS system backup, vss shadow is also used under windows; linux uses the way of file packaging, and the granularity of the file is smaller than that of the whole volume, which can be considered as approximate data consistency (imperfect in theory, but feasible in practice).

2. For real-time backup:

The real-time backup of the black side is mainly in two aspects: file cdp and volume cdp.

The basic methods for handling consistency are the same. First, make a full backup, snapshot at the driver layer before the backup, and then start the backup. If data updates occur during the backup process, there will be two processing methods depending on the data:

(1) the file cdp will backup the updated part of the data first, and then update it to the backup set

(2) Volume cdp will mark the updated data with a dirty flag, and back up the dirty data again after the backup is completed.

To sum up, the black side is to ensure data consistency as much as possible, and if not, it is necessary to achieve crash consistency.

Crash consistency usually refers to the consistent state of data in the event of a sudden power outage or crash. Theoretically, any app should be able to deal with sudden power outages, so crash consistency can also meet the needs.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report