Server disaster recovery method and system, computer equipment and storage medium

By implementing fault detection and fault signal transmission to the cloud computing platform in the server, the target virtual machine is used to quickly recover services, and the problems of long recovery time and high cost in the existing technology are solved, achieving the effect of rapid recovery and cost reduction.

CN119537110APending Publication Date: 2025-02-28ZHUHAI MOJIE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311118852.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing server disaster recovery methods are long and costly when facing catastrophic events such as hardware failures, software failures, natural disasters or human errors, and cannot recover services in a timely manner.

Method used

By obtaining the server's status data for fault detection and sending a fault signal to the cloud computing platform when the fault occurs, the target virtual machine can quickly restore services, reduce service interruption time, and reduce management costs.

Benefits of technology

It enables rapid service recovery in case of server failures, reduces service outage time, and reduces management costs and manual intervention efforts through automation features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537110A_ABST
    Figure CN119537110A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a disaster recovery method of a server, a disaster recovery system of the server, computer equipment and a storage medium. The disaster recovery method is applied to a server, the server is in communication connection with a cloud computing platform, and the method comprises the following steps: acquiring first state data of the server, and performing service fault detection based on the first state data; and when the server has a service fault, sending a fault signal to the cloud computing platform, so that the cloud computing platform recovers a target service corresponding to the service fault by using the target virtual machine. According to the embodiment of the invention, after the service fault of the server is judged, the fault signal is sent to the cloud computing platform in time, so that the target virtual machine is controlled to quickly recover the target service corresponding to the service fault based on the fault signal, and the service interruption time is shortened. In addition, by utilizing the automation characteristic of the cloud computing platform, the workload of manual intervention and server fault management can be reduced, and the management cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a server disaster recovery method, a server disaster recovery system, a computer device, and a computer-readable storage medium. Background Art

[0002] The server disaster recovery method is a disaster recovery rule for server systems and services, which aims to ensure that the server can quickly and efficiently restore normal operation to a normal state when it is affected by catastrophic events such as hardware failure, software failure, natural disasters, and human errors, so as to ensure business continuity and availability. Currently, the commonly used server disaster recovery methods are mainly the following: backup method, mirroring method, load balancing method, hot standby method, and cold standby method.

[0003] However, all of the above methods have inevitable disadvantages: although the backup method is simple and easy, the recovery time is long, and the real-time and integrity of the data cannot be guaranteed, so the service cannot be restored in time; although the mirroring method, load balancing method, hot standby method and cold standby method can improve the performance and availability of the service, achieve fast switching and data integrity, they all have the disadvantage of high disaster recovery costs. Summary of the invention

[0004] The present application provides a server disaster recovery method, a server disaster recovery system, a computer device, and a computer-readable storage medium, which are intended to timely send a fault signal to a cloud computing platform after determining a service failure of the server, so as to achieve rapid recovery of the target service corresponding to the service failure by controlling the target virtual machine based on the fault signal, reduce the service interruption time, and timely recover the faulty service. In addition, by utilizing the automation characteristics of the cloud computing platform, the workload of manual intervention and management of server failures can be reduced, and management costs can be reduced.

[0005] To achieve the above object, the present application provides a server disaster recovery method, the disaster recovery method is applied to the server, the server is communicatively connected with a cloud computing platform, and the method includes:

[0006] Acquire first status data of the server, and perform service fault detection based on the first status data;

[0007] When a service failure occurs on the server, a failure signal is sent to the cloud computing platform, so that the cloud computing platform can use the target virtual machine to restore the target service corresponding to the service failure.

[0008] To achieve the above object, the present application provides a server disaster recovery method, the disaster recovery method is applied to a cloud computing platform, the cloud computing platform is connected to the server, the cloud computing platform is provided with a plurality of virtual machines, the method comprises:

[0009] receiving a fault signal sent by the server, and determining a target virtual machine according to a preset rule corresponding to the fault signal; wherein the preset rule includes one or more of a load balancing rule, a minimum cost rule, a maximum performance rule, and a maximum availability rule; the fault signal is obtained by the server performing service fault detection based on the first state data of the server;

[0010] The target service is restored using the target virtual machine.

[0011] To achieve the above-mentioned purpose, the present application also provides a server disaster recovery system, which includes: a cloud computing platform, and the server communicatively connected to the cloud computing platform; the cloud computing platform and the server cooperate to implement the steps of the server disaster recovery method described in any one of the embodiments of the present application.

[0012] In addition, to achieve the above-mentioned purpose, the present application also provides a computer device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the steps of the server disaster recovery method described in any one of the embodiments of the present application when executing the computer program.

[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the steps of the server disaster recovery method described in any one of the embodiments of the present application.

[0014] The server disaster recovery method, server disaster recovery system, computer device and computer-readable storage medium disclosed in the embodiment of the present application can be applied to the server, and the server is communicatively connected to the cloud computing platform. Specifically, the first state data of the server can be obtained, and service fault detection can be performed based on the first state data to timely determine whether a service failure occurs in the server. Furthermore, when a service failure occurs in the server, a fault signal can be sent to the cloud computing platform so that the cloud computing platform can use the target virtual machine to restore the target service corresponding to the service failure. The embodiment of the present application aims to send a fault signal to the cloud computing platform in a timely manner after judging the service failure of the server based on the first state data, and then control the target virtual machine based on the fault signal to quickly restore the target service corresponding to the service failure, thereby reducing the service interruption time. In addition, by utilizing the automation characteristics of the cloud computing platform, the workload of manual intervention and management of server failures can be reduced, thereby reducing management costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 It is a flow chart of a server disaster recovery method provided by an embodiment of the present application;

[0017] Figure 2 This is a flow chart of restoring a target service on a server provided by an embodiment of the present application;

[0018] Figure 3 It is a flow chart of another server disaster recovery method provided by an embodiment of the present application;

[0019] Figure 4 It is a schematic block diagram of a server disaster recovery system provided in an embodiment of the present application;

[0020] Figure 5 It is a schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions. In addition, although the functional modules are divided in the device schematic, in some cases, the module division can be different from that in the device schematic.

[0023] The term "and / or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0024] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0025] See also Figure 1, Figure 1 FIG. 1 is a flow chart of a server disaster recovery method provided by an embodiment of the present application. The disaster recovery method is applied to a server, and the server is connected to a cloud computing platform for communication. Figure 1 As shown, the disaster recovery method of the server includes steps S11 to S12.

[0026] Step S11: Acquire first status data of the server, and perform service fault detection based on the first status data.

[0027] The first status data is the status data of the current server, including the operation status data and performance index data of the server.

[0028] It should be noted that this application does not limit the server's operating status data and performance indicator data. For example, the operating status data includes load status and network connection status, etc.; the performance indicator data includes CPU usage, memory usage, disk usage, network traffic, etc.

[0029] It can be understood that by obtaining the first status data of the server, service fault detection can be performed on the server to understand the health status of the server, and then disaster recovery methods can be applied in time when a server failure occurs to ensure that the service on the server can be carried out normally.

[0030] Preferably, the first status data of the server can be obtained in real time through a monitoring tool or disaster recovery software installed on the server, so that fault detection of the server can be performed in time to ensure the stability and availability of the server.

[0031] Optionally, service fault detection is performed based on the first status data, including: determining whether the first status data is greater than a preset threshold; confirming a service fault of the server when the first status data is greater than the preset threshold; confirming that the server service is normal when the first status data is less than or equal to the preset threshold.

[0032] The server services are services that run on the server, including, for example, database services, application services, website services, and virtualization services.

[0033] It should be noted that the present application does not limit the setting of preset thresholds. For example, the CPU usage can be set to 80%, the memory usage to 90%, the disk usage to 95%, the network traffic to 100Mbps, etc.

[0034] Specifically, it can be determined whether at least one of the CPU usage, memory usage, disk usage, and network traffic of the server is greater than the corresponding preset threshold value set above. If at least one of the above first status data is greater than the preset threshold value, it can be confirmed that the service of the server is faulty; if all of the above first status data are less than or equal to the preset threshold value, it can be confirmed that the service of the server is normal.

[0035] In the embodiment of the present application, the first state data of the server can be obtained, and service fault detection can be performed based on the first state data to determine whether the service of the server fails. In this way, the health status of the connection server can be timely connected to ensure the stability and availability of the server.

[0036] Step S12: When a service failure occurs on the server, a failure signal is sent to the cloud computing platform, so that the cloud computing platform can use the target virtual machine to restore the target service corresponding to the service failure.

[0037] The target service is a service that the server cannot currently run normally; the target virtual machine is a virtual machine that runs the service instead of the server.

[0038] It should be noted that a virtual machine pool is set up on the cloud computing platform, and a number of virtual machines are set up on the virtual machine pool to replace the server to run services when a service failure occurs on the server.

[0039] Optionally, each virtual machine is installed with a monitoring tool or disaster recovery software that can communicate with the server, so that the data and configuration information of the server can be obtained through the monitoring tool or disaster recovery software, and then the service can be restored.

[0040] In addition, during the communication process between the virtual machine and the server, the virtual machine can periodically send requests to the server to obtain information about the server's operating status, performance indicators, and other relevant information. After receiving the request, the server can provide real-time data and information to the virtual machine. As a result, the virtual machine can obtain real-time information about its environment through interaction with the server, thereby understanding its own status, performance, and operating conditions. In this way, the virtual machine can make intelligent decisions for the current environment to ensure the server's disaster recovery capabilities. For example, after a server fails, the virtual machine can detect this situation based on communication with the server and trigger a series of response measures, such as switching the service to itself to maintain service continuity.

[0041] Optionally, the monitoring tool or disaster recovery software on the server can also communicate with the cloud computing platform regularly or in real time, and then back up the server's data and configuration information in the cloud computing platform's storage service. Therefore, when the server fails, the virtual machine can directly obtain the server's data and configuration information from the cloud computing platform's storage service, and then restore the service.

[0042] Among them, the server data and configuration information includes the server's operating system configuration, network configuration, security configuration, application configuration, service configuration, database configuration, and file system configuration, etc., which are not limited in this application.

[0043] It is understandable that the data and configuration information of the server records the working state, settings and environment of the server. Therefore, after obtaining the data and configuration information of the server, this information can be restored on the virtual machine, so that the virtual machine can restore the same working state, settings and environment as the server to restore the service on the server.

[0044] Specifically, when a service failure occurs on the server, a fault signal can be sent to the cloud computing so that the cloud computing platform receives the fault signal and obtains the server's data and configuration information based on the target virtual machine on the cloud computing platform. After the target virtual machine restores the server's data and configuration information, the target service corresponding to the service failure is restored, thereby achieving server disaster recovery.

[0045] Optionally, the server includes several sub-servers, and the server is used to deploy at least two types of services, wherein the same type of service is deployed on any sub-server.

[0046] It should be noted that this application does not limit the services on the server, for example, including database services and application services, etc. Database services refer to services that provide data storage and query, such as MySQL, Oracle, etc.; application services refer to services that provide user interfaces and business logic, such as websites, applications, etc.

[0047] Specifically, business separation can be performed on the server. That is, each type of service is deployed on a different sub-server, and then the corresponding service is implemented through different sub-servers. For example, application services and database services are deployed on different servers, which can avoid single point failures of the server, reduce the impact of service failures, and improve the data security and consistency of the server.

[0048] In the embodiment of the present application, when a service failure occurs on the server, a fault signal can be sent to the cloud computing platform, so that the cloud computing platform can automatically trigger the process of restoring the service after receiving the fault signal, without manual intervention, thereby speeding up the server fault processing time and reducing the service interruption time. Furthermore, after the service is successfully restored, the cloud computing platform can send a recovery success signal to the server, and then the server determines that the target service has been restored to normal, without manual inspection, reducing management costs.

[0049] The server disaster recovery method disclosed in the embodiment of the present application can be applied to the server, and the server is communicatively connected to the cloud computing platform. Specifically, the first state data of the server can be obtained, and service fault detection can be performed based on the first state data to timely determine whether a service failure occurs in the server. Furthermore, when a service failure occurs in the server, a fault signal can be sent to the cloud computing platform so that the cloud computing platform can use the target virtual machine to restore the target service corresponding to the service failure. The embodiment of the present application aims to send a fault signal to the cloud computing platform in a timely manner after judging the service failure of the server based on the first state data, and then control the target virtual machine based on the fault signal to quickly restore the target service corresponding to the service failure, thereby reducing the service interruption time. In addition, by utilizing the automation characteristics of the cloud computing platform, the workload of manual intervention and management of server failures can be reduced, thereby reducing management costs.

[0050] See also Figure 2 , Figure 2 1 is a flow chart of restoring a target service on a server provided by an embodiment of the present application. Figure 2 As shown, after sending a fault signal to the cloud computing platform so that the cloud computing platform uses the target virtual machine to restore the target service corresponding to the service failure, the target service can be restored on the server through steps S13 to S14.

[0051] Step S13: Acquire the second status data of the server.

[0052] Step S14: When the second status data is less than or equal to a preset threshold, the target service is restored.

[0053] The second state data is state data after the target service of the server is restored on the target virtual machine.

[0054] Specifically, after the target service of the server is restored on the target virtual machine, the target virtual machine can send a signal to the server indicating that the service has been successfully restored. After receiving the signal, the server further obtains the second status data of the server, and then compares the second status data with a preset threshold to determine whether the server is providing normal service, that is, whether the service can be restored.

[0055] It should be noted that, for the description of the second state data and the preset threshold, reference may be made to the specific description of step S11, and to avoid repetition, it will not be described here.

[0056] It can be understood that when the second status data is less than or equal to the preset threshold, it indicates that the service of the server is normal, and the service can be restored on the server at this time.

[0057] Optionally, in order to enable the server to resume service normally, the monitoring tool or disaster recovery software installed on the server can automatically synchronize the server's data and configuration information from the virtual machine on the computing platform, so that the server can be restored to its original working state, settings and environment, and then the network traffic corresponding to the user's access request can be switched back to the main server to resume the original service.

[0058] Optionally, after restoring the target service, the method further includes: determining a stop result according to a preset rule; and sending the stop result to the cloud computing platform, so that the cloud computing platform stops the service on the corresponding target virtual machine based on the stop result.

[0059] Among them, the preset rules can be set according to different scenarios or requirements, including one or more of load balancing rules, lowest cost rules, highest performance rules, and highest availability rules; the stop result includes the target virtual machine that needs to stop service.

[0060] Specifically, after the server resumes the target service, it can also determine the stop result according to the preset rule, that is, determine the target virtual machine that needs to stop the service. Further, the cloud computing platform can receive the stop result and then stop the service on the corresponding target virtual machine based on the stop result.

[0061] It should be noted that the load balancing rule refers to determining the virtual machine with a higher load as the target virtual machine based on the current load of the target virtual machine in the virtual machine pool to avoid overloading and performance degradation of the target virtual machine; the lowest cost rule refers to determining the virtual machine with a higher cost as the target virtual machine based on the operating cost of the target virtual machine in the virtual machine pool to save the target virtual machine resources and expenses; the highest performance rule refers to determining the virtual machine with a lower performance as the target virtual machine based on the performance indicators of the target virtual machine in the virtual machine pool, such as CPU, memory, disk, network, etc., to improve service quality and user experience; the highest availability rule refers to determining a certain number or proportion of virtual machines as target virtual machines to meet the highest availability requirements.

[0062] It is understandable that after the server resumes the target service, it determines the target virtual machine that needs to stop the service in combination with the preset rules, and then stops the service, which can realize intelligent management and optimization of resources. Further, through intelligent management and optimization of resources, it can ensure that the resources of the server and virtual machine are effectively allocated, thereby providing higher performance and availability and ensuring the quality of service. In addition, by releasing resources on the target virtual machine that does not need to run the service, unnecessary resource waste can be reduced, ensuring cost control.

[0063] In the embodiment of the present application, after the target service of the server is restored on the target virtual machine, the second state data of the server is obtained, and then when the second state data is less than or equal to the preset threshold, the target service on the server is automatically restored. That is, real-time monitoring of the running status of the server is achieved, and then intelligent judgment is made on when to restore the service, which reduces the cost of manual intervention and improves the efficiency, stability and reliability of service recovery.

[0064] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of another server disaster recovery method provided by an embodiment of the present application. Figure 3 As shown, the disaster recovery method is applied to a cloud computing platform, the cloud computing platform is connected to the server, the cloud computing platform is provided with a plurality of virtual machines, and the disaster recovery method of the server includes steps S21 to S22.

[0065] Step S21: receiving a fault signal sent by the server, and determining a target virtual machine according to a preset rule corresponding to the fault signal.

[0066] The target virtual machine is a virtual machine that replaces the server to run the service; the fault signal is obtained by the server performing service fault detection based on the first state data of the server. Further, the first state data is the state data of the current server, including the running state data and performance indicator data of the server.

[0067] It should be noted that this application does not limit the server's operating status data and performance indicator data. For example, the operating status data includes load status and network connection status, etc.; the performance indicator data includes CPU usage, memory usage, disk usage, network traffic, etc.

[0068] It can be understood that the server can perform service fault detection based on the first status data to understand its own health status, and then when the server's service failure is determined, it sends a fault signal to the cloud computing platform. Therefore, when the cloud computing platform receives the fault signal, it can determine the server's service failure and determine the target virtual machine according to preset rules to replace the server to run the service.

[0069] Among them, server service failure refers to a problem that occurs during the normal operation of one or more services on the server (such as website services, application services, database services, etc.), causing these services to fail to work as expected or provide normal functions. Server service failures may be caused by factors such as server hardware failures, network problems, software errors, and resource exhaustion, which in turn lead to adverse effects such as unavailability of services on the server, extended response time, and data loss. Therefore, in order to ensure the continuity and stability of services, it is usually necessary to quickly detect and resolve these failures, such as taking measures such as switching to a virtual machine to replace the server to restore services.

[0070] It should be noted that the preset rules include one or more of load balancing rules, minimum cost rules, maximum performance rules, and maximum availability rules, and this application does not limit this.

[0071] Among them, the load balancing rule refers to selecting virtual machines with lower loads as target virtual machines based on the current load of each virtual machine in the virtual machine pool to avoid virtual machine overload and performance degradation; the lowest cost rule refers to selecting virtual machines with lower costs as target virtual machines based on the operating costs of each virtual machine in the virtual machine pool to save virtual machine resources and costs. The highest performance rule refers to selecting virtual machines with higher performance as target virtual machines based on the performance indicators of each virtual machine in the virtual machine pool, such as CPU, memory, disk, network and other performance indicators, to improve service quality and user experience. The highest availability rule refers to selecting a certain number or proportion of virtual machines as target virtual machines based on a preset number or proportion to meet the highest availability requirements.

[0072] In the embodiment of the present application, a fault signal may be received and a target virtual machine may be determined according to preset rules, so that rapid and automated fault response and recovery may be achieved based on the target virtual machine.

[0073] Step S22: Restore the target service using the target virtual machine.

[0074] Specifically, after the target virtual machine is determined, the target virtual machine can automatically restore the target service, and then send a restoration success signal to the server, so that the server can determine that the target virtual machine has restored the service.

[0075] Optionally, before determining the target virtual machine according to the preset rule, the method includes: acquiring server data information of the server, and saving the server data information to a database, so that each virtual machine acquires the server data information through the database.

[0076] The server data information includes the server data information and configuration information.

[0077] Specifically, in order to enable the target virtual machine to resume service, the server data information of the server may also be obtained, and the server data information may be saved in a database, so that each virtual machine may obtain the server data information through the database.

[0078] It should be noted that the present application does not limit the method for obtaining the server data information, for example, the server data information can be obtained by periodically or in real time through the monitoring software or disaster recovery software installed on the server. That is, the monitoring software or disaster recovery software can periodically or in real time send the server data information of the server to the cloud computing platform, and then the cloud computing platform can save it to the database.

[0079] On the basis of the above embodiment, restoring the target service by using the target virtual machine includes: restoring the target service based on the server data information by using the target virtual machine.

[0080] Specifically, after receiving the user's access request, the server data information is restored using the target virtual machine, the network traffic corresponding to the access request is switched from the server to the target virtual machine, and the target service is started.

[0081] It is understandable that after receiving the user's access request, the target virtual machine can be used to restore the server data information, so that the target virtual machine can quickly restore to the normal operation state of the target service, reducing the service interruption time. Furthermore, since the user's access request will be sent to the server, in order to avoid the user being unable to obtain the service normally due to server failure. The network traffic corresponding to the access request can be switched from the server to the target virtual machine so that the user's access request can be processed normally, that is, the user can access the service normally.

[0082] It should be noted that network traffic refers to the traffic generated when users access the services provided by the server.

[0083] Furthermore, the present application does not limit the method of switching network traffic, for example, it can be achieved by modifying DNS resolution, modifying routing tables, modifying load balancers, etc.

[0084] Specifically, to switch network traffic by modifying DNS resolution: the DNS resolution record can be modified, and the domain name resolution can be pointed to the IP address of the target virtual machine. Thus, when a user tries to access the server domain name, the access request will be sent to the target virtual machine, thus achieving the switching of network traffic.

[0085] For modifying the routing table to switch network traffic: the routing table can be modified on the network device that supports traffic redirection and dynamic routing functions, and then the traffic requested by the user is directed to the target virtual machine, which also realizes the switching of network traffic.

[0086] To modify the load balancer to switch network traffic: you can adjust the settings of the load balancer, for example, by adjusting the weight, disabling the failed server, etc. to direct the network traffic to the target virtual machine to switch the network traffic.

[0087] Optionally, in order to improve the user's service quality, the resource allocation of the target virtual machine may also be adjusted to meet the user's expectations and requirements for service availability, response time, throughput, etc.

[0088] Specifically, the disaster recovery software or monitoring software on the virtual machine can dynamically adjust the resource allocation and load between target virtual machines or cloud computing platforms to meet user needs. For example, when it is detected that a target virtual machine carries too many user requests, resulting in performance degradation or unresponsiveness, some user requests can be transferred to other target virtual machines or other available resources on the cloud computing platform; when it is detected that a target virtual machine carries too few user requests, resulting in resource waste or cost increase, the resources of the target virtual machine can be released or stopped.

[0089] In the embodiment of the present application, the target virtual machine can be used to automatically restore the target service and send a recovery success signal to the server to avoid service interruption or data loss. In addition, the number and configuration of the target virtual machines can be dynamically adjusted to adapt to different service requirements and load conditions, minimizing costs and resource waste. Furthermore, the embodiment of the present application can also automatically synchronize server data information and automatically switch network traffic, reducing the complexity and risk of manual intervention and management.

[0090] See also Figure 4 , Figure 4 The server disaster recovery system 200 includes: a cloud computing platform 201, and a server 202 connected to the cloud computing platform 201; the cloud computing platform 201 and the server 202 cooperate to execute the above-mentioned server disaster recovery method.

[0091] The cloud computing platform 201 is used to receive the fault signal sent by the server and determine the target virtual machine according to the preset rules corresponding to the fault signal; wherein the preset rules include one or more of load balancing rules, minimum cost rules, maximum performance rules, and maximum availability rules; the fault signal is obtained by the server through service fault detection based on the first state data of the server; and the target service is restored using the target virtual machine.

[0092] The cloud computing platform 201 is used to obtain the server data information of the server and save the server data information to a database so that each virtual machine can obtain the server data information through the database; and use the target virtual machine to restore the target service based on the server data information.

[0093] The cloud computing platform 201 is used to restore the server data information using the target virtual machine after receiving the access request, switch the network traffic corresponding to the access request from the server to the target virtual machine, and start the target service.

[0094] Server 202 is used to obtain the first status data of the server and perform service fault detection based on the first status data; when a service fault occurs on the server, a fault signal is sent to the cloud computing platform; so that the cloud computing platform uses the target virtual machine to restore the target service corresponding to the service fault.

[0095] Server 202 is used to determine whether the first status data is greater than a preset threshold; when the first status data is greater than the preset threshold, confirm that the service of the server is faulty; when the first status data is less than or equal to the preset threshold, confirm that the service of the server is normal.

[0096] The server 202 is further configured to obtain second status data of the server; and when the second status data is less than or equal to a preset threshold, restore the target service.

[0097] Server 202 is also used to determine the stop result according to preset rules; wherein the preset rules include one or more of load balancing rules, lowest cost rules, highest performance rules, and highest availability rules; send the stop result to the cloud computing platform so that the cloud computing platform stops the service on the corresponding target virtual machine based on the stop result.

[0098] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0099] The method and apparatus of the present application can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer terminal devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices.

[0100] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in the form of a computer program. Figure 5 Runs on the computer device shown.

[0101] See also Figure 5 , Figure 5 1 is a schematic diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0102] like Figure 5 As shown, the computer device 400 includes a processor 401, a memory 402, and a network interface connected via a system bus, wherein the memory 402 may include a volatile storage medium, a non-volatile storage medium, and an internal memory.

[0103] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor 401 can execute any server disaster recovery method.

[0104] The processor 401 is used to provide computing and control capabilities and support the operation of the entire computer device 400 .

[0105] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any server disaster recovery method.

[0106] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that the structure of the computer device is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 400 to which the solution of the present application is applied. The specific computer device 400 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0107] It should be understood that the processor 401 may be a central processing unit (CPU), and the processor 401 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0108] In some embodiments, the processor 401 is used to run a computer program stored in a memory to implement the following steps: obtaining first status data of the server and performing service fault detection based on the first status data; when a service failure occurs on the server, sending a fault signal to the cloud computing platform so that the cloud computing platform uses a target virtual machine to restore a target service corresponding to the service failure.

[0109] In some embodiments, the processor 401 is also used to determine whether the first status data is greater than a preset threshold; when the first status data is greater than the preset threshold, confirm that the service of the server is faulty; when the first status data is less than or equal to the preset threshold, confirm that the service of the server is normal.

[0110] In some implementations, the processor 401 is further configured to obtain second status data of the server; and when the second status data is less than or equal to a preset threshold, restore the target service.

[0111] In some embodiments, the processor 401 is also used to determine a stop result according to preset rules; wherein the preset rules include one or more of a load balancing rule, a minimum cost rule, a maximum performance rule, and a maximum availability rule; and send the stop result to the cloud computing platform so that the cloud computing platform stops the service on the corresponding target virtual machine based on the stop result.

[0112] In some embodiments, the processor 401 is also used to receive a fault signal sent by the server, and determine a target virtual machine according to a preset rule corresponding to the fault signal; wherein the preset rule includes one or more of a load balancing rule, a minimum cost rule, a maximum performance rule, and a maximum availability rule; the fault signal is obtained by the server through service fault detection based on the first state data of the server; and the target service is restored using the target virtual machine.

[0113] In some embodiments, the processor 401 is also used to obtain server data information of the server and save the server data information to a database so that each virtual machine can obtain the server data information through the database; and use the target virtual machine to restore the target service based on the server data information.

[0114] In some implementations, the processor 401 is further configured to, after receiving an access request, use the target virtual machine to restore the server data information, switch the network traffic corresponding to the access request from the server to the target virtual machine, and start the target service.

[0115] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed, any server disaster recovery method provided in the embodiment of the present application is implemented.

[0116] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0117] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like.

[0118] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A server disaster recovery method, characterized in that: The disaster recovery method is applied to the server, the server is connected to the cloud computing platform for communication, and the method includes: Acquire first status data of the server, and perform service fault detection based on the first status data; When a service failure occurs on the server, a failure signal is sent to the cloud computing platform, so that the cloud computing platform can use the target virtual machine to restore the target service corresponding to the service failure.

2. The method according to claim 1, characterized in that The performing service fault detection based on the first status data includes: Determining whether the first status data is greater than a preset threshold; When the first status data is greater than the preset threshold, confirming a service failure of the server; When the first status data is less than or equal to the preset threshold, it is confirmed that the service of the server is normal.

3. The method according to claim 1, characterized in that After sending a fault signal to the cloud computing platform so that the cloud computing platform uses the target virtual machine to restore the target service corresponding to the service fault, the method includes: Acquire second status data of the server; When the second status data is less than or equal to a preset threshold, the target service is restored.

4. The method according to claim 3, characterized in that After the target service is restored, the method further includes: Determine the stop result according to preset rules; wherein the preset rules include one or more of a load balancing rule, a minimum cost rule, a maximum performance rule, and a maximum availability rule; The stop result is sent to the cloud computing platform, so that the cloud computing platform stops the service on the corresponding target virtual machine based on the stop result.

5. The method according to claim 1, characterized in that The server includes several sub-servers, and the server is used to deploy at least two types of services, wherein the same type of service is deployed on any of the sub-servers.

6. A server disaster recovery method, characterized in that: The disaster recovery method is applied to a cloud computing platform, the cloud computing platform is connected to the server, and the cloud computing platform is provided with a plurality of virtual machines. The method comprises: receiving a fault signal sent by the server, and determining a target virtual machine according to a preset rule corresponding to the fault signal; wherein the preset rule includes one or more of a load balancing rule, a minimum cost rule, a maximum performance rule, and a maximum availability rule; the fault signal is obtained by the server performing service fault detection based on the first state data of the server; The target service is restored using the target virtual machine.

7. The method according to claim 1, characterized in that Before determining the target virtual machine according to the preset rule corresponding to the fault signal, the method includes: Acquire server data information of the server, and save the server data information into a database, so that each of the virtual machines can acquire the server data information through the database; The using the target virtual machine to restore the target service includes: The target service is restored using the target virtual machine based on the server data information.

8. The method according to claim 7, characterized in that The using the target virtual machine to restore the target service based on the server data information includes: After receiving the access request, the server data information is restored using the target virtual machine, the network traffic corresponding to the access request is switched from the server to the target virtual machine, and the target service is started.

9. A server disaster recovery system, characterized in that: The disaster recovery system includes: a cloud computing platform, and the server connected to the cloud computing platform in communication; the cloud computing platform and the server cooperate to implement the steps of the server disaster recovery method as described in any one of claims 1 to 8.

10. A computer device, characterized in that: include: A memory and a processor; wherein the memory is connected to the processor and is used to store a program; the processor is used to implement the steps of the disaster recovery method of the server as described in any one of claims 1-5 or 6-8 by running the program stored in the memory.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the steps of the server disaster recovery method according to any one of claims 1-5 or 6-8.