A kvm automatic emergency recovery method and device based on continuous data protection technology

CN115562800BActive Publication Date: 2026-06-23ZHUHAI XINHE DATA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI XINHE DATA TECH CO LTD
Filing Date
2022-08-30
Publication Date
2026-06-23

Smart Images

  • Figure CN115562800B_ABST
    Figure CN115562800B_ABST
Patent Text Reader

Abstract

The application discloses a KVM automatic emergency recovery method based on a continuous data protection technology, a backup module performs continuous data protection on a source host, generates a backup snapshot point at a historical moment, and uniformly manages the backup snapshot point; a trigger module detects the latest backup snapshot point, creates / updates an emergency hot backup virtual machine based on an emergency pre-configuration template, and the virtual machine is in a shutdown standby takeover state; a listening module detects whether a source host business application and network connectivity with the source host exist faults or abnormities; and an emergency starting module performs a starting operation on the emergency hot backup virtual machine, provides services outwardly, takes over the source host business, and the like, wherein the application sets corresponding emergency virtual machine configuration information according to source host parameters for backup protection by pre-setting an emergency pre-configuration template, can shorten an emergency recovery configuration time if a fault occurs, simplifies an emergency recovery operation process, shortens a business interruption time, and guarantees continuous business operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data backup and recovery technology, specifically to a KVM automatic emergency recovery method and device based on continuous data protection technology. Background Technology

[0002] With the widespread use of computers, the advancement of information technology, and the rapid development of the economy, a large amount of important data is generated in enterprise production environments. This data is the lifeblood of a company, and its loss or damage will cause huge losses. Data backup and recovery is the last resort to protect data. At present, various industries have gradually attached importance to the backup construction of business systems to ensure that important data can be recovered and used in the event of a disaster. Continuous Data Protection (CDP) is one of the ways to achieve backup. It can continuously capture or track any changes that occur to the target data and provide the ability to restore to any previous point in time.

[0003] However, while enterprises emphasize backups, they are also increasingly concerned about business continuity. In the event of business host hardware failures, system crashes, ransomware attacks, or data loss, emergency recovery using historical snapshots generated by continuous data protection is often limited by various factors such as the preparation of the target recovery environment, the proficiency of the recovery operators, recovery parameters, and network configuration. This results in cumbersome and time-consuming recovery procedures, causing prolonged business interruptions, impacting business operations, and incurring significant losses. Therefore, how to simplify emergency recovery operations and shorten business interruption time to ensure business continuity has become the primary problem that this invention needs to solve. Summary of the Invention

[0004] This invention provides a KVM automatic emergency recovery method and apparatus based on continuous data protection technology, which can effectively solve the problems mentioned in the background art. The traditional recovery process is often limited by various factors such as the preparation of the recovery target environment, the proficiency of the recovery operators, recovery parameters and network configuration, resulting in cumbersome recovery operation steps, low efficiency, long time consumption, long-term business interruption, affecting business operation and causing huge losses.

[0005] To achieve the above objectives, the present invention provides the following technical solution: an automatic emergency recovery method for KVM based on continuous data protection technology. Based on the latest historical backup points, an emergency hot standby virtual machine is created on the KVM virtualization platform that can be ready to take over services at any time. When the source host encounters an anomaly, failure, or downtime, the emergency hot standby virtual machine can be automatically and quickly started to take over the services from the source host, shortening the service interruption time and ensuring continuous service availability.

[0006] This automated emergency recovery method includes the following steps:

[0007] S1. The backup module continuously protects the source host, generates backup snapshots of historical moments, and manages the backup snapshots in a unified manner.

[0008] S2. Based on the source host parameters, set the emergency pre-configuration template for the emergency virtual machine.

[0009] S3. The trigger module detects the latest backup snapshot point and creates / updates the emergency hot standby virtual machine configuration file based on the emergency pre-configuration template. This virtual machine is in a shutdown and standby takeover state.

[0010] S4. The monitoring module detects whether there are any errors or abnormalities in the source host's business applications and network connectivity with the source host. If no abnormalities are found, it continues to monitor. If an abnormality is detected, it notifies the emergency start module.

[0011] S5, the emergency startup module performs a power-on operation on the emergency hot standby virtual machine, provides services to the outside world, and takes over the source host's business.

[0012] According to the above technical solution, step S1 includes the following specific implementation steps:

[0013] S11. Add backup protection to the source host and set up a backup task schedule;

[0014] S12. Regularly and continuously create backup snapshot points for the source host according to the backup task plan;

[0015] S13. Place the newly created snapshot point into the backup snapshot management pool and record the snapshot point's SAPID and SANPID as unique attributes to identify the snapshot, and compare the value of the SANPID to find the latest snapshot point.

[0016] According to the above technical solution, in S2, the emergency pre-configuration template refers to a set of emergency virtual machine configuration information that is pre-set with reference to the parameters of the source host, and records the attribute parameters of creating the emergency virtual machine in the database, specifically including: target emergency virtualization platform, virtual machine CPU, running memory, network card configuration, controller type and boot method;

[0017] This emergency pre-configuration template will be used to pre-save the configuration information of virtual machines created in the emergency virtualization platform that are consistent with the source host, so as to ensure that emergency virtual machines can be quickly created during emergency recovery, and that the created emergency virtual machines can correctly replace the source host to take over the business.

[0018] According to the above technical solution, step S3 includes the following specific implementation steps:

[0019] S31. The trigger module detects the newly created backup snapshot point based on the snapshot point's SNPID;

[0020] S32. Determine whether an emergency hot standby virtual machine has been created. If no emergency hot standby virtual machine has been created, proceed to step S33. If an emergency hot standby virtual machine has been created, proceed to step S34.

[0021] S33. Based on the emergency pre-configuration template and the latest backup snapshot point, create an emergency hot standby virtual machine in the KVM emergency virtualization platform. The emergency pre-configuration template provides the configuration file of the emergency virtual machine. The snapshot point restores the rbd disk of the source host at this moment. Write the rbd disk ID into the configuration file of the emergency virtual machine and mark the snapshot timestamp corresponding to this emergency virtual machine. Put this virtual machine into a shutdown state.

[0022] S34. Activate the latest snapshot and update the configuration file of the created emergency hot standby virtual machine, including loading the disk information in the emergency hot standby virtual machine configuration file with the rbd disk ID provided by the latest snapshot, and updating the snapshot timestamp corresponding to the emergency hot standby virtual machine.

[0023] According to the above technical solution, step S4 includes the following specific implementation steps:

[0024] S41. The listening module sends a "network connectivity" request to the source host at fixed intervals and calls the API of the source host's business application to obtain the service status of the application.

[0025] S42. If the monitoring module detects that the network connectivity with the source host is normal and the service status of the source host's business application is normal, indicating that the source host is "online", then continue to execute S41. If no network connectivity response is received from the source host after the timeout, or if the source host's business application service is found to be abnormal, then execute S43.

[0026] S43. The monitoring module sends a notification to the emergency virtualization platform to start the emergency hot standby virtual machine created in step S32.

[0027] An automated emergency recovery device for KVM based on continuous data protection technology includes a backup module, a trigger module, an emergency virtualization platform, a monitoring module, and an emergency startup module.

[0028] According to the above technical solution, the backup module refers to installing a backup agent tool on the source host to achieve continuous data protection of the source host. It can generate backup snapshots of the source host at historical moments. Based on the backup snapshots, it provides the ability to restore the source host to the state at that point in time. At the same time, it can maintain communication with the monitoring module to provide feedback on the operating status of the source host.

[0029] According to the above technical solution, the triggering module is mainly used to detect the latest backup snapshot point. If the latest backup snapshot point is generated, it triggers the creation / update of an emergency hot standby virtual machine based on the emergency pre-configuration template.

[0030] According to the above technical solution, the emergency virtualization platform refers to providing emergency resources and creating emergency hot standby virtual machines on the emergency virtualization platform. These virtual machines are the latest historical state that has been backed up from the source host and can replace the source host to take over the business at any time.

[0031] According to the above technical solution, the monitoring module is mainly used to detect the running status of the source host's business application services and the network connectivity with the source host. When an anomaly is detected, the emergency startup module is notified.

[0032] The emergency startup module is mainly used to control the startup status of the emergency hot standby virtual machine. When the source host is running normally, the emergency hot standby virtual machine is in standby shutdown state. When the source host's business application is abnormal or offline, the emergency hot standby virtual machine is automatically started.

[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0034] 1. This invention, based on the latest historical backup points, creates an emergency hot standby virtual machine on the KVM virtualization platform that can be ready to take over services at any time. When the source host encounters anomalies, failures, or downtime, the emergency hot standby virtual machine can be automatically and quickly started to take over the service from the source host. This avoids the use of traditional time-consuming recovery processes after a failure, greatly shortens the service interruption time, and ensures continuous service availability. By pre-setting an emergency pre-configuration template, the corresponding emergency virtual machine configuration information is set according to the parameters of the source host being backed up and protected. If a failure occurs, the emergency recovery configuration time can be shortened, simplifying the emergency recovery operation process, reducing the service interruption time, and ensuring continuous service.

[0035] 2. An emergency hot standby virtual machine is automatically generated based on the latest backup point. This hot standby virtual machine is completely identical to the source production host at the snapshot point, but it is in a shutdown and standby state and can be started and used at any time, further shortening the recovery time. The backup agent tool will monitor the status of the source host in real time. When the network connectivity of the source production host is abnormal, or the connection fails to time out, or the running status of the source host's business application services is abnormal, the emergency hot standby virtual machine will be automatically started to speed up the emergency response. It can quickly take over business applications and ensure the high timeliness of business continuity, solving the problems of low efficiency, long business interruption time, and inability to guarantee business continuity in traditional recovery processes. Attached Figure Description

[0036] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0037] In the attached diagram:

[0038] Figure 1This is a flowchart of the automated emergency recovery method of the present invention;

[0039] Figure 2 This is a schematic diagram of the structure of the automated emergency recovery device of the present invention. Detailed Implementation

[0040] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0041] Example 1: As Figure 1 As shown, the present invention provides a technical solution, a KVM automatic emergency recovery method based on continuous data protection technology. Based on the latest historical backup point, an emergency hot standby virtual machine is created on the KVM virtualization platform that can be ready to take over services at any time. When the source host encounters an anomaly, failure, or downtime, the emergency hot standby virtual machine can be automatically and quickly started to take over the service from the source host, shorten the service interruption time, and ensure the continuous availability of services.

[0042] This automated emergency recovery method includes the following steps:

[0043] S1. The backup module continuously protects the source host, generates backup snapshots of historical moments, and manages the backup snapshots in a unified manner.

[0044] S2. Based on the source host parameters, set the emergency pre-configuration template for the emergency virtual machine.

[0045] S3. The trigger module detects the latest backup snapshot point and creates / updates an emergency hot standby virtual machine based on the emergency pre-configuration template. This virtual machine is in a shutdown and standby takeover state.

[0046] S4. When the monitoring module detects that there are no errors or anomalies in the source host's business application and that the network is normally connected, it continues to monitor.

[0047] Based on the above technical solution, S1 includes the following specific implementation steps:

[0048] S11. Add backup protection to the source host and set up a backup task schedule;

[0049] S12. Regularly and continuously create backup snapshot points for the source host according to the backup task plan;

[0050] S13. Place the newly created snapshot point into the backup snapshot management pool and record the snapshot point's SAPID and SANPID as unique attributes to identify the snapshot, and compare the value of the SANPID to find the latest snapshot point.

[0051] Based on the above technical solution, in S2, the emergency pre-configuration template refers to a set of emergency virtual machine configuration information that is pre-set with reference to the parameters of the source host, and records the attribute parameters of creating the emergency virtual machine in the database, specifically including: target emergency virtualization platform, virtual machine CPU, running memory, network card configuration, controller type and boot method;

[0052] This emergency pre-configuration template will be used to pre-save the configuration information of virtual machines created in the emergency virtualization platform that are consistent with the source host, so as to ensure that emergency virtual machines can be quickly created during emergency recovery, and that the created emergency virtual machines can correctly replace the source host to take over the business.

[0053] Based on the above technical solution, S3 includes the following specific implementation steps:

[0054] S31. The trigger module detects the newly created backup snapshot point based on the snapshot point's SNPID;

[0055] S32. If no emergency hot standby virtual machine has been created, proceed to step S33.

[0056] S33. Based on the emergency pre-configuration template and the latest backup snapshot point, create an emergency hot standby virtual machine in the KVM emergency virtualization platform. The emergency pre-configuration template provides the configuration file for the emergency virtual machine. The snapshot point restores the rbd disk of the source host at this moment. Write the rbd disk ID into the configuration file of the emergency virtual machine and mark the snapshot timestamp corresponding to this emergency virtual machine. Then put this virtual machine into a shutdown state.

[0057] Based on the above technical solution, S4 includes the following specific implementation steps:

[0058] S41. The listening module sends a "network connectivity" request to the source host at fixed intervals and calls the API of the source host's business application to obtain the application service status.

[0059] S42. If the monitoring module detects that the network connectivity with the source host is normal and the service status of the source host's business applications is normal, indicating that the source host is "online", then continue to execute S41.

[0060] Example 2: As Figure 1 As shown, the present invention provides a technical solution, a KVM automatic emergency recovery method based on continuous data protection technology. Based on the latest historical backup point, an emergency hot standby virtual machine is created on the KVM virtualization platform that can be ready to take over services at any time. When the source host encounters an anomaly, failure, or downtime, the emergency hot standby virtual machine can be automatically and quickly started to take over the service from the source host, shorten the service interruption time, and ensure the continuous availability of services.

[0061] This automated emergency recovery method includes the following steps:

[0062] S1. The backup module continuously protects the source host, generates backup snapshots of historical moments, and manages the backup snapshots in a unified manner.

[0063] S2. Based on the source host parameters, set the emergency pre-configuration template for the emergency virtual machine.

[0064] S3. The trigger module detects the latest backup snapshot point and creates / updates an emergency hot standby virtual machine based on the emergency pre-configuration template. This virtual machine is in a shutdown and standby takeover state.

[0065] S4. If the monitoring module does not receive a network connectivity response from the source host within a timeout period, or if it detects an anomaly in the source host's business application service, it will notify the emergency startup module.

[0066] S5, the emergency startup module performs a power-on operation on the emergency hot standby virtual machine, provides services to the outside world, and takes over the source host's business.

[0067] Based on the above technical solution, S1 includes the following specific implementation steps:

[0068] S11. Add backup protection to the source host and set up a backup task schedule;

[0069] S12. Regularly and continuously create backup snapshot points for the source host according to the backup task plan;

[0070] S13. Place the newly created snapshot point into the backup snapshot management pool and record the snapshot point's SAPID and SANPID as unique attributes to identify the snapshot, and compare the value of the SANPID to find the latest snapshot point.

[0071] Based on the above technical solution, in S2, the emergency pre-configuration template refers to a set of emergency virtual machine configuration information that is pre-set with reference to the parameters of the source host, and records the attribute parameters of creating the emergency virtual machine in the database, specifically including: target emergency virtualization platform, virtual machine CPU, running memory, network card configuration, controller type and boot method;

[0072] This emergency pre-configuration template will be used to pre-save the configuration information of virtual machines created in the emergency virtualization platform that are consistent with the source host, so as to ensure that emergency virtual machines can be quickly created during emergency recovery, and that the created emergency virtual machines can correctly replace the source host to take over the business.

[0073] Based on the above technical solution, S3 includes the following specific implementation steps:

[0074] S31. The trigger module detects the newly created backup snapshot point based on the snapshot point's SNPID;

[0075] S32. If an emergency hot standby virtual machine has already been created, proceed to step S34.

[0076] S34. Activate the latest snapshot and update the configuration file of the created emergency hot standby virtual machine, including loading the disk information in the emergency hot standby virtual machine configuration file with the rbd disk ID provided by the latest snapshot, and updating the snapshot timestamp corresponding to the emergency hot standby virtual machine.

[0077] Based on the above technical solution, S4 includes the following specific implementation steps:

[0078] S41. The listening module sends a "network connectivity" request to the source host at fixed intervals and calls the API of the source host's business application to obtain the service status of the application.

[0079] S42. If the monitoring module does not receive a network connectivity response from the source host within the timeout period, or if it obtains an abnormality in the source host's business application service, then execute S43.

[0080] S43. The monitoring module sends a notification to the emergency virtualization platform to start the emergency hot standby virtual machine created in step S32.

[0081] Example 3: As Figure 2 As shown, the present invention provides a technical solution: a KVM automatic emergency recovery device based on continuous data protection technology. The automatic emergency recovery device includes a backup module, a trigger module, an emergency virtualization platform, a monitoring module, and an emergency startup module.

[0082] Based on the above technical solution, the backup module refers to the installation of a backup agent tool on the source host to achieve continuous data protection of the source host. It can generate backup snapshots of the source host at historical moments and provide the ability to restore the source host to the state at that point in time based on the backup snapshots. At the same time, it can maintain communication with the monitoring module to provide feedback on the operating status of the source host.

[0083] Based on the above technical solution, the triggering module is mainly used to detect the latest backup snapshot point. If the latest backup snapshot point is generated, it will trigger the creation / update of an emergency hot standby virtual machine based on the emergency pre-configuration template.

[0084] Based on the above technical solution, the emergency virtualization platform refers to providing emergency resources and creating emergency hot standby virtual machines on the emergency virtualization platform. These virtual machines are the latest historical state that has been backed up from the source host and can replace the source host to take over the business at any time.

[0085] Based on the above technical solution, the monitoring module is mainly used to monitor the running status of the source host's business application services and the network connectivity with the source host. When an anomaly is detected, it notifies the emergency startup module.

[0086] The emergency startup module is mainly used to control the startup status of the emergency hot standby virtual machine. When the source host is running normally, the emergency hot standby virtual machine is in a standby shutdown state. When the source host goes offline abnormally, the emergency hot standby virtual machine will start automatically.

[0087] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A KVM automatic emergency recovery method based on continuous data protection technology, characterized in that: Based on the latest historical backup points, emergency hot standby virtual machines are created on the KVM virtualization platform to take over services at any time. When the source host encounters anomalies, failures, or downtime, the emergency hot standby virtual machine is automatically and quickly started to take over the services from the source host, shortening the service interruption time and ensuring continuous service availability. The automatic emergency recovery method includes the following steps: S1. The backup module continuously protects the source host, generates backup snapshots of historical moments, and manages the backup snapshots in a unified manner. S2. Based on the source host parameters, set the emergency pre-configuration template for the emergency virtual machine; S3. The trigger module detects the latest backup snapshot point and creates / updates an emergency hot standby virtual machine based on the emergency pre-configuration template. This virtual machine is in a shutdown and standby takeover state. S4. The monitoring module detects whether there are any errors or abnormalities in the source host. If no abnormalities are found, it continues to monitor. If an abnormality is detected, it notifies the emergency start module. S5, the emergency startup module performs a power-on operation on the emergency hot standby virtual machine, provides services to the outside world, and takes over the source host's business; The specific implementation steps of S1 are as follows: S11. Add backup protection to the source host and set up a backup task schedule; S12. Regularly and continuously create backup snapshot points for the source host according to the backup task plan; S13. Place the newly created snapshot point into the backup snapshot management pool and record the snapshot point's SAPID and SANPID. These are unique attributes used to identify the snapshot, and the latest snapshot point is determined by comparing the values ​​of the SANPID. The S3 includes the following specific implementation steps: S31. The trigger module detects the newly created backup snapshot point based on the snapshot point's SNPID; S32. Determine whether an emergency hot standby virtual machine has been created. If no emergency hot standby virtual machine has been created, proceed to step S33. If an emergency hot standby virtual machine has been created, proceed to step S34. S33. Based on the emergency pre-configuration template and the latest backup snapshot point, create an emergency hot standby virtual machine in the KVM emergency virtualization platform. The emergency pre-configuration template provides the XML configuration file of the emergency virtual machine. The snapshot point restores the rbd disk of the source host at this moment. Write the rbd disk ID into the XML file of the emergency virtual machine and mark the snapshot timestamp corresponding to this emergency virtual machine. Put this virtual machine into a shutdown state. S34. Activate the latest snapshot and update the configuration file of the created emergency hot standby virtual machine, including loading the disk information in the emergency hot standby virtual machine XML configuration file into the rbd disk ID provided by the latest snapshot, and updating the snapshot timestamp corresponding to the emergency hot standby virtual machine. The S4 includes the following specific implementation steps: S41. The listening module sends a "keep connected" request to the source host backup agent tool at fixed intervals. S42. After receiving the request, the source host backup agent tool replies to the listening module to indicate that the source host is "online". If it does not receive an "online" reply from the source host within the timeout period, it executes S43. S43. The monitoring module sends a notification to the emergency virtualization platform to start the emergency hot standby virtual machine created in step S32.

2. The KVM automatic emergency recovery method based on continuous data protection technology according to claim 1, characterized in that: In S2, the emergency pre-configuration template refers to an XML file configuration information of an emergency virtual machine that is pre-set with reference to the parameters of the source host. It records the attribute parameters for creating the emergency virtual machine, specifically including: target emergency virtualization platform, virtual machine CPU, running memory, network card configuration, controller type and boot method. This emergency pre-configuration template will be used to pre-save the configuration information of virtual machines created in the emergency virtualization platform that are consistent with the source host, so as to ensure the rapid creation of emergency virtual machines during emergency recovery, and the correct replacement of the source host by the created emergency virtual machines to take over the business.

3. A KVM automatic emergency recovery device based on continuous data protection technology, applied to the method described in claim 2, characterized in that: The automatic emergency recovery device includes a backup module, a trigger module, an emergency virtualization platform, a monitoring module, and an emergency start module.

4. The KVM automatic emergency recovery device based on continuous data protection technology according to claim 3, characterized in that: The backup module refers to the backup agent tool installed on the source host to continuously protect the data of the source host, generate backup snapshots of the source host at historical moments, provide the ability to restore the source host to the state at that point in time based on the backup snapshots, and maintain communication with the monitoring module to provide feedback on the operating status of the source host.

5. The KVM automatic emergency recovery device based on continuous data protection technology according to claim 4, characterized in that: The triggering module is used to detect the latest backup snapshot point. If the latest backup snapshot point is generated, it triggers the creation / update of an emergency hot standby virtual machine based on the emergency pre-configuration template.

6. The KVM automatic emergency recovery device based on continuous data protection technology according to claim 4, characterized in that: The emergency virtualization platform refers to the provision of emergency resources and the creation of emergency hot standby virtual machines on the platform. These virtual machines are the latest historical states of the source host that have been backed up, and can replace the source host to take over the business at any time.

7. A KVM automatic emergency recovery device based on continuous data protection technology according to claim 4, characterized in that: The monitoring module is used to detect the running status of the source host. When an anomaly is detected, it notifies the emergency startup module. The emergency startup module is used to control the startup status of the emergency hot standby virtual machine. When the source host is running normally, the emergency hot standby virtual machine is in standby shutdown state. When the source host goes offline abnormally, the emergency hot standby virtual machine is automatically started.