CN115525479A - Backup method and backup device for BMC (baseboard management controller) - Google Patents

Backup method and backup device for BMC (baseboard management controller) Download PDF

Info

Publication number
CN115525479A
CN115525479A CN202211214607.0A CN202211214607A CN115525479A CN 115525479 A CN115525479 A CN 115525479A CN 202211214607 A CN202211214607 A CN 202211214607A CN 115525479 A CN115525479 A CN 115525479A
Authority
CN
China
Prior art keywords
file
ciphertext information
bmc
flag
backup
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211214607.0A
Other languages
Chinese (zh)
Inventor
王兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211214607.0A priority Critical patent/CN115525479A/en
Publication of CN115525479A publication Critical patent/CN115525479A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application provides a backup method and a backup device for BMC, wherein the method comprises the following steps: acquiring first ciphertext information and second ciphertext information, wherein the first ciphertext information is ciphertext information in a file with a preset format in a first file directory, the second ciphertext information is ciphertext information in a file with a preset format in a second file directory, the first file directory is a file directory of a configuration file of BMC, and the second file directory is a file directory of a backup file of the configuration file; modifying the value of the flag in the BMC under the condition that the first ciphertext information is different from the second ciphertext information; determining whether the value of the flag is modified or not under the condition that all the first ciphertext information and the second ciphertext information are compared; and under the condition that the value of the determination flag is modified, all files with the preset format in the first file directory are backed up to the second file directory. By the aid of the method and the device, the problem of poor safety of the BMC file backup scheme is solved.

Description

Backup method and backup device for BMC (baseboard management controller)
Technical Field
The embodiment of the application relates to the field of computers, in particular to a backup method, a backup device, a computer-readable storage medium and an electronic device for BMC.
Background
The server is used as the core of the network management system and the computing platform, a large amount of core and key data information are stored, and whether the server normally operates or not directly influences the condition of the whole system. Therefore, a BMC (Baseboard Management Controller) is required to monitor the health status of the server and control the server at a proper time. The current file synchronization scheme supported by the BMC is an important ring for ensuring the security of the BMC file, the BMC can selectively synchronize the BMC important file according to a time axis, if uncontrollable factors such as time jump occur in the BMC, the existing file synchronization scheme can be disabled, the file security is reduced, and further the BMC monitors the server for unstable factors, so that the security of the server is reduced.
Disclosure of Invention
The embodiment of the application provides a BMC backup method, a backup device, a computer readable storage medium and an electronic device, so as to at least solve the problem of poor safety of a BMC file backup scheme in the related art.
According to an embodiment of the present application, there is provided a BMC backup method, including: acquiring first ciphertext information and second ciphertext information, wherein the first ciphertext information is ciphertext information in a file with a preset format in a first file directory, the second ciphertext information is ciphertext information in the file with the preset format in a second file directory, the first file directory is a file directory of a configuration file of BMC, the second file directory is a file directory of a backup file of the configuration file, and the ciphertext information and configuration parameters are stored in the file with the preset format; modifying the value of a flag in the BMC if the first ciphertext information is different from the second ciphertext information; determining whether the value of the flag is modified when all the first ciphertext information and the second ciphertext information are compared; in the case that the value of the flag is determined to be modified, all the files in the predetermined format in the first file directory are backed up to the second file directory.
In one exemplary embodiment, obtaining the first ciphertext information and the second ciphertext information comprises: and under the condition that the BMC is powered on, sequentially acquiring a plurality of first ciphertext messages and a plurality of second ciphertext messages in a polling mode.
In one exemplary embodiment, before modifying the value of the flag in the BMC, the method further comprises: initializing the flag so that the initialized value of the flag is a first value, and modifying the value of the flag in the BMC, comprising: modifying the value of the flag to a second value, determining whether the value of the flag is modified, comprising: reading the value of the flag; determining that the value of the flag is modified if the value of the flag is the second value.
In an exemplary embodiment, the obtaining of the second ciphertext information includes: acquiring the ciphertext information in the file with the preset format under the file directory of the first sub-backup file to obtain first sub-ciphertext information; and acquiring the ciphertext information in the file with the preset format under the file directory of the second sub-backup file to obtain second sub-ciphertext information, wherein the first sub-ciphertext information and the second sub-ciphertext information form the second ciphertext information.
In one exemplary embodiment, modifying the value of the flag in the BMC in case the first ciphertext information is different from the second ciphertext information comprises: modifying first flag data to the second value if the first ciphertext information is different from the first sub-ciphertext information; modifying a second flag data to the second value if the first ciphertext information is different from the second sub-ciphertext information; modifying a third flag data to the second value if the first sub-ciphertext information is different from the second sub-ciphertext information, wherein the first, second, and third flag data comprise the value of the flag.
In an exemplary embodiment, backing up all the files of the predetermined format in the first file directory to the second file directory includes: and respectively backing up all the files with the preset format in the first file directory to the file directory of the first sub-backup file and the file directory of the second sub-backup file.
In an exemplary embodiment, the ciphertext information is MD (Message-Digest Algorithm) 5, and the predetermined format file is a data file.
According to another embodiment of the present application, there is provided a backup device for BMC, including: the device comprises a first acquisition unit and a second acquisition unit, wherein the first acquisition unit is used for acquiring first ciphertext information and second ciphertext information, the first ciphertext information is ciphertext information in a file with a preset format under a first file directory, the second ciphertext information is ciphertext information in the file with the preset format under a second file directory, the first file directory is a file directory of a configuration file of BMC, the second file directory is a file directory of a backup file of the configuration file, and the file with the preset format stores the ciphertext information and configuration parameters; a modification unit, configured to modify a value of a flag in the BMC if the first ciphertext information is different from the second ciphertext information; a first determining unit, configured to determine whether the value of the flag is modified when all of the first ciphertext information and the second ciphertext information are compared; a first backup unit, configured to backup all the files with the predetermined format in the first file directory to the second file directory if it is determined that the value of the flag is modified.
According to a further embodiment of the application, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present application, there is also provided an electronic device, comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
According to the backup method of the BMC, first ciphertext information in a file with a preset format in a BMC configuration file directory is obtained, and second ciphertext information in a file with a preset format in a backup file directory of the BMC configuration file is obtained; then, under the condition that the first ciphertext information is different from the second ciphertext information, modifying the value of a flag in the BMC; then, after comparing all the first ciphertext information and the second ciphertext information, determining whether the value of the flag is modified; finally, under the condition that the value of the determination flag is modified, all files with the preset format in the BMC configuration file directory are backed up to the backup file directory of the BMC. Compared with the prior art that the security of a BMC file backup scheme is poor due to the fact that important BMC files are selectively synchronized according to a time axis, the security of the BMC file backup scheme is poor, the BMC configuration file is changed by obtaining ciphertext information in a configuration file directory in BMC and ciphertext information in a file under a backup file target, when the ciphertext information is different from the ciphertext information, through modifying a value of a flag in the BMC, and under the condition that the value of the flag is modified, the configuration file is backed up to the backup file, backup of configuration parameters is achieved, the backup mode is not affected by factors such as time jump, the security is high, and therefore the security of a server is guaranteed.
Drawings
FIG. 1 is a flow chart of a backup method for BMC according to an embodiment of the application;
FIG. 2 is another flow chart of a backup method for BMC according to an embodiment of the application;
fig. 3 is a block diagram of a backup device of a BMC according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a hardware structure of a mobile terminal according to a BMC backup method in an embodiment of the present application.
Wherein the figures include the following reference numerals:
102. a processor; 104. a memory; 106. a transmission device; 108. and an input/output device.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In this embodiment, a BMC backup method is provided, and fig. 1 is a flowchart according to an embodiment of the present application, and as shown in fig. 1, the flowchart includes the following steps:
step S101, obtaining first ciphertext information and second ciphertext information, wherein the first ciphertext information is ciphertext information in a file with a predetermined format in a first file directory, the second ciphertext information is ciphertext information in the file with the predetermined format in a second file directory, the first file directory is a file directory of a configuration file conf of BMC, the second file directory is a file directory of a backup file of the configuration file, and the ciphertext information and configuration parameters are stored in the file with the predetermined format;
when the configuration file of the BMC changes, the ciphertext information of the configuration file also changes correspondingly. The ciphertext information may be obtained by any feasible encryption method in the prior art, such as a hash algorithm or a hash algorithm.
In the embodiment of the present application, the ciphertext information is MD5, that is, obtained by using a message digest algorithm. Of course, the ciphertext information is not limited to the MD5, and may be MD2, MD4, and the like, and those skilled in the art can flexibly set the ciphertext information according to actual needs.
The predetermined format file may be any feasible format file in which the ciphertext information and the configuration parameters are stored. In an actual application process, the general ciphertext information and the configuration parameter are in binary format, and therefore, in the embodiment of the present application, the file in the predetermined format is a data file, that is, a dat file, which stores the ciphertext information and the configuration parameter.
In a specific embodiment of the present application, the specific steps of obtaining the first ciphertext information and the second ciphertext information are: and under the condition that the BMC is powered on, sequentially acquiring a plurality of first ciphertext messages and a plurality of second ciphertext messages in a polling mode. Through a polling mechanism, files in the first file directory and the second file directory are traversed at regular time intervals to obtain a plurality of first ciphertext information and a plurality of second ciphertext information, so that the first ciphertext information and the second ciphertext information can be obtained in real time, the instantaneity of the obtained data is ensured, and a polling mode is easy to realize. Whether the BMC is updated or not is conveniently determined according to the first ciphertext information and the second ciphertext information which are acquired in real time, and when the BMC configuration file is updated, the BMC configuration file can be synchronized in real time, so that the safety of the BMC configuration file is improved.
Of course, the method of acquiring the first ciphertext information and the second ciphertext information is not limited to the polling method, and may be acquired by using a method such as long concatenation or streaming.
Step S102, modifying the value of the flag in the BMC under the condition that the first ciphertext message is different from the second ciphertext message;
before step S102, the method further includes: and comparing the first ciphertext information with the second ciphertext information in sequence.
When the first ciphertext information and the second ciphertext information are detected to be different, the BMC configuration file is changed, the BMC configuration file is updated, and the flag value in the BMC is modified, so that whether the BMC configuration file is changed or not can be clearly determined by reading the flag value subsequently.
Step S103, determining whether the value of the flag is modified or not when all the first ciphertext information and the second ciphertext information are compared;
after comparing whether all the first ciphertext information and the second ciphertext information are the same, determining whether the flag value is modified, avoiding determining the flag value under the condition that the first ciphertext information and the second ciphertext information are not completely compared, and omitting the situation that part of the first ciphertext information and the second ciphertext information are different, thereby further ensuring the backup security of the BMC configuration file.
Step S104, if the value of the flag is determined to be modified, all the files with the predetermined format in the first file directory are backed up to the second file directory.
Under the condition that the value of the flag is modified, the BMC configuration file is changed, the BMC configuration file is updated, all files in the predetermined format in the first file directory are backed up to the second file directory at the moment, and the backup of the updated BMC configuration file is realized.
Before modifying the value of the flag in the BMC, the method further comprises: initializing the flag so that the initialized value of the flag is a first value.
In the embodiment of the present application, the first value is 0, that is, the initialization action is used to reset the flag.
Modifying the value of the flag in the BMC includes: modifying the value of the flag to a second value.
In an embodiment of the present application, the second value is 1, and the flag is set to 1 when the first ciphertext information is different from the second ciphertext information.
In addition, when the first ciphertext information is identical to the second ciphertext information, the method further includes: and if the first ciphertext information is the same as the second ciphertext information, not modifying the value of the flag.
When the first ciphertext information is the same as the second ciphertext information, the value of the flag is not modified, i.e., the flag remains 0.
Determining whether the value of the flag is modified, including: reading the value of the flag; determining that the value of the flag is modified in case that the value of the flag is the second value.
In order to further ensure the security of the BMC configuration file, according to another embodiment of the present application, the backup file includes a first sub backup file and a second sub backup file, where the file types of the first sub backup file and the second sub backup file are different, and the obtaining the second ciphertext information includes:
step S1011, obtaining the ciphertext information in the file with the predetermined format under the file directory of the first sub-backup file, to obtain a first sub-ciphertext information;
step S1012 is performed to obtain the ciphertext information in the file with the predetermined format under the file directory of the second sub-backup file, so as to obtain second sub-ciphertext information, where the first sub-ciphertext information and the second sub-ciphertext information form the second ciphertext information.
In the above embodiment, the backup files of the two BMCs are set, that is, the BMC configuration file is subjected to dual backup, so that timely backup of the updated BMC configuration file can be further ensured, and the security of the BMC configuration file is further ensured.
Illustratively, the first sub-backup file is a backup upconf file, and the second sub-backup file is a backup upsync file. The first sub-backup file is mainly used for synchronously backing up configuration information of BMC, and the second sub-backup file is mainly used for synchronously backing up data information of BMC.
In the case that the first ciphertext information is different from the second ciphertext information, a specific implementation manner of modifying the value of the flag in the BMC may be as follows:
modifying a first flag data flag1 to the second value in case that the first ciphertext information is different from the first sub-ciphertext information;
modifying a second flag data flag2 to the second value in case that the first ciphertext information is different from the second sub-ciphertext information;
and modifying a third flag data flag3 to the second value when the first sub-ciphertext information is different from the second sub-ciphertext information, wherein the first flag data flag1, the second flag data flag2, and the third flag data flag3 constitute the value of the flag.
In the above embodiment, when the MD5 in the dat file under the conf file directory is different from the MD5 in the dat file under the backupconf file directory, or when the MD5 in the dat file under the conf file directory is different from the MD5 in the dat file under the backupsync file directory, or when the MD5 in the dat file under the backupconf file directory is different from the MD5 in the backupsync file directory, the content of the BMC configuration file may be changed, so that when any one of the three conditions occurs, the corresponding flag data is set, and the subsequent backup of the BMC configuration file according to the flag is facilitated, thereby further ensuring that the configuration file of the BMC is backed up in time when the configuration file of the BMC is changed, and further avoiding the problem that the BMC configuration file is lost due to untimely backup.
In the above embodiment, the flag of the BMC is initialized to the first value, and then the flag is modified from the first value to the second value when the first ciphertext information is different from the second ciphertext information; and then, whether the first ciphertext information is different from the second ciphertext information or not is determined by reading data of the flag, when the flag is the first value, the first ciphertext information is the same as the second ciphertext information, the BMC configuration file is not updated, when the flag is the second value, the first ciphertext information is different from the second ciphertext information, the BMC configuration file is possibly updated, at the moment, all files in the predetermined format in the first file directory are backed up to the second file directory, the updated BMC configuration file is backed up, the timeliness of synchronizing the modified BMC configuration file to the backup file is guaranteed, and the problems of file synchronization abnormality, configuration loss and the like caused by failure of a data mirror backup tool in an rsync (linux system) are solved.
In addition, the backup file is divided into two sub-backup files in the process, whether ciphertext information of the two sub-backup files is consistent or not is monitored in real time, whether file contents of the two sub-backup files are synchronous or not is determined, real-time monitoring of the BMC backup file is achieved, the BMC configuration file is safe and reliable, and further stable monitoring of the whole state of the server is guaranteed, and the server can normally operate in a healthy state.
Backing up all the files with the predetermined format in the first file directory to the second file directory, including: and respectively backing up all the files with the preset format in the first file directory to the file directory of the first sub-backup file and the file directory of the second sub-backup file.
The process can be realized by calling a Linux copy command, and particularly, the dat files in the conf file directory are copied to the backup upconf file directory and the backup upsync file directory by calling the Linux copy command, so that the dat files in the three directories are synchronized, and the file security is improved.
In the backup method for the BMC, first ciphertext information in a file with a preset format in a BMC configuration file directory is obtained, and second ciphertext information in a file with a preset format in a backup file directory of the BMC configuration file is obtained; then, under the condition that the first ciphertext information is different from the second ciphertext information, modifying the value of a flag in the BMC; then, under the condition that all the first ciphertext information and the second ciphertext information are compared, determining whether the value of the flag is modified; finally, under the condition that the value of the flag is determined to be modified, all the files with the preset format in the BMC configuration file directory are backed up to the backup file directory of the BMC. Compared with the prior art that the security of a BMC file backup scheme is poor due to the fact that important BMC files are selectively synchronized according to a time axis, the security of the BMC file backup scheme is poor, the BMC configuration file is changed by obtaining ciphertext information in a configuration file directory in BMC and ciphertext information in a file under a backup file target, when the ciphertext information is different from the ciphertext information, through modifying a value of a flag in the BMC, and under the condition that the value of the flag is modified, the configuration file is backed up to the backup file, backup of configuration parameters is achieved, the backup mode is not affected by factors such as time jump, the security is high, and therefore the security of a server is guaranteed.
The use scene of multi-BMC communication often exists in the server system, the BMC file safety is improved, the BMC monitoring efficiency can be effectively improved, and the management efficiency and the operation stability of the server are improved. Meanwhile, the health states of different components of the whole server system can be better monitored by improving the safety of the BMC file, and the operation and health states of the components can be managed and monitored more accurately and more carefully. Therefore, improving the BMC security is very important, which is a basis for the BMC to timely and stably acquire the health state of the monitored component of each BMC and issue a related command to each component, and is also a powerful guarantee for stable operation of the server.
According to another embodiment of the present application, as shown in fig. 2, there is further provided a BMC backup method, which specifically includes the following steps:
step S201, in a case that a server system is powered on, sequentially obtaining a plurality of first ciphertext information and a plurality of second ciphertext information in a polling manner, where the first ciphertext information is ciphertext information in a file with a predetermined format in a first file directory, the second ciphertext information is ciphertext information in a file with a predetermined format in a second file directory, the first file directory is a file directory of a configuration file of the BMC, the second file directory is a file directory of a backup file of the configuration file, and the predetermined format file stores the ciphertext information and configuration parameters;
the steps are implemented through a polling mechanism, files in the first file directory and the second file directory are traversed at regular time intervals to obtain a plurality of first ciphertext information and a plurality of second ciphertext information, real-time obtaining of the first ciphertext information and the second ciphertext information can be achieved, instantaneity of obtained data is guaranteed, and a polling mode is easy to implement. Whether the BMC is updated or not is conveniently determined according to the first ciphertext information and the second ciphertext information which are acquired in real time, and when the BMC configuration file is updated, the BMC configuration file can be synchronized in real time, so that the safety of the BMC configuration file is improved.
It should be noted that, when the configuration file of the BMC changes, the ciphertext information of the configuration file also changes correspondingly. The ciphertext information may be obtained by any feasible encryption method in the prior art, such as a hash algorithm or a hash algorithm.
In the embodiment of the present application, the ciphertext information is MD5, that is, obtained by using a message digest algorithm. Of course, the ciphertext information is not limited to the MD5, and may be MD2, MD4, and the like, and those skilled in the art can flexibly set the ciphertext information according to actual needs.
The predetermined format file may be any feasible format file in which the ciphertext information and the configuration parameters are stored. In an actual application process, the general ciphertext information and the configuration parameter are both in binary format, and therefore, in the embodiment of the present application, the predetermined format file is a data file, that is, a dat file, to store the ciphertext information and the configuration parameter.
Step S202, determining whether the first ciphertext message is the same as the second ciphertext message;
determining whether the configuration file of the BMC is changed or not by determining whether the two ciphertext information are the same, and indicating that the BMC configuration file is changed under the condition that the first ciphertext information and the second ciphertext information are the same; and when the first ciphertext information and the second ciphertext information are detected to be different, the BMC configuration file is changed.
Step S203, assigning a second value to a flag if the first ciphertext information is different from the second ciphertext information, and assigning a first value to the flag if the first ciphertext information is the same as the second ciphertext information;
by assigning the values corresponding to different situations to the flag, the subsequent file backup or non-backup operation can be conveniently executed according to the values of the flag.
In an embodiment of the present application, the second value is 1, and the flag is set to 1 when the first ciphertext information is different from the second ciphertext information. And resetting the flag to 0 when the first ciphertext information is identical to the second ciphertext information.
Step S204, after comparing all the first ciphertext information and all the second ciphertext information, reading the value of the flag;
after comparing whether all the first ciphertext information and the second ciphertext information are the same, determining whether the flag value is modified, avoiding determining the flag value under the condition that the first ciphertext information and the second ciphertext information are not completely compared, and omitting the situation that part of the first ciphertext information and the second ciphertext information are different, thereby further ensuring the backup security of the BMC configuration file.
In step S205, if the flag value is the second value, all the files in the predetermined format in the first file directory are backed up to the second file directory.
The above embodiment modifies the flag from a first value to a second value when the first ciphertext message is different from the second ciphertext message; and then, whether the first ciphertext information is different from the second ciphertext information or not is determined by reading data of the flag, when the flag is the first value, the first ciphertext information is the same as the second ciphertext information, the BMC configuration file is not updated, when the flag is the second value, the first ciphertext information is different from the second ciphertext information, the BMC configuration file is possibly updated, at the moment, all files in the predetermined format in the first file directory are backed up to the second file directory, the updated BMC configuration file is backed up, the timeliness that the BMC configuration file is synchronized to a backup file after being modified is guaranteed, and the problems that file synchronization is abnormal and configuration is lost due to rsync failure are solved.
Because the backup mode is not the file synchronization according to a time axis, the backup mode is not influenced by factors such as time hopping and the like, so that the safety of the BMC configuration file is higher, and the stable monitoring of the BMC on the server is ensured.
In order to further ensure the security of the BMC configuration file, according to another embodiment of the present application, the backup file includes a first sub backup file and a second sub backup file, where the file types of the first sub backup file and the second sub backup file are different, and the obtaining the second ciphertext information includes: acquiring the ciphertext information in the file with the preset format under the file directory of the first sub-backup file to obtain first sub-ciphertext information; and acquiring the ciphertext information in the file with the predetermined format under the file directory of the second sub-backup file to obtain second sub-ciphertext information, wherein the first sub-ciphertext information and the second sub-ciphertext information form the second ciphertext information.
In the above embodiment, the backup files of the two BMCs are set, that is, the BMC configuration file is subjected to dual backup, so that timely backup of the updated BMC configuration file can be further ensured, and the security of the BMC configuration file is further ensured.
Illustratively, the first sub-backup file is a backup upconf file, and the second sub-backup file is a backup upsync file. The first sub-backup file is mainly used for synchronously backing up configuration information of BMC, and the second sub-backup file is mainly used for synchronously backing up data information of BMC.
In the case that the first ciphertext information is different from the second ciphertext information, the specific implementation manner of assigning the second value to the flag may be as follows: modifying a first flag data flag1 to the second value in case that the first ciphertext information is different from the first sub-ciphertext information; modifying a second flag data flag2 to the second value in case that the first ciphertext information is different from the second sub-ciphertext information; and modifying a third flag data flag3 to the second value when the first sub-ciphertext information is different from the second sub-ciphertext information, wherein the first flag data flag1, the second flag data flag2, and the third flag data flag3 constitute the value of the flag.
In the above embodiment, when the MD5 in the dat file under the conf file directory is different from the MD5 in the dat file under the backupconf file directory, or when the MD5 in the dat file under the conf file directory is different from the MD5 in the dat file under the backupsync file directory, or when the MD5 in the dat file under the backupconf file directory is different from the MD5 in the backupsync file directory, the content of the BMC configuration file may be changed, so that when any one of the three conditions occurs, the corresponding flag data is set, and the subsequent backup of the BMC configuration file according to the flag is facilitated, thereby further ensuring that the configuration file of the BMC is backed up in time when the configuration file of the BMC is changed, and further avoiding the problem that the BMC configuration file is lost due to untimely backup.
The execution subject of the above steps may be a controller of BMC, but is not limited thereto.
The execution order of step S101, step S102, step S103 and step S104 is not limited to the execution of step S101, step S102, step S103 and step S104 in sequence, and their execution order may be interchanged. Likewise, the sequence of steps S201 to S205 is not limited to the sequential execution.
In one embodiment, the control flow of the BMC mainly includes the following contents: after a server architecture system is powered on, an independent thread is established to monitor the security of a BMC file; polling to obtain the MD5 value of the monitored file of the BMC, and copying the latest file to the target directory. Therefore, the real-time monitoring of the BMC on the file is improved, the stability of a BMC file system is improved, the normal operation of the server is further guaranteed, and more stable and reliable safety performance is provided for the server.
Functionally, the BMC is mainly used to collect various information on a single server and provide the information to upper layer operation and maintenance network management software. There are two main approaches, the first: the BMC can provide various interfaces for upper layer Network Management inquiry, such as human-machine interfaces of web, command line and the like, SNMP (Simple Network Management Protocol), IPMI (Intelligent Platform Management Interface), REsTful (Representational State Transfer, design style and development mode of Network application program) and the like; the second is active reporting, when a fault is detected, the BMC may report to the server of the upper-layer network management software through SNMP trap (SNMP trap) message, SMTP (Simple Mail Transfer Protocol) Mail message, redfish http json message, and the like, so that the operation and maintenance personnel can identify and process the fault in time. In general, the message reported by the BMC software will explicitly indicate which component has failed, what the processing proposal is, and so on. By the method, the conditions that the rotating speed of the fan is controlled by the BMC to be invalid and the like can be avoided.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
In this embodiment, a backup device for BMC is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 3 is a block diagram of a backup device of BMC according to an embodiment of the present application, and as shown in fig. 3, the backup device includes:
a first obtaining unit 10, configured to obtain first ciphertext information and second ciphertext information, where the first ciphertext information is ciphertext information in a file with a predetermined format in a first file directory, the second ciphertext information is ciphertext information in a file with a predetermined format in a second file directory, the first file directory is a file directory of a configuration file conf of a BMC, the second file directory is a file directory of a backup file of the configuration file, and the predetermined format file stores the ciphertext information and a configuration parameter;
when the configuration file of the BMC changes, the ciphertext information of the configuration file also changes correspondingly. The ciphertext information may be obtained by any feasible encryption method in the prior art, such as a hash algorithm or a hash algorithm.
In the embodiment of the present application, the ciphertext information is MD5, that is, obtained by using a message digest algorithm. Of course, the ciphertext information is not limited to the MD5, and may be MD2, MD4, and the like, and those skilled in the art can flexibly set the ciphertext information according to actual needs.
The predetermined format file may be any feasible format file in which the ciphertext information and the configuration parameters are stored. In an actual application process, the general ciphertext information and the configuration parameter are both in binary format, and therefore, in the embodiment of the present application, the predetermined format file is a data file, that is, a dat file, to store the ciphertext information and the configuration parameter.
According to a specific embodiment of the present application, the first obtaining unit includes a first obtaining module, and the first obtaining module is configured to sequentially obtain a plurality of the first ciphertext information and a plurality of the second ciphertext information in a polling manner when the BMC is powered on. Through a polling mechanism, files in the first file directory and the second file directory are traversed at regular time intervals to obtain a plurality of first ciphertext information and a plurality of second ciphertext information, so that the first ciphertext information and the second ciphertext information can be obtained in real time, the instantaneity of the obtained data is ensured, and a polling mode is easy to realize. Whether the BMC is updated or not is conveniently determined according to the first ciphertext information and the second ciphertext information which are acquired in real time, and when the BMC configuration file is updated, the BMC configuration file can be synchronized in real time, so that the safety of the BMC configuration file is improved.
Of course, the method of acquiring the first ciphertext information and the second ciphertext information is not limited to the polling method, and may be acquired by using a method such as long concatenation or streaming.
A modifying unit 20, configured to modify the value of the flag in the BMC if the first ciphertext information is different from the second ciphertext information;
when the first ciphertext information and the second ciphertext information are detected to be different, the BMC configuration file is changed, the BMC configuration file is updated, and the flag value in the BMC is modified, so that whether the BMC configuration file is changed or not can be clearly determined by reading the flag value subsequently.
A first determining unit 30, configured to determine whether the value of the flag is modified when all of the first ciphertext information and the second ciphertext information are compared;
after comparing whether all the first ciphertext information and the second ciphertext information are the same, determining whether the flag value is modified, avoiding determining the flag value under the condition that the first ciphertext information and the second ciphertext information are not completely compared, and omitting the situation that part of the first ciphertext information and the second ciphertext information are different, thereby further ensuring the backup security of the BMC configuration file.
A first backup unit 40, configured to backup all the files with the predetermined format in the first file directory to the second file directory if it is determined that the value of the flag is modified.
Under the condition that the value of the flag is modified, the BMC configuration file is changed and updated, all files in the preset format in the first file directory are backed up in the second file directory at the moment, backup of the updated BMC configuration file is achieved, and due to the fact that the backup mode is not file synchronization conducted according to a time axis, the backup mode is not affected by factors such as time hopping, the safety of the BMC configuration file is high, and stable monitoring of a server by the BMC is guaranteed.
Specifically, the apparatus further includes an initialization unit configured to initialize the flag before modifying a value of the flag in the BMC, so that the initialized value of the flag is a first value.
In the embodiment of the present application, the first value is 0, that is, the initialization action is an operation of resetting the flag.
The modification unit comprises a first modification module, and the first modification module is used for modifying the value of the flag into a second value.
In an embodiment of the present application, the second value is 1, and the flag is set to 1 when the first ciphertext information is different from the second ciphertext information.
In addition, the apparatus further includes an unmodified unit configured to not modify the value of the flag if the first ciphertext information is identical to the second ciphertext information and the first ciphertext information is identical to the second ciphertext information.
When the first ciphertext information is the same as the second ciphertext information, the value of the flag is not modified, i.e., the flag remains 0.
The first determining unit comprises a reading module and a determining module, wherein the reading module is used for reading the value of the flag; the determining module is configured to determine that the value of the flag is modified if the value of the flag is the second value.
In order to further ensure the security of the BMC configuration file, according to another embodiment of the present application, the backup file includes a first sub backup file and a second sub backup file, where the file types of the first sub backup file and the second sub backup file are different, the first obtaining unit further includes a second obtaining module and a third obtaining module, where the second obtaining module is configured to obtain the ciphertext information in the file with the predetermined format under the file directory of the first sub backup file, so as to obtain first sub ciphertext information; the third obtaining module is configured to obtain the ciphertext information in the file with the predetermined format under the file directory of the second sub-backup file, to obtain second sub-ciphertext information, where the first sub-ciphertext information and the second sub-ciphertext information form the second ciphertext information.
In the above embodiment, by setting the backup files of the two BMCs, that is, performing dual backup on the BMC configuration file, it is further ensured that the updated BMC configuration file is backed up in time, and the security of the BMC configuration file is further ensured.
Illustratively, the first sub-backup file is a backup upconf file, and the second sub-backup file is a backup upsync file. The first sub-backup file is mainly used for synchronously backing up configuration information of BMC, and the second sub-backup file is mainly used for synchronously backing up data information of BMC.
The modification unit further includes a second modification module, a third modification module, and a fourth modification submodule, where the second modification module is configured to modify the first flag data flag1 into the second value when the first ciphertext information is different from the first sub-ciphertext information; the third modification module is configured to modify a second flag data flag2 to the second value if the first ciphertext information is different from the second sub-ciphertext information; the fourth modification sub-module is configured to modify a third flag data flag3 to the second value when the first sub-ciphertext information is different from the second sub-ciphertext information, where the first flag data flag1, the second flag data flag2, and the third flag data flag3 constitute a value of the flag.
In the above embodiment, when the MD5 in the dat file under the conf file directory is different from the MD5 in the dat file under the backupconf file directory, or when the MD5 in the dat file under the conf file directory is different from the MD5 in the dat file under the backupsync file directory, or when the MD5 in the dat file under the backupconf file directory is different from the MD5 in the backupsync file directory, the content of the BMC configuration file may be changed, so that when any one of the three conditions occurs, the corresponding flag data is set, and the subsequent backup of the BMC configuration file according to the flag is facilitated, thereby further ensuring that the configuration file of the BMC is backed up in time when the configuration file of the BMC is changed, and further avoiding the problem that the BMC configuration file is lost due to untimely backup.
In the above embodiment, the flag of the BMC is initialized to the first value, and then the flag is modified from the first value to the second value when the first ciphertext information is different from the second ciphertext information; and then, whether the first ciphertext information is different from the second ciphertext information is determined by reading the data of the flag, when the flag is the first value, the first ciphertext information is the same as the second ciphertext information, the BMC configuration file is not updated, when the flag is the second value, the first ciphertext information is different from the second ciphertext information, the BMC configuration file is possibly updated, at the moment, all files with the preset format in the first file directory are backed up to the second file directory, the updated BMC configuration file is backed up, the timeliness that the updated BMC configuration file is synchronized to the backup file after being modified is ensured, and the problems of abnormal file synchronization, configuration loss and the like caused by failure of the rsync (data mirror image backup tool in linux system) are solved.
In addition, the backup file is divided into two sub-backup files in the process, whether ciphertext information of the two sub-backup files is consistent or not is monitored in real time, whether file contents of the two sub-backup files are synchronous or not is determined, real-time monitoring of the BMC backup file is achieved, the BMC configuration file is safe and reliable, and further stable monitoring of the whole state of the server is guaranteed, and the server can normally operate in a healthy state.
The backup module comprises a backup submodule, and the backup submodule is used for respectively backing up all the files with the preset format in the first file directory to the file directory of the first sub-backup file and the file directory of the second sub-backup file.
The above process can be realized by calling a Linux copy command, and particularly, the dat files in the conf file directory are copied to the backup conf file directory and the backup sync file directory respectively by calling the Linux copy command, so that the dat files in the three directories are synchronized, and the file security is improved.
In the backup device for the BMC, a first obtaining unit obtains first ciphertext information in a file with a predetermined format in a BMC configuration file directory and obtains second ciphertext information in a file with a predetermined format in a backup file directory of the BMC configuration file; modifying the value of the flag in the BMC through the modifying unit under the condition that the first ciphertext information is different from the second ciphertext information; determining, by the first determining unit, whether the value of the flag is modified when all of the first ciphertext information and the second ciphertext information are compared; if the value of the flag is determined to be modified, all the files with the predetermined format in the BMC configuration file directory are backed up to the backup file directory of the BMC through the first backup unit. Compared with the prior art that the security of a BMC file backup scheme is poor due to the fact that important BMC files are selectively synchronized according to a time axis, the security of the BMC file backup scheme is poor due to the fact that ciphertext information in a configuration file directory in BMC and ciphertext information in a file under a backup file target are obtained, when the ciphertext information is different, the value of a flag in the BMC is modified, then the BMC configuration file is changed under the condition that the value of the flag is modified, at the moment, backup of configuration parameters is achieved by backing up files in a preset format in the configuration file directory into the backup file, the backup mode is not affected by factors such as time jump, the security is high, and therefore the security of a server is guaranteed.
The use scene of multi-BMC communication often exists in the server system, the BMC file safety is improved, the BMC monitoring efficiency can be effectively improved, and the management efficiency and the operation stability of the server are improved. Meanwhile, the health states of different components of the whole server system can be better monitored by improving the safety of the BMC file, and the operation and health states of the components can be managed and monitored more accurately and more carefully. Therefore, improving the BMC security is very important, which is a basis for the BMC to timely and stably acquire the health state of the monitored component of each BMC and issue a related command to each component, and is also a powerful guarantee for stable operation of the server.
According to another embodiment of the present application, there is also provided a backup device for BMC, including:
a second obtaining unit, configured to sequentially obtain, in a polling manner, a plurality of first ciphertext information and a plurality of second ciphertext information when a server system is powered on, where the first ciphertext information is ciphertext information in a file in a predetermined format in a first file directory, the second ciphertext information is ciphertext information in a file in the predetermined format in a second file directory, the first file directory is a file directory of a configuration file of the BMC, the second file directory is a file directory of a backup file of the configuration file, and the predetermined format file stores the ciphertext information and the configuration parameter;
in the process, a polling mechanism is adopted, and files in the first file directory and the second file directory are traversed at regular time intervals to obtain a plurality of first ciphertext information and a plurality of second ciphertext information, so that the first ciphertext information and the second ciphertext information can be obtained in real time, the instantaneity of the obtained data is ensured, and the polling mode is easy to realize. Whether the BMC is updated or not can be determined conveniently according to the first ciphertext information and the second ciphertext information which are obtained in real time, and when the BMC is updated, the BMC configuration file can be synchronized in real time, so that the safety of the BMC configuration file is improved.
When the configuration file of the BMC changes, the ciphertext information of the configuration file also changes correspondingly. The ciphertext information may be obtained by any feasible encryption method in the prior art, such as a hash algorithm or a hash algorithm.
In the embodiment of the present application, the ciphertext information is MD5, that is, obtained by using a message digest algorithm. Of course, the ciphertext information is not limited to the MD5, and may be MD2, MD4, and the like, and those skilled in the art can flexibly set the ciphertext information according to actual needs.
The predetermined format file may be any feasible format file in which the ciphertext information and the configuration parameters are stored. In an actual application process, the general ciphertext information and the configuration parameter are both in binary format, and therefore, in the embodiment of the present application, the predetermined format file is a data file, that is, a dat file, to store the ciphertext information and the configuration parameter.
A second determining unit configured to determine whether the first ciphertext information is the same as the second ciphertext information;
determining whether the configuration file of the BMC is changed or not by determining whether the two pieces of ciphertext information are the same, and indicating that the configuration file of the BMC is changed under the condition that the first ciphertext information and the second ciphertext information are the same; and when the first ciphertext information and the second ciphertext information are detected to be different, the BMC configuration file is changed.
An assigning unit configured to assign a second value to a flag if the first ciphertext information is different from the second ciphertext information, and assign a first value to the flag if the first ciphertext information is the same as the second ciphertext information;
by assigning the values corresponding to different situations to the flag, the subsequent file backup or non-backup operation can be conveniently executed according to the values of the flag.
In an embodiment of the present application, the second value is 1, and the flag is set to 1 when the first ciphertext information is different from the second ciphertext information. And resetting the flag to 0 when the first ciphertext information is identical to the second ciphertext information.
A reading unit, configured to read the value of the flag after comparing all of the first ciphertext information and all of the second ciphertext information;
after comparing whether all the first ciphertext information and the second ciphertext information are the same, determining whether the flag value is modified, avoiding determining the flag value under the condition that the first ciphertext information and the second ciphertext information are not completely compared, and omitting the situation that part of the first ciphertext information and the second ciphertext information are different, thereby further ensuring the backup security of the BMC configuration file.
A second backup unit, configured to backup all the files with the predetermined format in the first file directory to the second file directory if the flag value is the second value.
The above embodiment modifies the flag from a first value to a second value when the first ciphertext message is different from the second ciphertext message; and determining whether the first ciphertext information is different from the second ciphertext information or not by reading data of the flag, wherein when the flag is the first value, the first ciphertext information is the same as the second ciphertext information, and the BMC configuration file is not updated, and when the flag is the second value, the first ciphertext information is different from the second ciphertext information, and the BMC configuration file is possibly updated.
Because the backup mode is not the file synchronization according to the time axis, the backup mode is not influenced by factors such as time jump and the like, so that the safety of the BMC configuration file is higher, and the stable monitoring of the BMC on the server is ensured.
In order to further ensure the security of the BMC configuration file, according to another embodiment of the present application, the backup file includes a first sub backup file and a second sub backup file, where the file types of the first sub backup file and the second sub backup file are different, the second obtaining unit includes a fourth obtaining module and a fifth obtaining module, where the fourth obtaining module is configured to obtain the ciphertext information in the file with the predetermined format under the file directory of the first sub backup file, so as to obtain first sub ciphertext information; the fifth obtaining module is configured to obtain the ciphertext information of the predetermined format file under the file directory of the second sub-backup file, to obtain second sub-ciphertext information, where the first sub-ciphertext information and the second sub-ciphertext information form the second ciphertext information.
In the above embodiment, by setting the backup files of the two BMCs, that is, performing dual backup on the BMC configuration file, it is further ensured that the updated BMC configuration file is backed up in time, and the security of the BMC configuration file is further ensured.
Illustratively, the first sub-backup file is a backup upconf file, and the second sub-backup file is a backup upsync file. The first sub-backup file is mainly used for synchronously backing up configuration information of BMC, and the second sub-backup file is mainly used for synchronously backing up data information of BMC.
The assignment unit specifically includes a fifth modification module, a sixth modification module, and a seventh modification module, where the fifth modification module is configured to modify the first flag data flag1 to the second value when the first ciphertext information is different from the first sub-ciphertext information; the sixth modification module is configured to modify a second flag data flag2 to the second value if the first ciphertext information is different from the second sub-ciphertext information; the seventh modification module is configured to modify a third flag data flag3 to the second value when the first sub ciphertext information is different from the second sub ciphertext information, where the first flag data flag1, the second flag data flag2, and the third flag data flag3 constitute the value of the flag.
In the above embodiment, when the MD5 in the dat file under the conf file directory is different from the MD5 in the dat file under the backupconf file directory, or when the MD5 in the dat file under the conf file directory is different from the MD5 in the dat file under the backupsync file directory, or when the MD5 in the dat file under the backupconf file directory is different from the MD5 in the backupsync file directory, the content of the BMC configuration file may be changed, so that when any one of the three conditions occurs, the corresponding flag data is set, and the subsequent backup of the BMC configuration file according to the flag is facilitated, thereby further ensuring that the configuration file of the BMC is backed up in time when the configuration file of the BMC is changed, and further avoiding the problem that the BMC configuration file is lost due to untimely backup.
In one embodiment, the control flow of the BMC mainly includes the following contents: after a server architecture system is powered on, an independent thread is established to monitor the security of a BMC file; and polling to obtain the MD5 value of the monitored file of the BMC, and copying the latest file to the target directory. Therefore, the real-time monitoring of the BMC on the file is improved, the stability of a BMC file system is improved, the normal operation of the server is further guaranteed, and more stable and reliable safety performance is provided for the server.
Functionally, the BMC is mainly used to collect various information on a single server and provide the information to upper layer operation and maintenance network management software. There are two main approaches, the first: the BMC provides various interfaces for upper layer Network Management inquiry, such as interfaces of web, command line and other human-machine interfaces, SNMP (Simple Network Management Protocol), IPMI (Intelligent Platform Management Interface), REFTful (Representational State Transfer, design style and development mode of Network application program) and the like; the second is active reporting, when a fault is detected, the BMC may report to the server of the upper-layer network management software through SNMP trap (SNMP trap) message, SMTP (Simple Mail Transfer Protocol) Mail message, redfish http json message, and the like, so that the operation and maintenance personnel can identify and process the fault in time. In general, the message reported by the BMC software will explicitly indicate which component has failed, what the processing proposal is, and so on. By the method, the conditions that the rotating speed of the fan is controlled by the BMC to be invalid and the like can be avoided.
It should be noted that the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present application further provide a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present application further provide an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any one of the method embodiments described above.
In an exemplary embodiment, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the operation on the mobile terminal as an example, fig. 4 is a hardware structure block diagram of the mobile terminal of the BMC backup method according to the embodiment of the present application. As shown in fig. 4, the mobile terminal may include one or more processors 102 (only one is shown in fig. 4) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 4 is only an illustration and is not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the BMC backup method in the embodiment of the present application, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The embodiments of the present application may be executed on a server architecture, where the server architecture includes: a server, a BMC, and a controller of the BMC to perform any of the methods described herein, wherein the controllers of the BMC and the BMC may be integrated as a whole. Of course, the present application is not limited to a fixed platform server architecture.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the present application described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing devices, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into separate integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A backup method of BMC is characterized by comprising the following steps:
acquiring first ciphertext information and second ciphertext information, wherein the first ciphertext information is ciphertext information in a file with a preset format in a first file directory, the second ciphertext information is ciphertext information in the file with the preset format in a second file directory, the first file directory is a file directory of a configuration file of BMC, the second file directory is a file directory of a backup file of the configuration file, and the ciphertext information and configuration parameters are stored in the file with the preset format;
modifying the value of a flag in the BMC if the first ciphertext information is different from the second ciphertext information;
determining whether the value of the flag is modified when all the first ciphertext information and the second ciphertext information are compared;
and if the flag value is determined to be modified, backing up all the files with the preset format in the first file directory to the second file directory.
2. The method of claim 1, wherein obtaining the first ciphertext information and the second ciphertext information comprises:
and under the condition that the BMC is powered on, sequentially acquiring a plurality of first ciphertext information and a plurality of second ciphertext information in a polling mode.
3. The method of claim 1,
before modifying the value of the flag in the BMC, the method further comprises: initializing the flag so that the value of the initialized flag is a first value,
modifying the value of a flag in the BMC comprising: modifying the value of the flag to a second value,
determining whether the value of the flag is modified, comprising: reading the value of the flag; determining that the value of the flag is modified if the value of the flag is the second value.
4. The method according to claim 3, wherein the backup file includes a first sub backup file and a second sub backup file, the first sub backup file and the second sub backup file have different file types, and obtaining the second ciphertext information includes:
acquiring the ciphertext information in the file with the preset format under the file directory of the first sub-backup file to obtain first sub-ciphertext information;
and acquiring the ciphertext information in the file with the preset format under the file directory of the second sub-backup file to obtain second sub-ciphertext information, wherein the first sub-ciphertext information and the second sub-ciphertext information form the second ciphertext information.
5. The method of claim 4, wherein modifying the value of the flag in the BMC if the first ciphertext information is different from the second ciphertext information comprises:
modifying first flag data to the second value if the first ciphertext information is different from the first sub-ciphertext information;
modifying a second flag data to the second value if the first ciphertext information is different from the second sub-ciphertext information;
modifying a third flag data to the second value if the first sub-ciphertext information is different from the second sub-ciphertext information, wherein the first, second, and third flag data comprise the value of the flag.
6. The method of claim 4, wherein backing up all the files of the predetermined format in the first file directory to the second file directory comprises:
and respectively backing up all the files with the preset format in the first file directory to the file directory of the first sub-backup file and the file directory of the second sub-backup file.
7. The method according to any one of claims 1 to 6, wherein the ciphertext information is MD5, and the predetermined format file is a data file.
8. A backup device for BMC, comprising:
the device comprises a first obtaining unit and a second obtaining unit, wherein the first obtaining unit is used for obtaining first ciphertext information and second ciphertext information, the first ciphertext information is ciphertext information in a file with a preset format under a first file directory, the second ciphertext information is ciphertext information in the file with the preset format under a second file directory, the first file directory is a file directory of a configuration file of BMC, the second file directory is a file directory of a backup file of the configuration file, and the ciphertext information and configuration parameters are stored in the file with the preset format;
a modification unit, configured to modify a value of a flag in the BMC if the first ciphertext information is different from the second ciphertext information;
a first determining unit, configured to determine whether the value of the flag is modified when all of the first ciphertext information and the second ciphertext information are compared;
a first backup unit, configured to backup all the files with the predetermined format in the first file directory to the second file directory if it is determined that the value of the flag is modified.
9. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method as claimed in any of claims 1 to 7 are implemented when the computer program is executed by the processor.
CN202211214607.0A 2022-09-30 2022-09-30 Backup method and backup device for BMC (baseboard management controller) Pending CN115525479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211214607.0A CN115525479A (en) 2022-09-30 2022-09-30 Backup method and backup device for BMC (baseboard management controller)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211214607.0A CN115525479A (en) 2022-09-30 2022-09-30 Backup method and backup device for BMC (baseboard management controller)

Publications (1)

Publication Number Publication Date
CN115525479A true CN115525479A (en) 2022-12-27

Family

ID=84701695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211214607.0A Pending CN115525479A (en) 2022-09-30 2022-09-30 Backup method and backup device for BMC (baseboard management controller)

Country Status (1)

Country Link
CN (1) CN115525479A (en)

Similar Documents

Publication Publication Date Title
CN106331098B (en) Server cluster system
CN107295080B (en) Data storage method applied to distributed server cluster and server
US9348706B2 (en) Maintaining a cluster of virtual machines
CN110830283B (en) Fault detection method, device, equipment and system
CN108270726B (en) Application instance deployment method and device
CN111190747A (en) Message loss detection method and device for message queue
US11218541B2 (en) Data storage method, storage server, and storage medium and system
US11706080B2 (en) Providing dynamic serviceability for software-defined data centers
CN111008026B (en) Cluster management method, device and system
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
CN112612769A (en) File processing method, device and storage medium
CN112087516A (en) Storage upgrading method and device based on Docker virtualization technology
US20240054054A1 (en) Data Backup Method and System, and Related Device
CN112732412B (en) Service configuration file processing method and device, storage medium and electronic equipment
CN110958293B (en) File transmission method, system, server and storage medium based on cloud server
CN115525479A (en) Backup method and backup device for BMC (baseboard management controller)
CN110958287B (en) Operation object data synchronization method, device and system
CN116126457A (en) Container migration method and server cluster
EP3719599A1 (en) Network-distributed process control system and method for managing redundancy thereof
CN115145782A (en) Server switching method, mooseFS system and storage medium
CN111628880A (en) Method for transferring failure of in-hospital equipment and monitoring system
CN112994918B (en) Equipment management method and device
CN112865899B (en) Method and device for adjusting physical layer (PHY) master-slave mode
CN112564968B (en) Fault processing method, device and storage medium
CN112769889A (en) Service data pushing method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination