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)05/31 Report--
Many novices are not very clear about the database backup strategy brought about by emergency database recovery. in order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
One day, I received a CASE saying that the power supply of the two servers of the database was damaged at the same time and could no longer be used. I was asked to restore all the databases before I went to work the next day. It was already 12:00 in the evening when I arrived at the scene. First, I learned about the database of the school.
The operating system of the database is Solaris.
The backup of the database is only the backup of Rman and is placed on storage.
Fortunately, there is a minicomputer that can be recovered at the scene and an optical fiber card that identifies the minicomputer.
First of all, connect the optical fiber memory card on the recoverable minicomputer and recognize the storage of the database rman backup, and then after installing the database software, restore the data of the database and open the database. The whole process takes more than five hours.
Based on the above case, let me discuss with you the formulation of the backup plan:
1. What time do you want to restore at the earliest
For users, users only care about whether the current state of the database is normal, and it does not matter what the data has done and when it was done; and some business types may want to see the operations they have done before due to special requirements, or even restore the database to a certain point in time. These two requirements are mainly related to the retention policy of the backup. For the former, it is generally recommended to choose a backup retention strategy based on redundant quantity. If you only want to ensure the stable operation of the database, you can save several recent backups appropriately depending on the size of the data.
Why do you want to keep the most recent copies, just one copy?
Backup itself is redundancy, so from a reliable point of view, of course, there should be redundancy for backup, at least two backups should be guaranteed, so that even if one copy is damaged for some reason, there can be a backup. As in the above case, only one backup is actually very dangerous, and if there is an exception, in case the data cannot be recovered, the loss will be incalculable. Of course, the number of copies determines the amount of disk space required will be multiplied, and the number of backups to be retained needs to be determined according to the capacity of the disk.
If you not only want to see, but also be able to recover the data to a previous point in time, you must ensure that there are backups created at the target point in time (or before), as well as the associated archive files. Based on this type of demand, it is recommended to choose a backup retention policy based on redundancy time, and the backup retention time can be set to the earliest restore time.
2. When is the system idle?
Because the system needs to read and write a large amount of data, it is bound to take up more system resources during this period. If the backup task is performed during the busy hours of the database, it will not only take a long time to back up, but also have an impact on the normal operation of the business system.
At present, our usual practice is to put the backup task to be carried out at two o'clock in the morning, for most businesses, the system has the least number of visits, of course, if individual schools know about the use of their own database, you can ask for a backup at a certain time.
3. How big is the data scale of the database
Although the hardware factors are not taken into account, the backup operation itself, taking into account the efficiency of execution, it is impossible to completely ignore the hardware, and the backup time is based on the performance of users using independent storage. Calculated according to the disk read and write rate of about 100 MB per second, it takes about half an hour for 200GB data to perform backup operation (the corresponding recovery operation is about the same time, which is generally longer, because the redo log needs to be applied during recovery). As far as backup operation is concerned, a few hours are allocated for special execution every day when the system is not busy, which is acceptable for most applications. Therefore, our backup strategy for ordinary schools is to make a full backup every Saturday, back up the archived logs every day, and delete the previously backed up archived logs every Saturday.
4. Estimate the possible recovery operation time
In general, a normal system will not perform a recovery operation, and when a recovery operation is needed on the database system, it means that there is a problem in the system, although the problem may be occasional, but the time required to deal with the problem may be determined. for example, when the amount of data is determined, the time to recover data files and application logs can be estimated.
For some core business systems, any temporary suspension of service without notice is even a disaster, so in this case, once a major problem occurs, it is impossible to rely on RMAN to achieve rapid recovery. Therefore, database administrators are required to ensure the high availability of the system through other ways (such as mirroring at the storage layer or database disaster recovery, etc.), rather than just relying on backup.
On the other hand, some non-core business systems may only need to be used at a certain time every week or even every month (such as course selection system). For this kind of database system, because it has a lot of time to perform recovery, relatively speaking, it can be more relaxed when formulating backup strategies. For example, you do not need to create a backup every day, but only perform backup tasks when data modifications occur.
Backup and recovery absolutely do not exist in isolation, recovery depends on backup, backup strategy basically determines the recovery mode, the data that can be recovered and the efficiency of recovery. Therefore, the backup strategy depends on your recovery needs, as well as your recovery strategy.
5. Summary:
For how to make a backup of the database, my suggestion is that if conditions permit, you can do a Rman backup on the local and storage of the database server. If it is a minicomputer system, it is recommended to do a Rman backup (rman can only be used for recovery between the same platform), but also need to do a logical backup and put this backup on the remote side. After the backup is completed, you need to do a full database recovery test every once in a while (usually three months) to ensure the availability of database backup files.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.