CN114625575A - Business system synchronization method, device, equipment and storage medium - Google Patents

Business system synchronization method, device, equipment and storage medium Download PDF

Info

Publication number
CN114625575A
CN114625575A CN202210525863.5A CN202210525863A CN114625575A CN 114625575 A CN114625575 A CN 114625575A CN 202210525863 A CN202210525863 A CN 202210525863A CN 114625575 A CN114625575 A CN 114625575A
Authority
CN
China
Prior art keywords
service system
data
initialization
standby
disk
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.)
Granted
Application number
CN202210525863.5A
Other languages
Chinese (zh)
Other versions
CN114625575B (en
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.)
Shenzhen Clerware Technology Co ltd
Original Assignee
Shenzhen Clerware 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 Shenzhen Clerware Technology Co ltd filed Critical Shenzhen Clerware Technology Co ltd
Priority to CN202210525863.5A priority Critical patent/CN114625575B/en
Publication of CN114625575A publication Critical patent/CN114625575A/en
Application granted granted Critical
Publication of CN114625575B publication Critical patent/CN114625575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/1458Management of the backup or restore process
    • G06F11/1461Backup scheduling policy
    • 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/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention belongs to the technical field of computers, and discloses a service system synchronization method, a service system synchronization device, service system synchronization equipment and a storage medium. The invention receives the system backup data of the main service system sent by the backup server; performing system initialization on the standby service system based on the system backup data; suspending system initialization when the system initialization reaches a preset stage, and acquiring disk write-in data of a main service system from a backup server; and writing the disk write-in data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system. When the standby service system is constructed, the system initialization is firstly carried out on the standby service system according to the system backup data, the system initialization is suspended when the preset stage is reached, then the disk write-in data of the main service system is synchronized to the standby service system in real time, and partial initialization is carried out in advance on the premise of ensuring that the disk write-in data can be normally synchronized, so that the initialization flow can be reduced when the main service system and the standby service system are switched, and the switching speed is accelerated.

Description

Business system synchronization method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for service system synchronization.
Background
With the popularization of informatization, the business development of many companies needs to be supported by the business system of the computer, and is increasingly important, and the continuity of the business system of the computer can directly influence the business operation of the companies in many times. In order to ensure the continuity of computer service systems, a plurality of important service systems need to be subjected to main and standby disaster recovery, namely, a plurality of sets of service systems are prepared simultaneously, at least one main service system and one standby service system are both used for providing services at ordinary times. When the main service system fails, the service is switched to the standby service system to ensure the continuity of the service. Because the main service system and the standby service system are two independent systems, in order to ensure smooth switching of the service from the main service system to the standby service system, an additional technology is needed to synchronize data on the main service system to the standby service system in real time before the main service system fails, so as to ensure that service data required by the service system is stored on the standby service system during service switching.
Different companies use different service systems, and the data synchronization means of the different service systems are different, so that developers of the service systems need to be specially customized at many times, and the service disaster tolerance cost is high and the implementation is difficult.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a service system synchronization method, a service system synchronization device, service system synchronization equipment and a service system synchronization storage medium, and aims to solve the technical problems of high disaster recovery cost and difficulty in implementation of a service system in the prior art.
In order to achieve the above object, the present invention provides a service system synchronization method, which comprises the following steps:
receiving system backup data of a main service system sent by a backup server;
performing system initialization on the standby service system based on the system backup data;
suspending system initialization when the system initialization reaches a preset stage, and acquiring disk write-in data of the main service system;
and writing the disk write-in data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system.
Optionally, before the step of suspending system initialization when the system initialization reaches a preset stage and acquiring the disk write data of the main service system, the method further includes:
monitoring an execution flow for carrying out system initialization on the standby service system in real time;
and when the execution flow reaches the state that the initialization of the system kernel structure is finished and the system volume equipment is to be mounted, judging that the initialization of the system reaches a preset stage.
Optionally, the step of suspending system initialization when the system initialization reaches a preset stage and acquiring the disk write data of the main service system includes:
when the system initialization reaches a preset stage, acquiring the operating system type of the standby service system;
determining a system pause flow according to the type of the operating system;
suspending system initialization of the standby service system according to the system suspension flow;
and when the suspension is successful, acquiring the disk write-in data of the main service system.
Optionally, the step of acquiring the disk write data of the main service system when the suspension is successful includes:
when the suspension is successful, network configuration information is obtained;
performing network configuration on the standby service system according to the network configuration information;
when the network configuration is completed, establishing network connection with the backup server;
and acquiring the disk write-in data of the main service system from the backup server based on the network connection.
Optionally, the step of obtaining the network configuration information includes:
acquiring a preset configuration storage type;
determining a configuration information reading mode according to the preset configuration storage type in a preset configuration reading and writing rule;
and reading the network configuration information based on the configuration information reading mode.
Optionally, the step of performing network configuration on the standby service system according to the network configuration information includes:
acquiring the equipment type and the operating system version of the standby service system;
acquiring a device driver corresponding to the device type, and acquiring a network component driver corresponding to the version of the operating system;
loading the device driver and the network component driver in the standby service system;
when the loading is finished, acquiring a network configuration interface corresponding to the operating system version;
and calling the network configuration interface to perform network configuration on the standby service system according to the network configuration information.
Optionally, after the step of writing the data written in the disk into the disk of the standby service system to implement real-time synchronization of the disk data of the main service system, the method further includes:
when receiving a switching preparation instruction, acquiring a waiting event of the standby service system;
according to the waiting event, an initialization thread in the standby service system is awakened, and a subsequent process of system initialization is executed;
and when the system initialization is finished, switching the access request of the main service system to the standby service system.
In addition, in order to achieve the above object, the present invention further provides a service system synchronization apparatus, where the service system synchronization apparatus includes the following modules:
the data receiving module is used for receiving system backup data of the main service system sent by the backup server;
the system initialization module is used for carrying out system initialization on the standby service system based on the system backup data;
the data acquisition module is used for suspending system initialization when the system initialization reaches a preset stage and acquiring the disk write-in data of the main service system;
and the data writing module is used for writing the disk writing data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system.
In addition, to achieve the above object, the present invention further provides a service system synchronization device, where the service system synchronization device includes: the system comprises a processor, a memory and a business system backup program which is stored on the memory and can run on the processor, wherein the business system backup program realizes the steps of the business system synchronization method when being executed by the processor.
In addition, in order to achieve the above object, the present invention further provides a computer-readable storage medium, where a service system backup program is stored on the computer-readable storage medium, and when the service system backup program is executed, the steps of the service system synchronization method described above are implemented.
The invention receives the system backup data of the main service system sent by the backup server; performing system initialization on the standby service system based on the system backup data; suspending system initialization when the system initialization reaches a preset stage, and acquiring disk write-in data of a main service system from a backup server; and writing the disk write-in data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system. When the standby service system is constructed, the system initialization is firstly carried out on the standby service system according to the system backup data, the system initialization is suspended when the preset stage is reached, then the disk write-in data of the main service system is synchronized to the standby service system, and the partial initialization is carried out on the standby service system in advance on the premise of ensuring the normal synchronization of the disk write-in data, so that the initialization flow can be reduced during the main-standby switching, and the switching speed is accelerated.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of a service system synchronization method according to the present invention;
fig. 3 is a flowchart illustrating a service system synchronization method according to a second embodiment of the present invention;
fig. 4 is a block diagram of a first embodiment of a service system synchronization apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a service system synchronization device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a business system backup program.
In the electronic apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention may be disposed in a service system synchronization device, and the electronic device calls a service system backup program stored in the memory 1005 through the processor 1001 and executes the service system synchronization method provided in the embodiment of the present invention.
An embodiment of the present invention provides a service system synchronization method, and referring to fig. 2, fig. 2 is a schematic flow diagram of a first embodiment of a service system synchronization method according to the present invention.
In this embodiment, the service system synchronization method includes the following steps:
step S10: and receiving system backup data of the main service system, which is sent by the backup server.
It should be noted that, the execution main body of this embodiment may be the service system synchronization device, and the service system synchronization device may be an electronic device such as a personal computer, a server, and the like, or may be other devices that can achieve the same or similar functions.
It should be noted that the backup server may be a server for managing backup data of the main business system. The system backup data may be complete machine backup data of a main service system at a certain time, and the complete machine backup data may include an operating system, an application program, service data of a computer, and metadata of a partition, a volume, a file system, and the like of a disk. The service system synchronization device may be a computer carrying the standby service system, or a computer connected to the standby service system and capable of controlling the standby service system. In this embodiment, the service system synchronization apparatus will be described by taking a computer equipped with a standby service system as an example. After the service system synchronization device receives the system backup data, it has a system which is the same as the main service system.
Step S20: and carrying out system initialization on the standby service system based on the system backup data.
It should be noted that some highly configured physical servers need to perform hardware initialization before starting the operating system, and this initialization process may be very long, requiring tens of minutes. If the main service system fails, the service switching is executed, the host of the standby service system is started, then the hardware initializes and starts the operating system, and the time is long, which is unacceptable for the service continuity. Because the host of the standby service system is started based on the backup data of the main service system, the operating system running on the host of the standby service system, that is, the operating system running on the host of the main service system, is the same as the software installed on the system.
Step S30: and when the system initialization reaches a preset stage, suspending the system initialization and acquiring the disk write-in data of the main service system.
It should be noted that the disk write data may be cdp (continuous data protection) data generated in the main service system after the generation time corresponding to the system backup data by the main service system.
In actual use, the main service system will continuously push the CDP data generated by the main service system to the backup server, so that the service system synchronization device can read the disk write data of the main service system from the backup server. Of course, the service system synchronization device may also be directly connected to the main service system, and then obtain the disk write data from the main service system.
It should be noted that, in general, the start-up procedure of the operating system, that is, the system initialization procedure, is generally as follows: the method comprises the steps that firstly, hardware self-checking is carried out, then a system bootstrap program on MBR is loaded and executed, the system bootstrap program is responsible for loading and operating a system bootstrap device, the system bootstrap device loads a kernel and a key driver program according to configuration, and gives an execution right of a CPU to an initialization program of the kernel, a user state process and a service system are started after the kernel is initialized, and if CDP data pushed by a backup server are received and written into a disk after the user state process is started after the kernel is initialized, the CDP data cannot be synchronized when partial data on the disk are loaded into a memory, and when corresponding data on the disk are modified subsequently, the data inconsistency can cause system abnormity, and an operating system can cause errors or crash.
In practical use, in order to avoid the problem of system crash, the system initialization needs to be stopped after the system initialization reaches a certain stage, so as to ensure that the error or crash of the operating system is avoided when the received CDP data is written into the disk. The preset stage may be determined by the behavior of the os mounting the system volume device.
Further, in order to ensure that the primary/standby service switching is performed as fast as possible when the primary service system fails, before step S30 in this embodiment, the method may further include:
monitoring an execution flow for carrying out system initialization on the standby service system in real time;
and when the execution flow reaches the state that the initialization of the system kernel structure is finished and the system volume equipment is to be mounted, judging that the initialization of the system reaches a preset stage.
It should be noted that, by analyzing and experimenting each stage of system startup, when the system initialization is completed to the initialization of the kernel structure and the system volume device is to be mounted at this stage, each important component in the operating system is initialized, such as the kernel data structure, the hardware plug and play manager, the network protocol stack, the storage protocol stack, and the like, the core function of the system kernel can already work normally, and at this time, the system volume device is not mounted, and at this time, when writing the CDP data into the disk, no system exception is caused, and the system initialization of the standby service system is suspended at this stage, so that the system initialization of the standby service system can be performed as much as possible without affecting the writing of the CDP data into the disk, so that the switching time is reduced as much as possible when the standby service is switched. Therefore, when the execution flow reaches the end of initialization of the system kernel structure and the system volume device is to be mounted, the system initialization is judged to reach the preset stage.
In actual use, the mounting behavior of the operating system on the system volume device can be monitored to determine the mounting behavior. When accessing the data of the volume device, the operating system needs to mount the volume device for accessing, so that whether the initialization of the system reaches a preset stage can be judged by monitoring the mounting operation behavior of the operating system on the volume device.
Step S40: and writing the disk write-in data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system.
It should be noted that, since the system initialization is performed on the standby service system based on the system backup data, it can be ensured that the system data and the state are consistent when the system backup data is generated by the standby service system and the main service system during the initialization, and then the disk write data is continuously received from the backup server and written into the disk of the standby service system, so that it can be ensured that the state of the standby service system is consistent with the state of the main service system at any time, thereby implementing the data synchronization with the main service system.
Further, since the whole system initialization process is not directly completed when the system initialization is performed on the standby service system, in order that the standby service system can normally take over the access request when the main service system fails, after step S40 in this embodiment, the method may further include:
when receiving a switching preparation instruction, acquiring a waiting event of the standby service system;
according to the waiting event, an initialization thread in the standby service system is awakened, and a subsequent process of system initialization is executed;
and when the system initialization is finished, switching the access request of the main service system to the standby service system.
It should be noted that the preparation switching instruction may be an instruction sent by the backup server to the service system synchronization device, or may be an instruction directly sent by another device to the service system synchronization device, for example: when the main service system fails, a manager sends a switching preparation instruction to the service system synchronization equipment through controlling the backup server, or directly sends the switching preparation instruction to the service system synchronization equipment through the management terminal.
It should be noted that the initialization thread may be a thread that performs system initialization on the standby service system, that is, the kernel of the operating system performs initialization (there may be multiple threads). The waiting event of the standby service system may be a waiting condition generated according to initialization when the system initialization of the standby service system is suspended, and for the operating system, the waiting event is a data structure, such as KEVENT of a Window kernel and wait _ queue _ head _ t of a Linux kernel.
In actual use, the standby event may be set to be a signal (a function call provided by an operating system such as a KeSetEvent, wake _ up … …, or the like), so as to wake up the initialization thread in the standby service system and resume running, thereby executing a subsequent process of performing system initialization on the standby service system, that is, a previous process in which system initialization is suspended, resulting in a process that is not executed completely.
It can be understood that the standby service system has the same data and system structure as the main service system after the system initialization is completed, and can provide the same service function as the main service system, so that the access request of the main service system can be directly switched to the standby service system, thereby realizing the switching of the main service and the standby service. In order to switch the access request of the main service system to the standby service system, only the service IP address of the main service system needs to be deleted, and the service IP address is configured to the standby service system.
The embodiment receives system backup data of a main service system sent by a backup server; performing system initialization on the standby service system based on the system backup data; suspending system initialization when the system initialization reaches a preset stage, and acquiring disk write-in data of a main service system from a backup server; and writing the disk write-in data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system. The backup service system is initialized according to the system backup data when the backup service system is constructed, and is suspended when the preset stage is reached, and then the disk write-in data of the main service system is synchronized to the backup service system.
Referring to fig. 3, fig. 3 is a flowchart illustrating a service system synchronization method according to a second embodiment of the present invention.
Based on the first embodiment, the step S30 of the service system synchronization method in this embodiment includes:
step S301: and when the system initialization reaches a preset stage, acquiring the operating system type of the standby service system.
It should be noted that the type of the operating system may be a type of an operating system installed in the standby service system (of course, the type of the operating system in the main service system may also be used), for example: windows or linux, etc.
In actual use, the operating system type of the standby service system can be determined by identifying the system kernel of the standby service system.
Step S302: and determining a system pause flow according to the type of the operating system.
It should be noted that the manner in which the operating systems of different operating system types are used to mount the system volume device may be different, and therefore, the initialization of the system needs to be suspended in a different manner.
For example: some operating systems notify the file system to execute the volume mount operation through an IOControlCode (an interactive mode of input and output control codes, application programs and operating system kernel modules), in this case, the behavior of the volume mount operation can be captured through a file system filter driver, and when the behavior occurs, the execution of a KeWaitForSingleObject and wait _ event _ interrupt series function is called to block the execution of the thread, so that the suspension of the system initialization is realized. Some operating systems mount volume devices through system calls, and can capture the behavior of the system mounting volume devices through the HOOK technology, and call series functions of kewaitforsingleibject and wait _ event _ interrupt to block the execution of threads (if a plurality of threads perform mounting operation, all threads are blocked one by one) so as to achieve the purpose of suspending the initialization of the system.
In actual use, a type flow mapping table may be pre-constructed, and system suspension flows corresponding to different operating system types are stored through the type flow mapping table, and then determining a system suspension flow according to an operating system type may be to search for a corresponding system suspension flow in the type flow mapping table according to the operating system type. The system pause process may be an operation process that needs to be executed to pause the system initialization.
Step S303: and suspending the system initialization of the standby service system according to the system suspension process.
It should be noted that, the suspending system initialization of the standby service system according to the system suspension flow is to capture the behavior of the system mount volume device through a file system filter driver or a HOOK system call, and then call a kewaitforsingleigleobject and wait _ event _ interrupt series function to block the execution of the system initialization thread, thereby achieving the purpose of suspending system initialization.
Step S304: and acquiring the disk write data of the main service system when the suspension is successful.
It can be understood that, when the initialization of the backup service system is suspended successfully, the service system synchronization device may initiate a request to the backup server, establish a connection with the backup server, and then read the disk write data of the main service system from the backup server according to the established connection, or receive the disk write data of the main service system pushed by the backup server according to the established connection. Of course, the disk write data may also be directly obtained from the main service system.
Further, since the operating system in the standby service system is in the initialization stage and many network communication modules of the system are not initialized yet, it may not be able to establish a connection with the backup server, and in order to ensure that the disk write data of the main service system can be normally acquired from the backup server, the step S304 in this embodiment may include:
when the suspension is successful, network configuration information is obtained;
performing network configuration on the standby service system according to the network configuration information;
when the network configuration is completed, establishing network connection with the backup server;
and acquiring the disk write-in data of the main service system from the backup server based on the network connection.
It should be noted that the network configuration information may be related data for configuring the network communication module. The network configuration data may be transmitted to the service system synchronization device by the backup server when transmitting the system backup data of the main service system, and the network configuration data may include data such as an IP address, a subnet mask, and an IP address of the backup server.
It can be understood that after the network configuration is completed, the backup service system has the capability of performing network communication to the outside, and therefore, a communication request can be initiated to the backup server, so as to establish network connection with the backup server, and then data interaction can be normally performed with the backup server according to the network connection, so as to read the disk write-in data of the main service system from the backup server, or receive the disk write-in data of the main service system pushed by the backup server.
Further, because the system initialization of the standby service system is not completed, and at this time, the system volume device in the standby service system is not mounted, and cannot directly read the network configuration information from the system volume device through the file system, that is, cannot read the network configuration information through the existing file read-write interface, but to ensure that the network configuration information can be obtained, when the network configuration information is stored in the standby service system, an unconventional means is used for storing, and correspondingly, when the network configuration information is obtained, a corresponding reading manner is also required to be used for reading, so the step of obtaining the network configuration information in this embodiment may include:
acquiring a preset configuration storage type;
determining a configuration information reading mode according to the preset configuration storage type in a preset configuration reading and writing rule;
and reading the network configuration information based on the configuration information reading mode.
It should be noted that the preset configuration storage type may be set by a manager of the service system synchronization device in advance according to actual needs, the preset configuration read-write rule may be a rule storing reading modes corresponding to various configuration storage types, a corresponding configuration information reading mode is searched for in the preset configuration read-write rule according to the preset configuration storage type, and then network configuration information is read according to the configuration information reading mode.
In practical use, different configuration storage types in the preset configuration read-write rule may correspond to different configuration information reading modes, for example:
A. when the network configuration information is stored, the configuration information is stored to a specific position by using the existing file read-write interface, such as C: \ network.cfg and/etc/network.cfg, all disks on a system are scanned when the system is initialized, partitions are activated according to partition tables of the disks, then the disk partitions are assembled into rolling equipment, codes are written to analyze file systems of all the rolling equipment, the distribution positions of the configuration files on the disks are obtained, and then the content in the configuration files is read by a method of directly reading the disks, so that the acquisition of the network configuration information is completed.
B. Some systems have initramfs (initram file system), and provide an environment of a simple file read-write interface at the early stage of system startup, so that configuration information in the system can be read through the existing file read-write interface. Therefore, the network configuration information can be stored in initramfs, which is specifically implemented by decompressing initrd.img corresponding to initramfs into a specific directory, then writing the configuration information into a file specific to the directory, and then compressing the directory into the original initrd.img. After the system is started and initrd.img is loaded into the memory, the configuration file can exist in initramfs, and the content of the configuration file can be read through a standard file read-write interface to complete the acquisition of network configuration information.
C. Windows registry profiles may hold configuration information and the configuration may be read at system initialization. The registry configuration file of the standby service system can be loaded, and the network configuration information is written into a specific position of the registry. After the system is initialized, the registry can be read through the registry read-write interface to obtain the network configuration information.
D. A part of space is reserved in a disk of the standby service system (a method of compressing a volume device or a method of pre-allocating a part of space in a volume device through a file system), then network configuration information is written into the reserved space, and the offset of the disk space is used as a starting parameter of the kernel main and standby disaster recovery modules. When the operating system is initialized, the contents in the configuration file can be read by directly reading the disk, and the acquisition of the network configuration information is completed.
Further, since the operating system is in the initialization stage, many network communication modules of the system are not initialized (for example, a network card driver may not be loaded, a TCP/IP protocol stack has not created a device object, and an interface layer module driver is not loaded), and network configuration cannot be directly performed (configuration failure or system deadlock may be caused), before configuring a network, it is necessary to trigger all components depending on network configuration and network communication to complete initialization in advance by an additional means, and therefore, the step of performing network configuration on the standby service system according to the network configuration information in this embodiment may include:
acquiring the equipment type and the operating system version of the standby service system;
acquiring a device driver corresponding to the device type, and acquiring a network component driver corresponding to the operating system version;
loading the device driver and the network component driver in the standby service system;
when the loading is finished, acquiring a network configuration interface corresponding to the operating system version;
and calling the network configuration interface to perform network configuration on the standby service system according to the network configuration information.
It should be noted that, the network card drivers used by different devices and different operating systems may be different, the drivers of components depending on network communication of different versions of operating systems may also be different, and corresponding network configuration methods are also different. Therefore, the device type and the operating system version of the network card on the host of the standby service system can be obtained, and then the corresponding network card driving program is obtained according to the device type and the operating system version and loaded into the operating system. And then acquiring the driver of the component depending on the network communication according to the version of the operating system, and loading the driver into the system. In actual use, a network component mapping table may be pre-constructed, a component driver list (which may depend on many component drivers and has a dependent sequence) depending on different operating system type network communications is stored through the network component mapping table, and then the component drivers depending on the system network communications may be determined according to the operating system types and loaded into the system according to the dependent sequence.
In actual use, the security component such as firewall of the operating system may be turned off according to the version of the operating system, and the virtual interface (such as the aggregation network port … …) of the operating system may be disabled, so as to avoid affecting the configuration of the network and the communication of the network.
It can be understood that the interfaces used when configuring the network may be different for different operating system versions, for example, the IOControlCode for some network configurations only exists in the system of the lower version, the higher version is no longer supported, and other iocontrolcodes need to be used to complete the configuration operation. Therefore, the corresponding network configuration interface can be determined according to the version of the operating system, and then the network configuration interface is called to perform network configuration on the standby service system according to the network configuration information, such as activating a network card device, configuring an IP address, configuring a subnet mask and the like.
In the embodiment, when the system initialization reaches a preset stage, the operating system type of the standby service system is acquired; determining a system pause flow according to the type of the operating system; suspending system initialization of the standby service system according to the system suspension flow; and acquiring the disk write data of the main service system when the suspension is successful. The method for synchronizing the service system of the invention can be applied to different service systems and improves the universality of the method for synchronizing the data of the service system of the invention because the initialization behavior of the system is suspended at the early stage of the system initialization and then all the disk write data of the main service system are synchronized to the standby service system in real time, thereby realizing the synchronization of the service data without concerning the behavior of service software on the system.
In addition, an embodiment of the present invention further provides a storage medium, where a service system backup program is stored on the storage medium, and the service system backup program, when executed by a processor, implements the steps of the service system synchronization method described above.
Referring to fig. 4, fig. 4 is a block diagram illustrating a first embodiment of a service system synchronization apparatus according to the present invention.
As shown in fig. 4, a service system synchronization apparatus provided in the embodiment of the present invention includes:
a data receiving module 10, configured to receive system backup data of a main service system sent by a backup server;
a system initialization module 20, configured to perform system initialization on the standby service system based on the system backup data;
the data acquisition module 30 is configured to suspend system initialization when the system initialization reaches a preset stage, and acquire disk write data of the main service system;
and the data writing module 40 is configured to write the disk write data into the disk of the standby service system, so as to implement real-time synchronization on the disk data of the main service system.
The embodiment receives system backup data of a main service system sent by a backup server; performing system initialization on the standby service system based on the system backup data; suspending system initialization when the system initialization reaches a preset stage, and acquiring disk write-in data of a main service system from a backup server; and writing the disk write-in data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system. The backup service system is initialized according to the system backup data when the backup service system is constructed, and is suspended when the preset stage is reached, and then the disk write-in data of the main service system is synchronized to the backup service system.
Further, the data obtaining module 30 is further configured to monitor an execution process of performing system initialization on the standby service system in real time; and when the execution flow reaches the state that the initialization of the system kernel structure is finished and the system volume equipment is to be mounted, judging that the initialization of the system reaches a preset stage.
Further, the data obtaining module 30 is further configured to obtain an operating system type of the standby service system when system initialization reaches a preset stage; determining a system pause flow according to the type of the operating system; suspending system initialization of the standby service system according to the system suspension flow; and acquiring the disk write data of the main service system when the suspension is successful.
Further, the data obtaining module 30 is further configured to obtain network configuration information when the suspension is successful; performing network configuration on the standby service system according to the network configuration information; when the network configuration is completed, establishing network connection with the backup server; and acquiring the disk write-in data of the main service system from the backup server based on the network connection.
Further, the data obtaining module 30 is further configured to obtain a preset configuration storage type; determining a configuration information reading mode according to the preset configuration storage type in a preset configuration reading and writing rule; and reading the network configuration information based on the configuration information reading mode.
Further, the data obtaining module 30 is further configured to obtain a device type and an operating system version of the standby service system; acquiring a device driver corresponding to the device type, and acquiring a network component driver corresponding to the operating system version; loading the device driver and the network component driver in the standby service system; when the loading is finished, acquiring a network configuration interface corresponding to the operating system version; and calling the network configuration interface to perform network configuration on the standby service system according to the network configuration information.
Further, the data writing module 40 is further configured to obtain a waiting event of the standby service system when a standby switching instruction is received; awakening an initialization thread in the standby service system according to the waiting event, and executing a subsequent process of system initialization; and when the system initialization is finished, switching the access request of the main service system to the standby service system.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the service system synchronization method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several 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 invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A service system synchronization method is characterized in that the service system synchronization method comprises the following steps:
receiving system backup data of a main service system sent by a backup server;
performing system initialization on the standby service system based on the system backup data;
suspending system initialization when the system initialization reaches a preset stage, and acquiring disk write-in data of the main service system;
and writing the disk write-in data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system.
2. The service system synchronization method according to claim 1, wherein before the step of suspending the system initialization when the system initialization reaches a preset stage and acquiring the disk write data of the main service system, the method further comprises:
monitoring an execution flow for carrying out system initialization on the standby service system in real time;
and when the execution flow reaches the state that the initialization of the system kernel structure is finished and the system volume equipment is to be mounted, judging that the initialization of the system reaches a preset stage.
3. The service system synchronization method according to claim 1, wherein the step of suspending the system initialization when the system initialization reaches a preset stage and acquiring the disk write data of the main service system comprises:
when the system initialization reaches a preset stage, acquiring the operating system type of the standby service system;
determining a system pause flow according to the type of the operating system;
suspending system initialization of the standby service system according to the system suspension flow;
and acquiring the disk write data of the main service system when the suspension is successful.
4. The service system synchronization method according to claim 3, wherein the step of acquiring the disk write data of the main service system when the suspension is successful comprises:
when the suspension is successful, network configuration information is obtained;
performing network configuration on the standby service system according to the network configuration information;
when the network configuration is completed, establishing network connection with the backup server;
and acquiring the disk write-in data of the main service system from the backup server based on the network connection.
5. The service system synchronization method of claim 3, wherein the step of obtaining the network configuration information comprises:
acquiring a preset configuration storage type;
determining a configuration information reading mode according to the preset configuration storage type in a preset configuration reading and writing rule;
and reading the network configuration information based on the configuration information reading mode.
6. The service system synchronization method according to claim 4, wherein the step of performing network configuration on the standby service system according to the network configuration information comprises:
acquiring the equipment type and the operating system version of the standby service system;
acquiring a device driver corresponding to the device type, and acquiring a network component driver corresponding to the operating system version;
loading the device driver and the network component driver in the standby service system;
when the loading is finished, acquiring a network configuration interface corresponding to the operating system version;
and calling the network configuration interface to perform network configuration on the standby service system according to the network configuration information.
7. The service system synchronization method according to any one of claims 1 to 6, wherein after the step of writing the disk write data into the disk of the standby service system to implement real-time synchronization of the disk data of the main service system, the method further comprises:
when receiving a switching preparation instruction, acquiring a waiting event of the standby service system;
awakening an initialization thread in the standby service system according to the waiting event, and executing a subsequent process of system initialization;
and when the system initialization is finished, switching the access request of the main service system to the standby service system.
8. A service system synchronization apparatus, characterized in that the service system synchronization apparatus comprises the following modules:
the data receiving module is used for receiving system backup data of the main service system sent by the backup server;
the system initialization module is used for carrying out system initialization on the standby service system based on the system backup data;
the data acquisition module is used for suspending system initialization when the system initialization reaches a preset stage and acquiring the disk write-in data of the main service system;
and the data writing module is used for writing the disk writing data into the disk of the standby service system so as to realize real-time synchronization of the disk data of the main service system.
9. A service system synchronization device, characterized in that the service system synchronization device comprises: processor, memory and a business system backup program stored on said memory and executable on said processor, said business system backup program when executed by the processor implementing the steps of the business system synchronization method according to any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a business system backup program, which when executed implements the steps of the business system synchronization method according to any one of claims 1 to 7.
CN202210525863.5A 2022-05-16 2022-05-16 Business system synchronization method, device, equipment and storage medium Active CN114625575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210525863.5A CN114625575B (en) 2022-05-16 2022-05-16 Business system synchronization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210525863.5A CN114625575B (en) 2022-05-16 2022-05-16 Business system synchronization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114625575A true CN114625575A (en) 2022-06-14
CN114625575B CN114625575B (en) 2022-08-02

Family

ID=81907157

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210525863.5A Active CN114625575B (en) 2022-05-16 2022-05-16 Business system synchronization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114625575B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112313A (en) * 2023-10-23 2023-11-24 深圳市科力锐科技有限公司 Service disaster tolerance switching method, device, equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006092055A (en) * 2004-09-22 2006-04-06 Hitachi Ltd Computer system
CN101247573A (en) * 2007-02-16 2008-08-20 大唐移动通信设备有限公司 Clock and on-condition maintenance monitoring panel and master-slave switching method
US20130167159A1 (en) * 2010-10-01 2013-06-27 Flextronics Ap, Llc Vehicle comprising multi-operating system
US20130346369A1 (en) * 2012-06-22 2013-12-26 Fujitsu Limited Information processing device with memory dump function, memory dump method, and recording medium
CN103500130A (en) * 2013-09-11 2014-01-08 上海爱数软件有限公司 Method for backing up dual-computer hot standby data in real time
CN104156281A (en) * 2014-08-15 2014-11-19 福建星网视易信息系统有限公司 Method and system for starting disk backups in embedded system
CN104407940A (en) * 2014-11-26 2015-03-11 上海爱数软件有限公司 Method for quickly recovering CDP system
CN108255643A (en) * 2017-12-25 2018-07-06 南京壹进制信息技术股份有限公司 A kind of continuous data protection method of no agency
US20190129741A1 (en) * 2017-10-31 2019-05-02 Nicira, Inc. Host-based virtual machine introspection with dynamic guest assistance
CN110209530A (en) * 2019-05-09 2019-09-06 上海爱数信息技术股份有限公司 A kind of efficient method and system for restoring CDP system I/O data
CN112596951A (en) * 2020-12-24 2021-04-02 深圳市科力锐科技有限公司 NAS data disaster tolerance method, device, equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006092055A (en) * 2004-09-22 2006-04-06 Hitachi Ltd Computer system
CN101247573A (en) * 2007-02-16 2008-08-20 大唐移动通信设备有限公司 Clock and on-condition maintenance monitoring panel and master-slave switching method
US20130167159A1 (en) * 2010-10-01 2013-06-27 Flextronics Ap, Llc Vehicle comprising multi-operating system
US20130346369A1 (en) * 2012-06-22 2013-12-26 Fujitsu Limited Information processing device with memory dump function, memory dump method, and recording medium
CN103500130A (en) * 2013-09-11 2014-01-08 上海爱数软件有限公司 Method for backing up dual-computer hot standby data in real time
CN104156281A (en) * 2014-08-15 2014-11-19 福建星网视易信息系统有限公司 Method and system for starting disk backups in embedded system
CN104407940A (en) * 2014-11-26 2015-03-11 上海爱数软件有限公司 Method for quickly recovering CDP system
US20190129741A1 (en) * 2017-10-31 2019-05-02 Nicira, Inc. Host-based virtual machine introspection with dynamic guest assistance
CN108255643A (en) * 2017-12-25 2018-07-06 南京壹进制信息技术股份有限公司 A kind of continuous data protection method of no agency
CN110209530A (en) * 2019-05-09 2019-09-06 上海爱数信息技术股份有限公司 A kind of efficient method and system for restoring CDP system I/O data
CN112596951A (en) * 2020-12-24 2021-04-02 深圳市科力锐科技有限公司 NAS data disaster tolerance method, device, equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
MPSAN: "Stop Windows 1909 from Trying to Initialize / mount DRIVE", 《HTTPS://WWW.TENFORUMS.COM/DRIVERS-HARDWARE/151620-STOP-WINDOWS-1909-TRYING-INITIALIZE-MOUNT-DRIVE-2.HTML》 *
Z. ZHANG等: "Analysis of data fragments in deduplication system", 《2012 INTERNATIONAL CONFERENCE ON SYSTEM SCIENCE AND ENGINEERING (ICSSE)》 *
魏峰等: "异构云计算平台业务迁移", 《物联网学报》 *
黄成刚: "监控组态软件中数据管理子系统的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112313A (en) * 2023-10-23 2023-11-24 深圳市科力锐科技有限公司 Service disaster tolerance switching method, device, equipment and storage medium
CN117112313B (en) * 2023-10-23 2024-02-13 深圳市科力锐科技有限公司 Service disaster tolerance switching method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114625575B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
KR100620216B1 (en) Network Enhanced BIOS Enabling Remote Management of a Computer Without a Functioning Operating System
EP2483799B1 (en) Portable desktop device and method of host computer system hardware recognition and configuration
CN109542744B (en) Method, device, storage medium and terminal for detecting abnormal starting problem of terminal
US9912535B2 (en) System and method of performing high availability configuration and validation of virtual desktop infrastructure (VDI)
JP4359609B2 (en) Computer system, system software update method, and first server device
US7900034B2 (en) Booting software partition with network file system
US20050193261A1 (en) Configuration proxy service for the extended firmware interface environment
CN111669284B (en) OpenStack automatic deployment method, electronic device, storage medium and system
US20120089875A1 (en) Multi-user test framework
CN109725950B (en) Method, device and storage medium for realizing single-instance operation of client
CN114625575B (en) Business system synchronization method, device, equipment and storage medium
CN112256393A (en) Resource management method and equipment for bare metal server
CN115203054A (en) Virtual chip test system
CN111078305A (en) Information acquisition method and device, server and information management system
CN114995888A (en) Intelligent network card deployment method, device and medium
EP2372565A1 (en) Method for managing USB devices
CN112416394B (en) Service upgrading method and device, storage medium and electronic equipment
CN114020340A (en) Server system and data processing method thereof
CN111209125B (en) Multi-process command line implementation method
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
CN109495298B (en) Method and device for managing nodes in OpenStack system
CN106972963B (en) Service module starting control method and starting control method after crash restart
US7350065B2 (en) Method, apparatus and program storage device for providing a remote power reset at a remote server through a network connection
EP1645969B1 (en) Remote configuration management for data processing units
CN113660988A (en) Data processing method, device, system, equipment and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant