File processing method and related product
By using the backup files of the same storage partition to repair system files during BMC operation, power-off operations are avoided, the problem of low fault repair efficiency caused by system file damage is solved, and fast and effective repair and business continuity are achieved.
Patent Information
- Application Number
- CN202410533544.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-08-30
AI Technical Summary
In computing equipment, when system file corruption leads to baseboard management controller (BMC) failure, the existing technology requires the computing equipment to be powered off for firmware burning and repair, resulting in business congestion and low repair efficiency.
During the operation of BMC, it detects the damage status of system files and repairs them using backup files stored in the same storage partition to avoid power-off operations. It also shortens the repair time by switching multi-level backup files and fault point location repair technology. and improve efficiency.
It realizes instant repair of system files during BMC operation, avoids power-off obstruction, shortens repair time, improves user experience and repair efficiency, and reduces the risk of file damage and resource consumption through multi-level backup files and fault point locating technology.
Smart Images

Figure CN118567905A
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a file processing method and related products. Background Art
[0002] The Baseboard Management Controller (BMC) is an important component of computing devices, used to monitor the operating status of computing devices and perform remote management. BMC needs to load a variety of system files during operation, such as loading system boot files during startup and loading configuration files during operation. If the system files are damaged, such as the system boot files, the BMC will not be able to start normally, causing BMC failure.
[0003] Currently, in scenarios where BMC failures are caused by system file corruption, BMC failures can be resolved by burning BMC firmware. However, BMC firmware burning requires the computing device to be powered off before execution, which blocks ongoing services. On the other hand, BMC firmware burning takes a long time, affecting the efficiency of resolving BMC failures. Summary of the invention
[0004] The embodiments of the present application provide a file processing method and related products, which are used to solve BMC failures caused by system file damage when a computing device is powered on, and improve the efficiency of solving BMC failures.
[0005] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0006] In a first aspect, an embodiment of the present application provides a file processing method, which is applied to a baseboard management controller. The controller includes a first storage partition, a second storage partition and a processing module. The first storage partition is used to store system files and a first backup file of the system files; the processing module is used to: the processing module detects that the system file is in a damaged state; if the first backup file is not damaged, the processing module uses the first backup file to repair the system file; if the first backup file is damaged, the processing module obtains the second backup file from the second storage partition and uses the second backup file to repair the system file.
[0007] The embodiment of the present application can perform BMC system file repair during the BMC operation process, thereby avoiding the technical problem of the computing device being blocked while the business is being executed. In addition, whether the first backup file or the second backup file is used to repair the BMC system file, the file in the BMC storage area is used for repair, and it does not need to spend a long time on firmware burning, which helps to improve the repair efficiency and improve the user experience. Furthermore, if the first backup file is not damaged, the BMC system file can be repaired using the backup file in the same partition as the BMC system file, which can greatly shorten the repair time. If the first backup file is damaged, the BMC system file can be effectively repaired using the second backup file. It can be seen that the embodiment of the present application shortens the repair time, improves the repair efficiency, and further improves the user experience on the basis of effectively repairing the BMC system file.
[0008] In a specific manner, the first storage partition is used to store the third backup file of the system file. When the first backup file is damaged and the third backup file is damaged, the processing module obtains the second backup file from the second storage partition and uses the second backup file to repair the system file; when the first backup file is damaged and the third backup file is not damaged, the processing module uses the third backup file to repair the first backup file; and uses the repaired first backup file to repair the system file. When the first backup file is not damaged and the third backup file is damaged, the processing module uses the first backup file to repair the third backup file; and uses the first backup file to repair the system file. The backup files of the first storage partition are divided into the first backup file and the third backup file, wherein the repair priority of the third backup file is lower than that of the first backup file. Thus, when the first backup file cannot be used for some reason, it can be quickly switched to the third backup file, thereby shortening the time to repair the BMC system file and reducing the impact of business interruption. Further, when the BMC system file is updated, the first backup file and the third backup file are updated, so that the updated first backup file and the third backup file can accurately repair the BMC system file after the next system file to be processed is damaged.
[0009] In another specific manner, the processing module obtains the first fault point of the third backup file, the first fault point being the location point where the content in the third backup file is damaged; uses the content of the location point corresponding to the first fault point in the first backup file to repair the content in the third backup file at the first fault point; obtains the third fault point of the first backup file, the third fault point being the location point where the content in the first backup file is damaged; uses the content of the location point corresponding to the third fault point in the third backup file to repair the content in the first backup file at the third fault point. The method of replacing the content at the fault point by locating the fault point can reduce the risk of the first backup file being damaged, and can save system resources, such as saving storage space, compared with the replacement and overwriting update method.
[0010] In another specific manner, the processing module obtains the second fault point of the system file, where the second fault point is the location where the content in the system file is damaged; and uses the content of the location corresponding to the second fault point in the first backup file to repair the content in the system file at the second fault point. That is, by accurately locating and replacing the fault point, the risk of file damage during the replacement process is reduced, and system resources, such as storage space, are saved.
[0011] In another specific manner, when the first backup file is damaged, the processing module switches the state of the first storage partition from the primary state to the backup state, switches the state of the second storage partition from the backup state to the primary state, loads the backup file from the storage partition in the primary state, and uses the second backup file to modify the system file. Moreover, this method only requires switching the primary and backup interfaces, and does not require the backup files to be copied or migrated, thus helping to reduce the probability of backup files being damaged.
[0012] In another specific method, the processing module records file information of the system file; in response to receiving the master-slave switching completion instruction, obtains the recorded system file based on the recorded file information; repairs the recorded system file using the second backup file; and replaces the first backup file and the system file stored in the first storage partition with the repaired system file.
[0013] In another specific manner, the processing module detects that the system file is updated, obtains the updated system file, and uses the updated system file to synchronously update the first backup file and the second backup file, thereby keeping the first backup file and the second backup file synchronized with the system file.
[0014] In another specific manner, after the system file is repaired using the second backup file, the processing module repairs the first backup file using the system file. Since the system file and the first backup file are located in the same storage partition, repairing the first backup file using the system file is faster.
[0015] In another specific manner, the processing module obtains a second SHA 256 value of the system file; if the second SHA 256 value is the same as the first SHA 256 value of the original system file, the processing module determines that the system file is in a damaged state; if the second SHA 256 value is the same as the first SHA 256 value, the processing module determines that the system file is in an undamaged state. SHA 256 is a highly secure hash algorithm, and the encryption process is irreversible, which makes it impossible for attackers to reconstruct the original data using the ciphertext. Therefore, it can effectively protect the integrity and authenticity of the system file content. In addition, the ciphertext length generated by SHA-256 is fixed, and this length often requires less space, making it more efficient when storing and transmitting data.
[0016] In a second aspect, an embodiment of the present application provides a processing module, which is used to execute the method as described in any one of the first aspects.
[0017] In a third aspect, an embodiment of the present application provides a baseboard management controller, the controller comprising a first storage partition, a second storage partition, and a processing module as described in the second aspect, the first storage partition being used to store a system file and a first backup file of the system file, the second storage partition being used to store a second backup file of the system file;
[0018] In a fourth aspect, an embodiment of the present application provides a computing device, wherein the computing device includes a baseboard management controller as described in the third aspect.
[0019] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is run on a computer, the computer executes the operating steps of any possible file processing method of the first aspect above.
[0020] In a sixth aspect, an embodiment of the present application further provides a computer program product which, when running on a computer, executes the operating steps of any possible file processing method of the first aspect.
[0021] Any of the processing modules, baseboard management controllers, computing devices, computer-readable storage media, or computer program products provided above are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0023] Figure 2 A flowchart of a file processing method provided in an embodiment of the present application;
[0024] Figure 3 A flowchart of another file processing method provided in an embodiment of the present application;
[0025] Figure 4 A flowchart of another file processing method provided in an embodiment of the present application;
[0026] Figure 5 A schematic diagram of the structure of another computing device. DETAILED DESCRIPTION
[0027] BMC is a chip embedded in the motherboard of a computing device, which is used to monitor the operating status of the computing device and perform remote management. For example, BMC can monitor the hardware status of the computing device, or configure the settings of the basic input output system (BIOS) of the computing device. In order to achieve the normal operation of BMC, BMC needs to load system files during operation.
[0028] System files refer to files that need to be loaded during the BMC operation process to ensure the normal operation of the BMC. System files include but are not limited to the following files: system boot files used to start the BMC normally, configuration files containing BMC configuration parameters (such as network configuration, user permissions, and alarm thresholds), and log files used to record BMC activities and errors.
[0029] It should be noted that BMC system files of different models may be different, and BMC system files of the same model manufactured by different manufacturers may also be different. Those skilled in the art can adjust the BMC system files that need to be loaded by the BMC as needed.
[0030] During the operation of BMC, system files may be damaged. Damaged system files may cause BMC function abnormalities or BMC failures. For example, if the system boot file is damaged and BMC loads the system boot file, BMC will be unable to initialize and start BMC services normally, causing BMC failure to operate normally.
[0031] At present, in the scenario where the BMC fails due to the damage of system files, users often solve the BMC failure by burning the BMC firmware. Specifically, the user copies the system files in the normal environment to the abnormal environment to restore the system files in the abnormal environment. The normal environment refers to the environment where the BMC is not damaged, and the abnormal environment refers to the environment where the BMC is damaged. However, this method requires the computing device to be powered off before execution, and powering off the computing device will block the business being executed. In addition, burning the BMC firmware takes a long time, which affects the repair efficiency and poor user experience.
[0032] In view of the above problems, an embodiment of the present application provides a BMC. Specifically, the BMC includes a first storage partition, a second storage partition and a processing module. The first storage partition is provided with a first backup file and a BMC system file, and the second storage partition is provided with a second backup file. Among them, the first backup file is a backup of the BMC system file in the first storage partition, and the second backup file is a backup of the BMC system file in the second storage partition. The processing module is used to connect the first storage partition and the second storage partition, and when the processing module detects that the BMC system file is damaged, the second backup file is used to repair the BMC system file in the case where the first backup file is damaged; when the first backup file is not damaged, the first backup file is used to repair the BMC system file. The embodiment of the present application can perform BMC system file repair during the operation of the BMC, thereby avoiding the technical problem that the computing device is blocked while executing the business. In addition, whether the first backup file or the second backup file is used to repair the BMC system file, the files in the BMC storage area are used for repair, and it does not take a long time to burn the firmware, so it helps to improve the repair efficiency and improve the user experience. Furthermore, if the first backup file is not damaged, the BMC system file can be repaired using the backup file in the same partition as the BMC system file, which can greatly shorten the repair time. If the first backup file is damaged, the BMC system file can be effectively repaired using the second backup file. It can be seen that the embodiment of the present application shortens the repair time, improves the repair efficiency, and further improves the user experience on the basis of effectively repairing the BMC system file.
[0033] The BMC provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0034] See also Figure 1 , which is a schematic diagram of the structure of a BMC provided in an embodiment of the present application. The BMC has a first storage partition 101, a second storage partition 102 and a processing module 103. One end of the processing module 103 is connected to the first storage partition 101, and the other end is connected to the second storage partition 102. Among them, the first storage partition and the second storage partition are two storage devices connected to the BMC, and the two storage devices have different physical storage media. For example, the two storage devices can both be block flash memory Flash, or one of the two storage devices is Flash, and the other is a disk or hard disk, etc., which is not specifically defined in the embodiment of the present application.
[0035] In the embodiment of the present application, the first storage partition 101 stores the BMC system file and the first backup file. The first backup file is a backup file of the undamaged BMC system file in the first storage partition. When the BMC system file of the first storage partition 101 is damaged, the first backup file can be used to repair the BMC system file.
[0036] The second storage partition 102 is used to store a second backup file, the file content of the second backup file is the same as the file content of the undamaged BMC system file. Therefore, when the BMC system file is damaged and the first backup file is damaged, the second backup file can be used to repair the BMC system file and restore the BMC system file to normal.
[0037] The processing module 103 is used to determine whether the BMC system file in the first storage partition 101 is damaged and whether the first backup file is damaged, and to repair the BMC system file using the first backup file when the BMC system file is damaged and the first backup file is not damaged, and to repair the BMC system file using the second backup file when the BMC system file is damaged and the first backup file is damaged, so that the BMC system file returns to normal.
[0038] According to the above Figure 1 The system architecture diagram shown in FIG. 1 is a detailed description of the file processing method provided in the embodiment of the present application. Figure 2 , which is a flow chart of a file processing method provided by an embodiment of the present application. The method comprises the following steps:
[0039] S21: During the BMC operation, determine whether the BMC system file is damaged.
[0040] BMC system file corruption refers to the phenomenon that the system files that need to be loaded are corrupted or the content in the system files are corrupted during the operation of the BMC, resulting in the system files being unavailable. There are many reasons for the corruption of system files, such as hardware failure of the computing device, which causes the system files to be processed to be corrupted during the storage or reading process. For another example, when updating the BMC firmware or BMC software, the update error or the update is interrupted, resulting in the corruption of the system files to be processed. For another example, the computing device is infected by a virus or malware, or is attacked by hackers, resulting in the corruption or tampering of the system files to be processed.
[0041] In the embodiment of the present application, in order to avoid BMC failure caused by damaged system files, first, during the BMC operation, it is necessary to detect the BMC system files to determine whether the BMC system files are damaged. Take the BMC system files located in the parameter (also known as param) directory as an example for explanation. That is, the processing module 103 pre-stores the acquisition path of the BMC system files, param directory >> BMC system files. The processing module 103 obtains the BMC system files according to the acquisition path of the BMC system files.
[0042] It should be noted that the BMC operation process described in the embodiment of the present application includes a BMC startup process and an operation process after the BMC is started.
[0043] In the embodiment of the present application, whether the BMC system file is damaged can be determined in multiple ways.
[0044] In one example, the processing module 103 stores an undamaged system file (also referred to as an original system file). During the BMC operation process, the processing module 103 obtains the BMC system file to be processed (also referred to as the system file to be processed), and compares whether the file contents of the system file to be processed and the original system file are the same. If the file content of the system file to be processed is the same as the file content of the original system file, it indicates that the system file to be processed is not damaged. If the file content of the system file to be processed is different from the file content of the original system file, it indicates that the system file to be processed is damaged.
[0045] In another example, since the file contents of the system file are relatively large, if the file contents are compared one by one, the comparison efficiency is low. The embodiment of the present application provides a method for comparison based on content summaries. Content summaries are content obtained by briefly and accurately summarizing the important contents of the system file. Compared with the file contents of the BMC system file, the number of content summaries is much smaller. Therefore, using the content summary comparison method to determine whether the BMC system file is damaged is conducive to improving the comparison efficiency. Specifically, the processing module 103 stores the first content summary of the original system file. During the BMC operation process, the processing module 103 uses the same method to obtain the second content summary of the system file to be processed. The processing module 103 calculates the content similarity between the second content summary and the first content summary. If the calculated content similarity is greater than the preset similarity threshold, it means that the system file to be processed is different from the original system file and the system file to be processed is damaged. If the calculated content similarity is not greater than the preset similarity threshold, it means that the system file to be processed is the same as the original system file and the system file to be processed is not damaged.
[0046] In another example, the processing module 103 can determine whether the BMC system file is damaged based on the hash value. The processing module 103 stores the first hash value of the original system file. When the BMC is running, the processing module 103 obtains the second hash value corresponding to the system file to be processed. It should be noted that the processing module 103 obtains the first hash value in the same way as the second hash value. If the first hash value is the same as the second hash value, it is determined that the system file to be processed is not damaged. If the first hash value is different from the second hash value, it is determined that the system file to be processed is damaged.
[0047] Exemplarily, the hash value may be a cryptographic hash function (secure hash algorithm, SHA) 256. SHA256 is a hash value generated based on a content summary and having a length of 256 bits. The processing module 103 stores a first SHA 256 of the original system file. When the BMC is running, the processing module 103 obtains a second SHA 256 of the system file to be processed. If the first SHA 256 is the same as the second SHA 256, it indicates that the system file to be processed is not damaged. If the first SHA 256 is the same as the second SHA256, it indicates that the system file to be processed is damaged. It should be noted that SHA 256 is a highly secure hash algorithm, and the encryption process is irreversible, which makes it impossible for an attacker to reconstruct the original data using the ciphertext, and therefore, can effectively protect the integrity and authenticity of the system file content. Moreover, the length of the ciphertext generated by SHA-256 is fixed, and this length often requires less space, making it more efficient when storing and transmitting data.
[0048] In addition, the embodiment of the present application may also determine whether the BMC system file is damaged by other methods, which are not specifically limited in the embodiment of the present application.
[0049] Furthermore, in order to timely detect BMC system file damage and avoid BMC system crash, data loss and other problems, the BMC system file can be periodically detected, for example, once every 1 second. Specifically, the processing module 103 pre-configures a detection period, and periodically detects whether the BMC system file is damaged according to the detection period. When the BMC system file is damaged, the subsequent file processing steps are executed.
[0050] It should be noted that those skilled in the art can set the detection period as needed, for example, setting the detection period to 1s, 10s, 0.1s, etc. The embodiments of the present application are not specifically limited.
[0051] Furthermore, because the BMC system file includes multiple files, in order to accurately identify whether each file is damaged, it is possible to judge whether the BMC system file is damaged in a polling manner based on the loading order of the BMC system files that need to be loaded during the BMC operation. For example, if the loading order of the BMC system files during the BMC operation is configuration file 1, configuration file 2, and configuration file 3, the processing module 103 can sequentially judge whether configuration file 1, configuration file 2, and configuration file 3 are damaged for one round of judgment, and sequentially judge whether configuration file 1, configuration file 2, and configuration file 3 are damaged in the next round, etc.
[0052] S22: If the BMC system file is damaged, check whether the first backup file is damaged. If damaged, execute S23, otherwise, execute S25.
[0053] A backup file is a file obtained by copying the original system file. The backup file is used to repair the BMC system file when it is lost or damaged due to hardware failure, human error, virus attack, etc., so as to restore the BMC system file to normal.
[0054] Among them, the first backup file refers to the backup file obtained after the original system file is copied to the first storage partition 101. In addition, the first storage partition 101 also includes the BMC system file. The first backup file and the BMC system file in the same partition share the same physical storage medium and file system. This makes it possible for the first backup file to be damaged when the BMC system file is damaged. For example, if the physical storage medium fails and causes the BMC system file to be lost or damaged, this will also cause the first backup file to be lost or damaged. Therefore, in an embodiment of the present application, before using the first backup file to repair the BMC system file, the processing module 103 must first determine whether the first backup file is damaged.
[0055] In the embodiment of the present application, whether the first backup file is damaged can be determined in a variety of ways.
[0056] In one example, the processing module 103 stores the original system file. During the BMC operation, the processing module 103 obtains the first backup file and compares the file contents of the first backup file and the original system file to see if they are the same. If they are the same, it means that the first backup file is not damaged. If they are not the same, it means that the first backup file is damaged.
[0057] In another example, the processing module 103 stores the first content summary of the original system file. During the BMC operation, the processing module 103 uses the same method to obtain the third content summary of the first backup file. The third content summary is compared with the first content summary to see if they are the same. If they are the same, it means that the first backup file is not damaged. If they are not the same, it means that the first backup file is damaged.
[0058] In another example, the processing module 103 stores the first hash value of the original system file. When the BMC is running, the processing module 103 obtains the third hash value of the first backup file in the same manner. The third hash value is compared with the first hash value to see if they are the same. If they are the same, it indicates that the first backup file is not damaged. If they are not the same, it indicates that the first backup file is damaged.
[0059] In addition, the embodiment of the present application may also determine whether the first backup file is damaged by other means, which are not specifically limited in the embodiment of the present application.
[0060] S23: Repair the BMC system file using the second backup file.
[0061] If the processing module 103 detects that the BMC system file is damaged and the first backup file is damaged, the BMC system file is repaired using the second backup file in the backup area. Since the second backup file and the BMC system file are in different partitions, the second backup file and the BMC system file do not share the same physical storage medium and file system. Therefore, when the BMC system file is damaged, the second backup file will not be affected. That is, repairing the BMC system file using the second backup file can prepare to repair the BMC system file.
[0062] In the embodiment of the present application, the second backup file can be used to repair the BMC system file in various ways.
[0063] In one example, the processing module 103 obtains the file content of the second backup file from the backup area based on the pre-stored backup area path, and sends the file content of the second backup file to the BMC system file based on the pre-stored system file acquisition path, overwriting the file content of the BMC system file.
[0064] In another example, the processing module 103 first deletes the BMC system file and the first backup file of the first storage partition 101, then obtains the second backup file from the backup area, copies the second backup file to the first storage partition 101, and repairs the BMC system file.
[0065] The embodiment of the present application may also repair the BMC system file by other methods, which are not specifically limited in the embodiment of the present application.
[0066] (Optionally) S24: Update the first backup file.
[0067] In the embodiment of the present application, when the second backup file repairs the BMC system file, after the repair is completed, the processing module 103 receives the BMC system file update signal and updates the first backup file of the first storage partition.
[0068] In one example, the processing module 103 updates the first backup file by replacing and overwriting. Specifically, the processing module 103 obtains the second backup file and replaces the first backup file with the second backup file, thereby achieving the purpose of updating the first backup file of the first storage partition.
[0069] In another example, considering the replacement as a complete overwriting update method, if the file content of the second backup file is incomplete, the first backup file will be damaged. Therefore, the processing module 103 can locate the fault point of the first backup file, and then use the file content at the same position in the second backup file to replace the file content of the fault point of the first backup file, so as to update the first backup file. For example, the first backup file is a configuration file, including 10 configuration items, namely configuration item A, configuration item B, configuration item C, configuration item D, ... If the processing module 103 locates configuration item C in the first backup file as the fault point, the processing module 103 can obtain the content of configuration item C from the second backup file, and replace the content of configuration item C in the first backup file with the content of configuration item C. The method of updating the first backup file based on the precise positioning of the fault point can reduce the risk of the first backup file being damaged compared to the replacement overwriting update method, and can save system resources, such as saving storage space.
[0070] The embodiments of the present application may also adopt other updating methods, which are not specifically limited in the embodiments of the present application.
[0071] S25: Repair the BMC system file using the first backup file.
[0072] In the embodiment of the present application, if the processing module 102 detects that the BMC system file is damaged and the first backup file is not damaged, the first backup file can be used to repair the BMC system file. Since the first backup file and the BMC system file are located in the same partition, that is, both are located in the first storage partition 101, when the BMC system file is damaged, the processing module 103 does not need to obtain the backup file from other storage devices, and can directly access the first backup file to repair the BMC system. That is, giving priority to the backup file in the same partition can greatly shorten the repair time.
[0073] In summary, a first backup file is set in the first storage partition of the BMC, and a second backup file is set in the second storage partition of the BMC. During the operation of the BMC, if it is detected that the BMC system file is damaged and the first backup file is damaged, the BMC system file is repaired using the second backup file; if it is detected that the first backup file is not damaged, the BMC system file is repaired using the first backup file. In the embodiment of the present application, the BMC system file can be repaired during the operation of the BMC, thereby avoiding the technical problem that the computing device is blocked while executing the business. In addition, whether the first backup file or the second backup file is used to repair the BMC system file, the file in the BMC storage area is used for repair, and it does not take a long time to burn the firmware, so it helps to improve the repair efficiency and improve the user experience. Further, if the first backup file is not damaged, the BMC system file is repaired using the backup file in the same partition as the BMC system file, which can greatly shorten the repair time. If the first backup file is damaged, the BMC system file can be effectively repaired using the second backup file. It can be seen from this that the embodiment of the present application shortens the repair time, improves the repair efficiency, and further improves the user experience on the basis of effectively repairing the BMC system file.
[0074] In addition, after step S22, it is considered that the backup file copying or migration may cause the backup file to be damaged during the copying or migration process. Therefore, in the embodiment of the present application, the processing module 103 no longer executes step S23, but triggers the BMC to perform the master-slave switch, transforms the main partition interface that the BMC needs to load into the backup area interface, and changes the backup area interface into the main partition interface. Specifically, before the master-slave switch, the main partition interface of the BMC is connected to the first storage partition 101, and the backup area interface is connected to the second storage partition 102. At this time, the first storage partition 101 is the main partition. During the operation of the BMC, the BMC system files are loaded from the first storage partition 101. The second storage partition 102 is the backup area. After the master-slave switch, the main partition interface of the BMC is connected to the second storage partition 102, and the backup area interface is connected to the first storage partition 101. At this time, the first storage partition 101 is the backup area, and the second storage partition 102 is the main partition. During the operation of the BMC, the BMC system files are loaded from the second storage partition 102 (that is, the second backup file is loaded). That is, during the operation of the BMC, the BMC can be restored to operation through the second backup file by switching between the primary and backup interfaces. Moreover, this method only requires switching between the primary and backup interfaces, and does not require copying or migrating the backup files, thus helping to reduce the probability of backup files being damaged.
[0075] Furthermore, in the above solution, only the first backup file is set in the first storage partition 101. When the BMC system file is damaged, the probability of the first backup file being damaged is high. In view of the above problem, the embodiment of the present application also provides another file processing method. In addition to setting the first backup file, the first storage partition 101 also sets a third backup file. Figure 3 , which is a flow chart of another file processing method provided by an embodiment of the present application. The method comprises the following steps:
[0076] S31: During the BMC operation, determine whether the BMC system file is damaged. If the BMC system file is damaged, execute S32; if the BMC system file is not damaged, execute S37.
[0077] Step S31 is the same as step S21 and will not be discussed again here.
[0078] S32: Check whether the first backup file and the third backup file are damaged. If one of the first backup file and the third backup file is damaged, execute S33. If both the first backup file and the third backup file are damaged, execute S35. If neither the first backup file nor the third backup file is damaged, execute S34.
[0079] The third backup file refers to another backup file obtained after the original system file is copied to the primary partition. The repair priority of the third backup file is lower than that of the first backup file. Specifically, the processing module 103 first uses the first backup file to repair the system file to be processed. If the first backup file is damaged, the third backup file is used to repair the BMC system file.
[0080] Since the first backup file, the third backup file and the BMC system file are located in the same partition, that is, they are all located in the first storage partition 101, therefore, when the BMC system file is damaged, the processing module 103 does not need to obtain the backup file from other storage devices, and can access the first backup file and the third backup file more quickly. That is, giving priority to the backup files of the same partition can greatly shorten the repair time. In addition, in an embodiment of the present application, the first backup file and the third backup file are set in the backup file area of the first storage partition 101, and the first backup file and the third backup file are set in different physical locations, which can greatly reduce the risk of data loss. And when the first backup file cannot be used for some reason, it can be quickly switched to the third backup file, so that the time for repairing the BMC system file can be shortened and the impact of business interruption can be reduced.
[0081] However, the first backup file, the third backup file and the BMC system file in the same partition share the same physical storage medium and file system. This makes it possible for the first backup file and the third backup file to be damaged when the BMC system file is damaged. For example, if the physical storage medium fails and causes the system file to be processed to be lost or damaged, this will also cause the first backup file and the third backup file to be lost or damaged. Therefore, in the embodiment of the present application, the processing module 103 first determines whether the first backup file and the third backup file are damaged before using the first backup file or the third backup file to repair the BMC system file.
[0082] In the embodiment of the present application, whether the first backup file and the third backup file are damaged can be determined in multiple ways.
[0083] In one example, the processing module 103 stores the original system file. During the operation of the BMC, the processing module 103 obtains the first backup file and the third backup file, and compares whether the file contents of the first backup file and the original system file are the same. If they are the same, it means that the first backup file is not damaged. If they are not the same, it means that the first backup file is damaged. Compare whether the file contents of the third backup file and the original system file are the same. If they are the same, it means that the third backup file is not damaged. If they are not the same, it means that the third backup file is damaged.
[0084] In another example, the processing module 103 stores the first content summary of the original system file. During the BMC operation process, the processing module 103 uses the same method to obtain the third content summary of the first backup file and the fourth content summary of the third backup file. The third content summary is compared with the first content summary to see if they are the same. If they are the same, it means that the first backup file is not damaged. If they are not the same, it means that the first backup file is damaged. The fourth content summary is compared with the first content summary to see if they are the same. If they are the same, it means that the third backup file is not damaged. If they are not the same, it means that the third backup file is damaged.
[0085] In another example, the processing module 103 stores the first hash value of the original system file. When the BMC is running, the processing module 103 obtains the third hash value of the first backup file and the fourth hash value of the third backup file in the same manner. The third hash value is compared with the first hash value to see if they are the same. If they are the same, it means that the first backup file is not damaged. If they are not the same, it means that the first backup file is damaged. The fourth hash value is compared with the first hash value to see if they are the same. If they are the same, it means that the third backup file is not damaged. If they are not the same, it means that the third backup file is damaged.
[0086] In addition, the embodiment of the present application can also determine whether the first backup file and the third backup file are damaged by other methods, which are not specifically limited in the embodiment of the present application. It should be noted that the embodiment of the present application does not specifically limit the execution order of determining whether the first backup file is damaged and determining whether the third backup file is damaged. They can be performed at the same time, or the first backup file can be determined first, and then the third backup file can be determined.
[0087] S33: Restoring the first backup file or the third backup file.
[0088] In the embodiment of the present application, if the result obtained in step S32 is: the first backup file is intact and the third backup file is damaged, the third backup file is first repaired using the first backup file. For example, the processing module 103 replaces the third backup file with the first backup file, thereby achieving the purpose of repairing the third backup file.
[0089] If the result obtained in step S32 is that the first backup file is damaged and the second backup file is intact, the first backup file is first repaired using the second backup file. For example, the processing module 103 replaces the first backup file with the third backup file, thereby repairing the first backup file.
[0090] In the implementation of the present application, the processing module 103 repairs the first backup file or the third backup file to ensure the accuracy of the content of the first backup file and the third backup file of the primary partition. When the next system file to be processed is damaged, the first backup file or the third backup file can be directly used to repair the BMC system file, thereby shortening the repair time of the next system file to be processed.
[0091] S34: Repair the BMC system file using the first backup file.
[0092] If both the first backup file and the third backup file are damaged, the processing module 103 can use the first backup file to repair the BMC system file. Alternatively, if one of the first backup file and the third backup file is damaged, the damaged backup file is repaired using the undamaged backup file, and then the BMC system file is repaired using the first backup file.
[0093] S35: Repair the BMC system file using the second backup file.
[0094] If both the first backup file and the third backup file are damaged, the processing module 103 calls the active / standby switching interface to make the second storage partition the active partition, and the BMC resumes operation by loading the second backup file from the second storage partition. In this way, the BMC system files are repaired by active / standby switching.
[0095] S36: Update the first backup file and the third backup file.
[0096] For step S35, the BMC system file is repaired by using the master-slave switching interface. At this time, the first storage partition becomes the backup partition, the second storage partition becomes the master partition, and the second backup file of the second storage partition becomes the system file to be processed. At this time, the BMC system file is updated. In order to accurately and effectively repair the BMC system file when the BMC system file is damaged next time, the first backup file and the third backup file of the first storage partition need to be updated. Specifically, the processing module 103 receives the update signal of the system file to be processed, and updates the first backup file and the third backup file with the repaired BMC system file.
[0097] Exemplarily, after the BMC system file is updated, the processing module 103 obtains the fifth SHA256 value after the BMC system file is updated, and the processing module 103 updates the first SHA 256 value of the original system file recorded in advance to the fifth SHA 256 value. In addition, the processing module 103 updates the first backup file and the third backup file according to the fifth SHA 256 value. Specifically, the processing module 103 obtains the system file corresponding to the fifth SHA 256 value according to the fifth SHA 256 value, and uses the system file corresponding to the fifth SHA 256 value to update the first backup file and the third backup file.
[0098] The processing module 103 may first update the first backup file and then update the second backup file, or first update the second backup file and then update the third backup file, or update the first backup file or the third backup file at the same time. This embodiment of the application is not specifically limited.
[0099] Regarding the method of updating the first backup file, refer to step S24. Regarding the method of updating the third backup file, refer to the method of updating the first backup file in step S24, which will not be discussed here.
[0100] S37: Detect whether the first backup file and the third backup file are damaged.
[0101] When the BMC is running, if the system file to be processed is not damaged, the first backup file and the third backup file are detected. For a specific detection method, see step S32.
[0102] S38: If a damaged backup file exists between the first backup file and the third backup file, update the damaged backup file.
[0103] For step S37, there are three situations in which the first backup file and the third backup file are damaged: in the first situation, the first backup file is damaged, and the third backup file is not damaged; in the second situation, the first backup file is not damaged, and the third backup file is damaged; in the third situation, both the first backup file and the third backup file are damaged. For the first situation, the processing module 103 updates the first backup file using the system file to be processed. For the second situation, the processing module 103 updates the third backup file using the system file to be processed. For the third situation, the processing module 103 updates the first backup file and updates the second backup file using the system file to be processed. The specific updating method is the same as step S36 and will not be discussed here.
[0104] Furthermore, during the operation of the BMC or before the BMC is started, there may be a situation where the BMC system file is updated. At this time, the first backup file, the second backup file, and the third backup file need to be updated. Specifically, when the BMC system file is updated, the processing module 103 identifies the update of the system file to be processed and records the updated standard information, for example, the standard information is the standard SHA 256 value. In this way, when the BMC system file is updated, if the BMC system file is damaged, the standard information can be used to identify whether the BMC system file is damaged.
[0105] The processing module 103 updates the first backup file and the third backup file while recording the standard information. The original first backup file and the third backup file are updated by copying the updated BMC system file. Thus, the uniformity of the first backup file, the third backup file and the BMC system file is ensured. In addition, while updating the first backup file and the third backup file, the processing module 103 synchronizes the file information of the updated BMC system file to the second backup file to replace the original file of the second backup file.
[0106] It can be seen that the embodiment of the present application divides the backup file of the first storage partition into a first backup file and a third backup file, wherein the repair priority of the third backup file is lower than that of the first backup file, so that when the first backup file cannot be used for some reason, it can be quickly switched to the third backup file, thereby shortening the time to repair the BMC system file and reducing the impact of business interruption. Furthermore, when the BMC system file is updated, the first backup file and the third backup file are updated, so that the updated first backup file and the third backup file can accurately repair the BMC system file after the next system file to be processed is damaged.
[0107] In the backup file update and repair described above, the repair of the BMC system file adopts the replacement overwrite method, such as using the first backup file to replace the BMC system file to repair the BMC system file, such as replacing the BMC system file with the second backup file to repair the BMC system file, or when the BMC system file is updated, the first backup file or the third backup file is updated. However, the full overwrite method has the risk of the overwritten file being damaged. In view of the above problems, the embodiment of the present application provides another file processing method. The file processing method obtains fault data by locating the fault point, and performs precise updates or precise repairs. The following is combined with Figure 4 , which is a flowchart illustrating another file processing method provided in an embodiment of the present application. Figure 4 The file processing method shown uses the SHA 256 value to determine damage.
[0108] like Figure 4 As shown, the file processing method provided in the embodiment of the present application specifically includes the following steps:
[0109] S41: Obtain a second SHA 256 value of the BMC system file.
[0110] In the embodiment of the present application, the processing module 103 obtains the second SHA 256 value of the BMC system file. The second SHA 256 value is a hash value corresponding to the file content of the BMC system file in real time. It is understandable that the BMC system file may not be the same as the original system file, and the current BMC system file may be damaged.
[0111] S42: Detect the file status of the BMC system file according to the second SHA 256 value.
[0112] The processing module 103 pre-stores the first SHA 256 value corresponding to the original system file. After obtaining the second SHA 256 value, the processing module 103 compares the first SHA 256 value with the second SHA 256 value.
[0113] If the first SHA 256 value is the same as the second SHA 256 value, it indicates that the file status is that the BMC system file is normal and has not been tampered with, and S41 needs to be executed again after a preset time interval, wherein the preset time may be 1s, 5s, 0.1s, etc., which is not specifically limited in the embodiment of the present application.
[0114] If the first SHA 256 value is different from the second SHA 256 value, it means that the BMC system file is damaged.
[0115] S43: If the file status is that the BMC system file is damaged, check whether the first backup file and the third backup file are damaged. If one of the first backup file and the third backup file is damaged, execute S44. If both the first backup file and the third backup file are damaged, execute S46. If neither the first backup file nor the third backup file is damaged, execute S412.
[0116] The specific detection method is the same as step S32 and will not be discussed here.
[0117] S44: Identify the first failure point of the failed backup file.
[0118] If one of the first backup file and the third backup file is damaged, the damaged backup file is referred to as a faulty backup file, and the other undamaged backup file is referred to as a non-faulty backup file.
[0119] In the embodiment of the present application, the processing module 103 first identifies the first fault point in the fault backup file. The first fault point refers to the location where the file content in the fault backup file is damaged. For example, if the fault backup file is a configuration file, the configuration file includes 10 configuration items, namely configuration item 1, configuration item 2, configuration item 3, ..., configuration item 10. If configuration item 3 fails, configuration item 3 is the first fault point.
[0120] In the embodiment of the present application, the first failure point in the failure backup file can be identified in multiple ways.
[0121] In an example, the processing module 103 may be a pre-stored regular expression based on the file content to locate the first fault point. A method for obtaining the regular expression is given below.
[0122] Step 1: The processing module 103 determines the characteristics that may cause the faulty backup file to fail based on the file structure and file content of the faulty backup file, such as missing or additional field separators, abnormal data block size, key fields that do not conform to the expected format or range, or specific error messages or exception codes.
[0123] Step 2: The processing module 103 generates a regular expression based on the file content according to the features that may cause the faulty backup file failure.
[0124] In another example, the processing module 103 can locate the first fault point using a pre-set binary location strategy. Exemplarily, the fault backup file is divided into two parts, namely module 1 and module 2, and the hash value corresponding to module 1 and the hash value corresponding to module 2 are calculated respectively. If the hash value corresponding to module 1 is different from the hash value corresponding to the original system file, module 1 is damaged, otherwise module 2 is damaged. If module 1 is damaged, module 1 is further divided into two parts, namely submodule 1-1 and submodule 1-2. The processing module 103 calculates the hash value of submodule 1-1 and the hash value of submodule 1-2, and compares them with the hash value of the corresponding position of the original system file. If the hash value of submodule 1-1 is compared with the hash value of the corresponding position of the original system file, if they are the same, submodule 1-2 is damaged, otherwise submodule 1-1 is damaged. By analogy, the first fault point is obtained from the fault backup file. Similarly, if module 2 is damaged, module 2 is divided into submodule 2-1 and submodule 2-2. The processing module 103 calculates the hash values of the submodule 2-1 and the submodule 2-2. If the hash value of the submodule 2-1 is the same as the hash value of the corresponding position of the original system file, it means that the submodule 2-2 is damaged, otherwise the submodule 2-1 is damaged. And so on, the first fault point is obtained.
[0125] In addition, the embodiment of the present application may also use other methods to identify the first fault point, which is not specifically limited in the embodiment of the present application.
[0126] S45: Use the content of the first fault point in the non-fault backup file to repair the content of the first fault point in the fault backup file, and then execute S413.
[0127] The processing module 103 obtains the content of the first fault point in the non-fault backup file, and uses the content to replace the content of the first fault in the fault backup file, thereby repairing the fault backup file. Therefore, the embodiment of the present application only needs to accurately replace part of the content to repair the fault backup file, and does not repair other contents of the fault backup file, and does not require all configurations in the BMC to be restored to the initial state, so it helps to reduce the network settings loss, security settings failure, hardware monitoring failure and other problems caused by restoring all configurations of the BMC to the initial state, thereby reducing the impact on the operation of the computing device.
[0128] S46: Record the BMC system file information and trigger an alarm prompt.
[0129] In the embodiment of the present application, if the processing module 103 determines that both the first backup file and the third backup file are damaged, the processing module 103 first records the BMC system file information. Therefore, when the processing module 103 repairs the BMC system file, it obtains the damaged BMC system file from the recorded BMC system file information, thereby locating the fault and accurately repairing the damaged BMC system file.
[0130] The processing module 103 triggers an alarm prompt while recording the BMC system file information. The alarm prompt is used to enable the processing module 103 to perform a fault repair operation.
[0131] S47: Execute active / standby switchover.
[0132] After the processing module 103 records the file information of the BMC system file, it sends a master-slave switch instruction to the BMC. After receiving the master-slave switch instruction, the BMC executes the master-slave interface switch, changes the first storage partition 101 from the master partition to the backup area, and changes the second storage partition 102 from the backup area to the master partition. At this time, the BMC can load the second backup file of the second storage partition and resume normal operation. The master-slave interface switch refers to the switch of the master partition interface of the BMC to the second storage partition due to the connection with the first storage partition, and the switch of the backup area interface of the BMC to the first storage partition due to the connection with the second storage partition.
[0133] S48: Reading the damaged BMC system file from the recorded BMC system file information.
[0134] In the embodiment of the present application, after the active / standby switching processing module executes the active / standby interface switching, it sends a switching completion instruction to the processing module 103. After receiving the switching completion instruction, the processing module 103 reads the damaged BMC system file from the recorded BMC system file information.
[0135] S49: Locate the second fault point of the BMC system file.
[0136] The processing module 103 locates the second fault point of the BMC system file. The second fault point refers to the location point of the damaged file content in the BMC system file. The embodiment of the present application can identify the first fault point in the BMC system file in multiple ways.
[0137] In an example, the processing module 103 may locate the second fault point by using a pre-stored regular expression based on the file content. A method for obtaining the regular expression is given below.
[0138] Step 1: The processing module 103 determines the characteristics that may cause the damaged BMC system file failure based on the file structure and file content of the damaged BMC system file, such as missing or additional field separators, abnormal data block size, key fields that do not conform to the expected format or range, or specific error information or exception codes.
[0139] Step 2: The processing module 103 generates a regular expression based on the file content according to the characteristics of the BMC system file failure that may cause damage.
[0140] In another example, the processing module 103 can locate the first fault point using a pre-set binary location strategy. Exemplarily, the damaged BMC system file is divided into two parts, namely module 3 and module 4, and the hash value corresponding to module 3 and the hash value corresponding to module 4 are calculated respectively. If the hash value corresponding to module 3 is different from the hash value corresponding to the original system file, the module 3 is damaged, otherwise module 4 is damaged. If module 3 is damaged, continue to divide module 3 into two parts, namely submodule 3-1 and submodule 3-2. The processing module 103 calculates the hash value of submodule 3-1 and the hash value of submodule 3-2, and compares them with the hash value of the corresponding position of the original system file. If the hash value of submodule 3-1 is compared with the hash value of the corresponding position of the original system file, if they are the same, then submodule 3-2 is damaged, otherwise submodule 3-1 is damaged. And so on, the second fault point is obtained from the damaged BMC system file.
[0141] In addition, the embodiment of the present application may also use other methods to identify the second fault point, which is not specifically limited in the embodiment of the present application.
[0142] S410: Use the content of the second fault point in the second backup file to repair the content of the second fault point in the BMC system file.
[0143] The processing module 103 obtains the content of the second fault point in the second backup file from the second storage partition 102, and uses the content to replace the content of the second fault point of the BMC system file, thereby repairing the BMC system file. Therefore, the embodiment of the present application only needs to accurately replace part of the content to repair the BMC system file, and will not repair other contents of the fault repair BMC system file, and does not require all configurations in the BMC to be restored to the initial state, so it helps to reduce the network settings loss, security settings failure, hardware monitoring failure and other problems caused by restoring all BMC configurations to the initial state, thereby reducing the impact on the operation of the computing device.
[0144] S411: Write the repaired BMC system file into the first storage partition 101, and execute S41.
[0145] In the embodiment of the present application, since the BMC system file, the first backup file and the third backup file of the first storage partition are all damaged, in order to ensure that the next time the BMC system file is damaged, the processing module 103 can prepare to repair the BMC system file and write the repaired BMC system file into the first storage partition 101. Specifically, the processing module 103 first formats the content of the first storage partition 101, and then writes the repaired BMC system file into the first storage partition 101. The specific writing method can be a file copy method or other methods, which is not specifically limited in the embodiment of the present application.
[0146] In the embodiment of the present application, after the processing module 103 writes the repaired BMC system file into the first storage partition 101, the alarm is eliminated and the fault detection and repair operation of the next BMC system file is performed, that is, S41 is performed. Specifically, the processing module 103 adopts a polling method and polls the next BMC system file based on a pre-configured polling rule.
[0147] S412: Locate the second fault point of the BMC system file.
[0148] If both the first backup file and the third backup file are damaged, the first backup file can be directly used to repair the BMC system file. Specifically, the processing module 103 needs to first locate the second fault point of the BMC system file. The specific location method is the same as step S49 and will not be discussed here.
[0149] S413: Use the data of the second fault point in the first backup file to repair the data of the second fault point in the BMC system file, and execute S41.
[0150] Step S412 is the same as step S44 and will not be discussed again here.
[0151] Therefore, the embodiment of the present application identifies the faulty backup file or the fault point of the BMC system file, and replaces the content of the fault point in the faulty backup file or the fault point in the BMC system file with the content of the same position of the fault point in the undamaged backup file. That is, by accurately positioning the replacement method, the probability of damage to the overwritten file caused by complete overwriting repair is reduced.
[0152] like Figure 5 As shown, the embodiment of the present application further provides a computing device 500, and the computing device 500 does not specifically limit the application scenario. For example, the computing device 500 is introduced by taking a server as an example, and the type of the server is not specifically limited. For example, the server can be a rack server or an edge server. The server can be located in a data center or in other areas, and the embodiment of the present application does not make specific limitations.
[0153] The computing device 500 includes Figure 1 The BMC and power supply 502 shown in the figure, the power supply 502 is used to supply power to the BMC, so that the BMC starts and runs. The memory 503 is electrically connected to the processing module 103 of the BMC respectively; the memory 503 is used to store program instructions, and the program instructions are used to implement the file processing methods involved in the above embodiments; the processing module 103 is used to call the corresponding part of the above program instructions so that the server can execute the file processing methods involved in the above embodiments.
[0154] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using a software program, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions in the embodiments of the present application are generated.
[0155] The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a magnetic disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
[0156] The above are only preferred embodiments of the present application, and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technician familiar with the art can use the above disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present application without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still falls within the scope of protection of the technical solution of the present application.
Claims
1. A file processing method, characterized in that: Applied to a baseboard management controller, the baseboard management controller includes a first storage partition, a second storage partition and a processing module, the first storage partition is used to store a system file and a first backup file of the system file, the second storage partition is used to store a second backup file of the system file, and the method includes: The processing module detects that the system file is in a damaged state; In the case that the first backup file is not damaged, the processing module repairs the system file using the first backup file; In the case that the first backup file is damaged, the processing module obtains the second backup file from the second storage partition, and repairs the system file by using the second backup file.
2. The method according to claim 1, characterized in that: The first storage partition is used to store a third backup file of the system file, and when the first backup file is damaged, the processing module obtains the second backup file from the second storage partition and repairs the system file using the second backup file, including: In the case that the first backup file is damaged and the third backup file is damaged, the processing module obtains the second backup file from the second storage partition and repairs the system file by using the second backup file; The method further comprises: In the case that the first backup file is damaged and the third backup file is not damaged, the processing module repairs the first backup file using the third backup file; and repairs the system file using the repaired first backup file; In the case that the first backup file is not damaged, the processing module repairs the system file by using the first backup file, including: In the case that the first backup file is not damaged but the third backup file is damaged, the processing module repairs the third backup file by using the first backup file; and repairs the system file by using the first backup file.
3. The method according to claim 2, characterized in that: The processing module repairs the third backup file by using the first backup file, including: The processing module obtains a first failure point of the third backup file, where the first failure point is a location point in the third backup file where content is damaged; and repairs the content in the third backup file at the first failure point using the content at the location point in the first backup file corresponding to the first failure point; The processing module repairing the first backup file by using the third backup file includes: The processing module obtains a third failure point of the first backup file, where the third failure point is a location point in the first backup file where content is damaged; and repairs the content in the first backup file located at the third failure point using the content at the location point in the third backup file corresponding to the third failure point.
4. The method according to claim 1, characterized in that: The processing module repairs the system file using the first backup file, including: The processing module obtains a second failure point of the system file, where the second failure point is a location point where the content in the system file is damaged; and uses the content of the location point corresponding to the second failure point in the first backup file to repair the content in the system file located at the second failure point.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In the event that the first backup file is damaged, the processing module switches the state of the first storage partition from the primary state to the backup state, switches the state of the second storage partition from the backup state to the primary state, loads the backup file from the storage partition in the primary state, and uses the second backup file to modify the system file.
6. The method according to claim 5, characterized in that: The method further comprises: The processing module records the file information of the system file; The processing module, in response to receiving the active / standby switching completion instruction, obtains the recorded system file based on the recorded file information; and repairs the recorded system file using the second backup file; The processing module replaces the first backup file and the system file stored in the first storage partition with the repaired system file.
7. The method according to claim 1, characterized in that: The method further comprises: The processing module detects that the system file is updated and obtains the updated system file; The processing module uses the updated system file to synchronously update the first backup file and the second backup file.
8. The method according to claim 1, characterized in that: The method further comprises: After repairing the system file by using the second backup file, the processing module repairs the first backup file by using the system file.
9. The method according to claim 1, characterized in that: The method further comprises: The processing module obtains a second SHA 256 value of the system file; If the second SHA 256 value is the same as the first SHA 256 value of the original system file, the processing module determines that the system file is in a damaged state; If the second SHA 256 value is the same as the first SHA 256 value, the processing module determines that the system file is in an undamaged state.
10. A processing module, characterized in that: The processing module is used to execute the method according to any one of claims 1-9.
11. A computing device, characterized in that: The computing device comprises a baseboard management controller as claimed in any one of claims 1-9.
