In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
[author: 58 Shen Jian, this article comes from the official account of architect's Road Wechat, please contact the original author for reprint and authorization]
If technicians often operate DB online, they will inevitably make mistakes if they walk along the river for a long time:
Update has the wrong data.
Delete has the wrong data.
Drop has the wrong data.
What should I do? Look for DBA to recover the data, even if you can't, someone has to carry the pot.
Voiceover: delete all the data, what to do?
Zero, which scheme can not achieve data recovery?
Recover data from the Library.
Generally speaking, the database cluster is the master-slave architecture:
Full backup: back up all library files on a regular basis (for example, one month).
What is the 1 hour delay from the library?
As shown in the figure above, add a slave library, which is not synchronized with the master database in real time, but synchronizes the master database every 1 hour. After synchronization, the slave database is immediately disconnected for 1 hour. The slave database will maintain a data gap of 1 hour with the master database.
When the "delete the whole library" accident occurs, how to use the "1 hour delay" to quickly recover data from the library?
(1) apply 1 hour delay from
(2) delay 1 hour from the last synchronization time to the binlog before "delete the whole database", and replay it.
Quick recovery complete.
The advantage of this scheme is that the data can be recovered quickly. The potential disadvantage is that in case the "1-hour delay slave library" is connected to the master library for a short period of time, a "deletion" accident occurs, and it cannot be restored.
Fourth, what should I do if DBA makes a "double one-hour delay from the library"?
For some "allow delay" services, you can use a 1-hour delay from, for example:
(1) Operation backend, product backstage
(2) BI for data synchronization
(3) data sampling and research on R & D
But it should be noted that, after all, this is a slave library and can only provide a "read-only" service.
Fifth, sum up
Ensuring the security of data is a top priority for DBA:
(0) theoretically, it can recover + run.
(1) full backup + incremental backup + regular drill
(2) 1 hour delay from the library
(3) double 1 hour delay from the library + improve resource utilization.
Have you learned the divine skills of DBA? please turn.
What kind of scheme is used by your company?
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.