Data backup method and device, electronic equipment and storage medium
By monitoring and evaluating the network status between the production virtual machine and the placeholder virtual machine, dynamically determining the data backup method, the problem of high network performance requirements in remote disaster recovery data transmission is solved, and the stability and security of data backup are improved.
Patent Information
- Application Number
- CN202411454165.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-17
AI Technical Summary
The prior art requires high network performance in off-site disaster recovery data transmission, which makes it difficult to ensure data backup stability and security.
By monitoring the data transmission mode of the production virtual machine, evaluating the network status between the production virtual machine and the placeholder virtual machine, and dynamically determining the data backup method, including memory backup, cache backup, differential backup and full backup.
It minimizes the dependence of data backup on network performance, improves the stability and security of data backup, and ensures business continuity and data integrity.
Smart Images

Figure CN119512811A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of virtual machines, and in particular to a data backup method, device, electronic device and storage medium. Background Art
[0002] Generally speaking, dual-site disaster recovery data transmission refers to establishing data centers in two different geographical locations and taking corresponding technical measures to ensure that when a failure or disaster occurs at the production site, the virtual machines and their related data at the production site can be quickly and reliably transmitted to the disaster recovery site through a high-speed network connection, thereby achieving real-time synchronization and backup of data, thereby ensuring business continuity and data integrity.
[0003] However, since the production site and disaster recovery site are located in different locations for disaster recovery, the distance between them is relatively far, and the use of network transmission to back up data places high requirements on the network performance between the production site and the disaster recovery site, which poses a great challenge to the safe switching of dual-site disaster recovery.
[0004] Therefore, there is an urgent need to propose a data backup method, device, electronic device and storage medium that can adapt to data backup in a variety of complex scenarios, minimize dependence on network performance, and ensure the stability of data backup. Summary of the invention
[0005] Based on this, it is necessary to provide a data backup method, device, electronic device and storage medium that can adapt to data backup in a variety of complex scenarios, minimize dependence on network performance, and ensure the stability of data backup in response to the above technical problems.
[0006] In a first aspect, a data backup method is provided, which is applied to a data backup system, wherein the data backup system includes a production site and a disaster recovery site, wherein a production virtual machine is deployed in the production site, and a corresponding placeholder virtual machine is deployed in the disaster recovery site, wherein the placeholder virtual machine is used to perform data backup on the production virtual machine, and the method includes:
[0007] Monitoring the production virtual machine to obtain a data transmission mode of the production virtual machine;
[0008] In response to the data transmission mode being an incremental transmission mode, evaluating a network state between the production virtual machine and the placeholder virtual machine, and determining a first data backup mode according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode;
[0009] In response to the data transmission mode being the full transmission mode, a second data backup mode is determined according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode.
[0010] In one embodiment, the evaluating the network status between the production virtual machine and the placeholder virtual machine includes:
[0011] Acquire preset network indicators, and monitor the network performance between the production virtual machine and the placeholder virtual machine based on the preset network indicators to obtain network performance data, wherein the preset network indicators include at least one of network transmission bandwidth, network transmission delay, network transmission packet loss rate, and network transmission throughput;
[0012] Obtaining a preset performance standard, and determining whether the network performance data meets the preset performance standard;
[0013] In response to the network performance data meeting the preset performance standard, determining that a network between the production virtual machine and the placeholder virtual machine is in a normal state;
[0014] In response to the network performance data not meeting the preset performance standard, it is determined that a network between the production virtual machine and the placeholder virtual machine is in an abnormal state.
[0015] In one embodiment, the data backup system further includes a transmission module, and the first data backup mode is determined according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode, including:
[0016] In response to the network between the production virtual machine and the placeholder virtual machine being in a normal state, determining that the first data backup mode is a memory backup mode, wherein the memory backup mode includes: obtaining incremental snapshot data in the production virtual machine, and saving the incremental snapshot data to the memory of the production virtual machine, and sending the incremental snapshot data in the memory to the placeholder virtual machine for backup through the transmission module;
[0017] In response to the network between the production virtual machine and the placeholder virtual machine being in an abnormal state, it is determined that the first data backup method is a cache backup method, wherein the cache backup method includes: obtaining incremental snapshot data in the production virtual machine, saving the incremental snapshot data to the cache of the production virtual machine, and sending the incremental snapshot data in the cache to the placeholder virtual machine for backup through the transmission module.
[0018] In one of the embodiments, determining a second data backup mode according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode, includes:
[0019] In response to the presence of baseline snapshot data in the production virtual machine, determining that the second data backup mode is a differential backup mode, wherein the differential backup mode includes: obtaining full snapshot data in the production virtual machine, comparing the full snapshot data with the baseline snapshot data to obtain differential snapshot data, and sending the differential snapshot data to the placeholder virtual machine for backup through the transmission module;
[0020] In response to the absence of baseline snapshot data in the production virtual machine, it is determined that the second data backup method is a full backup method, wherein the full backup method includes: obtaining the full snapshot data in the production virtual machine, and sending the full snapshot data to the placeholder virtual machine for backup through the transmission module.
[0021] In one embodiment, the method further comprises:
[0022] Generate a pair of public and private keys in the placeholder virtual machine according to a preset encryption algorithm, and send the public key to the production virtual machine through the transmission module;
[0023] Encrypting the incremental snapshot data / full snapshot data / difference snapshot data by using the public key to obtain encrypted data, and sending the encrypted data to the placeholder virtual machine by using the transmission module;
[0024] The encrypted data is decrypted by using the private key to obtain decrypted data, and the decrypted data is written into the virtual disk in the placeholder virtual machine.
[0025] In one embodiment, the method further comprises:
[0026] The incremental snapshot data / full snapshot data / difference snapshot data sent by the production virtual machine are calculated according to a preset verification algorithm to obtain a standard verification value;
[0027] Calculate the incremental snapshot data / full snapshot data / difference snapshot data received by the placeholder virtual machine according to the preset verification algorithm to obtain an actual verification value;
[0028] Compare the actual verification value with the standard verification value to generate a verification result;
[0029] In response to the actual check value being consistent with the standard check value, determining that the check result of the incremental snapshot data / full snapshot data / difference snapshot data is a successful check;
[0030] In response to the actual verification value being inconsistent with the standard verification value, it is determined that the verification result of the incremental snapshot data / full snapshot data / difference snapshot data is a verification failure.
[0031] In one embodiment, the method comprises:
[0032] Monitoring the production virtual machine, obtaining operation status data of the production virtual machine, and determining the operation status of the production virtual machine according to the operation status data;
[0033] In response to an abnormality in the running state of the production virtual machine, a data transmission task is generated according to the running state data, wherein the running state data includes a failure time period of the production virtual machine and specified snapshot data within the failure time period, and the specified snapshot data includes incremental snapshot data / full snapshot data / difference snapshot data corresponding to the data transmission mode;
[0034] According to a preset transmission protocol, the data transmission task of the production site is sent to the disaster recovery site, wherein the preset transmission protocol includes an identification bit, protocol information and data information;
[0035] The identification bit includes a first identification bit, a second identification bit, a third identification bit and a fourth identification bit, the first identification bit is used to indicate the placeholder virtual machine corresponding to the production virtual machine, the second identification bit is used to indicate the type of the specified snapshot data transmitted by the production site to the disaster recovery site, the third identification bit is used to indicate that the production site notifies the disaster recovery site that the transmission of the specified snapshot data is wrong, and the fourth identification bit is used to indicate that the production site notifies the disaster recovery site that the data transmission task is completed;
[0036] The protocol information includes memory information, cache information and virtual disk information of the production virtual machine, and virtual disk information of the placeholder virtual machine;
[0037] The data information includes the failure time period of the production virtual machine and designated snapshot data.
[0038] In a second aspect, a data backup device is provided, the device comprising:
[0039] A monitoring module, the monitoring module is used to monitor the production virtual machine and obtain the data transmission mode of the production virtual machine;
[0040] an evaluation module, the evaluation module being configured to evaluate a network status between the production virtual machine and the placeholder virtual machine in response to the data transmission mode being an incremental data transmission mode;
[0041] a first determining module, the first determining module being configured to determine a first data backup mode according to the network state in response to the data transmission mode being the incremental data transmission mode, wherein the first data backup mode includes a memory backup mode and a cache backup mode;
[0042] The second determination module is used to determine the second data backup method in response to the data transmission mode being the full data transmission mode, according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup method includes a differential backup method and a full backup method.
[0043] In a third aspect, an electronic device is provided, comprising one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, execute the steps of the method described in any one of the first aspects above.
[0044] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any one of the first aspects are performed.
[0045] In a fifth aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of the above-mentioned first aspects are implemented.
[0046] The above-mentioned data backup method, device, electronic device and storage medium determine the first data backup mode according to the data transmission mode of the production virtual machine, and when the data transmission mode is an incremental transmission mode, determine the second data backup mode in combination with whether the production virtual machine contains baseline snapshot data when the data transmission mode is a full transmission mode, thereby minimizing the dependence of data backup on network performance and ensuring the stability of data backup. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic diagram of a data backup method in one embodiment;
[0048] Figure 2 A flowchart of a data backup system in one embodiment;
[0049] Figure 3 is a structural block diagram of a data backup device in one embodiment;
[0050] Figure 4 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] Embodiment 1
[0053] In one embodiment, Figure 1 As shown, a data backup method is provided, which is applied to Figure 2 The data backup system shown in the figure includes a production site and a disaster recovery site, a production virtual machine is deployed in the production site, a corresponding placeholder virtual machine is deployed in the disaster recovery site, and the placeholder virtual machine is used to back up data of the production virtual machine. The method includes:
[0054] Monitoring the production virtual machine to obtain a data transmission mode of the production virtual machine;
[0055] In response to the data transmission mode being an incremental transmission mode, evaluating a network state between the production virtual machine and the placeholder virtual machine, and determining a first data backup mode according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode;
[0056] In response to the data transmission mode being the full transmission mode, a second data backup mode is determined according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode.
[0057] Specifically, according to the data transmission mode of the production virtual machine, and when the data transmission mode is the incremental transmission mode, the first data backup method is determined in combination with the network status between the production virtual machine and the placeholder virtual machine; when the data transmission mode is the full transmission mode, the second data backup method is determined in combination with whether the production virtual machine contains baseline snapshot data, thereby minimizing the dependence of data backup on network performance and ensuring the security, stability and reliability of data backup.
[0058] In one embodiment, the evaluating the network status between the production virtual machine and the placeholder virtual machine includes:
[0059] Acquire preset network indicators, and monitor the network performance between the production virtual machine and the placeholder virtual machine based on the preset network indicators to obtain network performance data, wherein the preset network indicators include at least one of network transmission bandwidth, network transmission delay, network transmission packet loss rate, and network transmission throughput;
[0060] Obtaining a preset performance standard, and determining whether the network performance data meets the preset performance standard;
[0061] In response to the network performance data meeting the preset performance standard, determining that a network between the production virtual machine and the placeholder virtual machine is in a normal state;
[0062] In response to the network performance data not meeting the preset performance standard, it is determined that a network between the production virtual machine and the placeholder virtual machine is in an abnormal state.
[0063] In a specific embodiment, the preset network indicators and preset performance standards include: Network bandwidth, monitoring indicators: monitoring the network bandwidth usage in and out of the virtual machine, including upload and download speeds; evaluation criteria: whether the network bandwidth meets business needs and whether there is enough margin to cope with burst traffic. Network delay, monitoring indicators: measuring the time required for a data packet to be transmitted in the network, including indicators such as round-trip time (RTT); evaluation criteria: network delay should be kept at a low level to ensure rapid response of the application. Packet loss rate, monitoring indicators: statistics on the proportion of data packets lost during data transmission; evaluation criteria: the packet loss rate should be as low as possible, and a high packet loss rate will affect the integrity and reliability of data transmission. Concurrent connection number, monitoring indicators: monitoring the number of concurrent network connections established on the virtual machine; evaluation criteria: the number of concurrent connections should be able to meet business needs and avoid performance bottlenecks caused by too many connections. Network error rate, monitoring indicators: statistics on the number of errors that occur during network transmission, such as CRC errors, etc.; evaluation criteria: the network error rate should be as low as possible, and a high error rate may indicate problems with network hardware or configuration.
[0064] Specifically, network performance data is first obtained according to preset performance indicators, and then the network performance data is compared with preset performance standards to accurately determine the network status between the production virtual machine and the placeholder virtual machine.
[0065] In one embodiment, the data backup system further includes a transmission module, and the first data backup mode is determined according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode, including:
[0066] In response to the network between the production virtual machine and the placeholder virtual machine being in a normal state, determining that the first data backup mode is a memory backup mode, wherein the memory backup mode includes: obtaining incremental snapshot data in the production virtual machine, and saving the incremental snapshot data to the memory of the production virtual machine, and sending the incremental snapshot data in the memory to the placeholder virtual machine for backup through the transmission module;
[0067] In response to the network between the production virtual machine and the placeholder virtual machine being in an abnormal state, it is determined that the first data backup method is a cache backup method, wherein the cache backup method includes: obtaining incremental snapshot data in the production virtual machine, saving the incremental snapshot data to the cache of the production virtual machine, and sending the incremental snapshot data in the cache to the placeholder virtual machine for backup through the transmission module.
[0068] Specifically, in incremental transfer mode, if the current network status is normal, the production virtual machine will be shut down and the unsynchronized incremental snapshot data will be transferred to the virtual disk of the placeholder virtual machine; if the current network status is abnormal, the incremental snapshot data will be stored in the cache first, and then the data will be synchronized through the cache, which minimizes the dependence of incremental snapshot data transmission on network performance and ensures stability during data backup.
[0069] In one embodiment, the second data backup mode is determined according to whether the baseline snapshot data exists in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode, including:
[0070] In response to the presence of baseline snapshot data in the production virtual machine, determining that the second data backup mode is a differential backup mode, wherein the differential backup mode includes: obtaining full snapshot data in the production virtual machine, comparing the full snapshot data with the baseline snapshot data to obtain differential snapshot data, and sending the differential snapshot data to the placeholder virtual machine for backup through the transmission module;
[0071] In response to the absence of baseline snapshot data in the production virtual machine, it is determined that the second data backup method is a full backup method, wherein the full backup method includes: obtaining the full snapshot data in the production virtual machine, and sending the full snapshot data to the placeholder virtual machine for backup through the transmission module.
[0072] In a specific embodiment, in full transmission mode, the production virtual machine is first shut down and full snapshot data is backed up. If there is baseline snapshot data in the production virtual machine, differential snapshot data will be extracted for data transmission; if there is no baseline snapshot data, full snapshot backup data will be transmitted, reducing network pressure during data transmission.
[0073] In one embodiment, the method further comprises:
[0074] Generate a pair of public and private keys in the placeholder virtual machine according to a preset encryption algorithm, and send the public key to the production virtual machine through the transmission module;
[0075] Encrypting the incremental snapshot data / full snapshot data / difference snapshot data by using the public key to obtain encrypted data, and sending the encrypted data to the placeholder virtual machine by using the transmission module;
[0076] The encrypted data is decrypted by using the private key to obtain decrypted data, and the decrypted data is written into the virtual disk in the placeholder virtual machine.
[0077] In a specific embodiment, the preset encryption algorithm includes but is not limited to an asymmetric encryption algorithm, which ensures the security of data backup by encrypting and decrypting incremental snapshot data / full snapshot data / differential snapshot data during transmission.
[0078] In one embodiment, the method further comprises:
[0079] The incremental snapshot data / full snapshot data / difference snapshot data sent by the production virtual machine are calculated according to a preset verification algorithm to obtain a standard verification value;
[0080] Calculate the incremental snapshot data / full snapshot data / difference snapshot data received by the placeholder virtual machine according to the preset verification algorithm to obtain an actual verification value;
[0081] Compare the actual verification value with the standard verification value to generate a verification result;
[0082] In response to the actual check value being consistent with the standard check value, determining that the check result of the incremental snapshot data / full snapshot data / difference snapshot data is a successful check;
[0083] In response to the actual verification value being inconsistent with the standard verification value, it is determined that the verification result of the incremental snapshot data / full snapshot data / difference snapshot data is a verification failure.
[0084] In a specific embodiment, the preset verification algorithm includes but is not limited to a cyclic redundancy check algorithm, a message digest algorithm, and a secure hash algorithm. By comparing the actual verification value with the standard verification value, the integrity of the data backup is ensured.
[0085] In one embodiment, the method comprises:
[0086] Monitoring the production virtual machine, obtaining operation status data of the production virtual machine, and determining the operation status of the production virtual machine according to the operation status data;
[0087] In response to an abnormality in the running state of the production virtual machine, a data transmission task is generated according to the running state data, wherein the running state data includes a failure time period of the production virtual machine and specified snapshot data within the failure time period, and the specified snapshot data includes incremental snapshot data / full snapshot data / difference snapshot data corresponding to the data transmission mode;
[0088] According to a preset transmission protocol, the data transmission task of the production site is sent to the disaster recovery site, wherein the preset transmission protocol includes an identification bit, protocol information and data information;
[0089] The identification bit includes a first identification bit, a second identification bit, a third identification bit and a fourth identification bit, the first identification bit is used to indicate the placeholder virtual machine corresponding to the production virtual machine, the second identification bit is used to indicate the type of the specified snapshot data transmitted by the production site to the disaster recovery site, the third identification bit is used to indicate that the production site notifies the disaster recovery site that the transmission of the specified snapshot data is wrong, and the fourth identification bit is used to indicate that the production site notifies the disaster recovery site that the data transmission task is completed;
[0090] The protocol information includes memory information, cache information and virtual disk information of the production virtual machine, and virtual disk information of the placeholder virtual machine;
[0091] The data information includes the failure time period of the production virtual machine and designated snapshot data.
[0092] Specifically, by presetting the format of the transmission protocol, the data transmission task is transmitted from the production virtual machine to the placeholder virtual machine to facilitate subsequent data backup operations.
[0093] In one embodiment, Figure 2 As shown, a continuous data protection server is also deployed in the production site, and each production virtual machine is connected to the continuous data protection server. The method further includes:
[0094] In response to the data transmission mode being the incremental transmission mode, obtaining the incremental snapshot data in the production virtual machine through the continuous data protection server, and saving the incremental snapshot data to a memory or cache in the production virtual machine based on a network status between the production virtual machine and the placeholder virtual machine;
[0095] Sending the incremental snapshot data in the memory or cache to the virtual disk of the placeholder virtual machine;
[0096] In response to the data transmission mode being the full transmission mode, the full snapshot data is obtained from the virtual disk of the production virtual machine, and based on whether there is baseline snapshot data in the production virtual machine, the full snapshot data or the differential snapshot data is sent to the virtual disk of the placeholder virtual machine.
[0097] In one embodiment, the method further comprises:
[0098] Monitoring the production site and generating a data backup request, wherein the data backup request includes a unique identifier of the production virtual machine in the production site;
[0099] Obtaining a preset priority of a virtual machine in the disaster recovery site, and using a virtual machine whose preset priority meets a preset condition as a placeholder virtual machine;
[0100] Determining whether there is a placeholder virtual machine matching the production virtual machine in the disaster recovery site;
[0101] In response to the disaster recovery site having a placeholder virtual machine matching the production virtual machine, determining the placeholder virtual machine as a backup virtual machine corresponding to the production target virtual machine;
[0102] In response to the disaster recovery site not having a placeholder virtual machine that matches the production virtual machine, sending configuration information of the production virtual machine to the disaster recovery site, and controlling the disaster recovery site to create a backup virtual machine corresponding to the production virtual machine based on the configuration information of the production virtual machine;
[0103] In response to the disaster recovery site not having a placeholder virtual machine that matches the production virtual machine, synchronizing the full snapshot data of the production virtual machine to the created backup virtual machine;
[0104] In response to the disaster recovery site having a placeholder virtual machine that matches the production virtual machine, synchronizing the incremental data of the production virtual machine to the matching virtual machine.
[0105] In a specific embodiment, the preset priority can be to rank all virtual machines in the disaster recovery site according to the network status between the production virtual machine and each virtual machine in the disaster recovery site; the preset condition can be to use the virtual machine whose network performance data meets the business requirements as the backup virtual machine. The preset priority and preset condition can be used to determine or create a placeholder virtual machine corresponding to the production virtual machine, so as to make full use of the virtual machine resources of the disaster recovery site.
[0106] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0107] Embodiment 2
[0108] In one embodiment, Figure 3 As shown, a data backup device is provided, the device comprising:
[0109] A monitoring module, the monitoring module is used to monitor the production virtual machine and obtain the data transmission mode of the production virtual machine;
[0110] an evaluation module, the evaluation module being configured to evaluate a network status between the production virtual machine and the placeholder virtual machine in response to the data transmission mode being an incremental data transmission mode;
[0111] a first determining module, the first determining module being configured to determine a first data backup mode according to the network state in response to the data transmission mode being the incremental data transmission mode, wherein the first data backup mode includes a memory backup mode and a cache backup mode;
[0112] The second determination module is used to determine the second data backup method in response to the data transmission mode being the full data transmission mode, according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup method includes a differential backup method and a full backup method.
[0113] In one embodiment, the evaluation module is used to evaluate the network status between the production virtual machine and the placeholder virtual machine, including:
[0114] Acquire preset network indicators, and monitor the network performance between the production virtual machine and the placeholder virtual machine based on the preset network indicators to obtain network performance data, wherein the preset network indicators include at least one of network transmission bandwidth, network transmission delay, network transmission packet loss rate, and network transmission throughput;
[0115] Obtaining a preset performance standard, and determining whether the network performance data meets the preset performance standard;
[0116] In response to the network performance data meeting the preset performance standard, determining that a network between the production virtual machine and the placeholder virtual machine is in a normal state;
[0117] In response to the network performance data not meeting the preset performance standard, it is determined that a network between the production virtual machine and the placeholder virtual machine is in an abnormal state.
[0118] In one embodiment, the data backup system further includes a transmission module, and the first determination module is used to determine a first data backup mode according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode, including:
[0119] In response to the network between the production virtual machine and the placeholder virtual machine being in a normal state, determining that the first data backup mode is a memory backup mode, wherein the memory backup mode includes: obtaining incremental snapshot data in the production virtual machine, and saving the incremental snapshot data to the memory of the production virtual machine, and sending the incremental snapshot data in the memory to the placeholder virtual machine for backup through the transmission module;
[0120] In response to the network between the production virtual machine and the placeholder virtual machine being in an abnormal state, it is determined that the first data backup method is a cache backup method, wherein the cache backup method includes: obtaining incremental snapshot data in the production virtual machine, saving the incremental snapshot data to the cache of the production virtual machine, and sending the incremental snapshot data in the cache to the placeholder virtual machine for backup through the transmission module.
[0121] In one embodiment, the second determination module is used to determine a second data backup mode according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode, including:
[0122] In response to the presence of baseline snapshot data in the production virtual machine, determining that the second data backup mode is a differential backup mode, wherein the differential backup mode includes: obtaining full snapshot data in the production virtual machine, comparing the full snapshot data with the baseline snapshot data to obtain differential snapshot data, and sending the differential snapshot data to the placeholder virtual machine for backup through the transmission module;
[0123] In response to the absence of baseline snapshot data in the production virtual machine, it is determined that the second data backup method is a full backup method, wherein the full backup method includes: obtaining the full snapshot data in the production virtual machine, and sending the full snapshot data to the placeholder virtual machine for backup through the transmission module.
[0124] In one embodiment, the apparatus further comprises:
[0125] A generation module, the generation module is used to generate a pair of public keys and private keys in the placeholder virtual machine according to a preset encryption algorithm, and send the public key to the production virtual machine through the transmission module;
[0126] An encryption module, the encryption module is used to encrypt the incremental snapshot data / full snapshot data / difference snapshot data by using the public key to obtain encrypted data;
[0127] The transmission module is also used to send the encrypted data to the placeholder virtual machine through the transmission module;
[0128] A decryption module, the decryption module is used to decrypt the encrypted data using the private key to obtain decrypted data;
[0129] A writing module is used to write the decrypted data into a virtual disk in the placeholder virtual machine.
[0130] In one embodiment, the apparatus further comprises:
[0131] A calculation module, the calculation module is used to calculate the incremental snapshot data / full snapshot data / difference snapshot data sent by the production virtual machine according to a preset verification algorithm to obtain a standard verification value;
[0132] The calculation module is further used to calculate the incremental snapshot data / full snapshot data / difference snapshot data received by the placeholder virtual machine according to the preset verification algorithm to obtain an actual verification value;
[0133] A comparison module, the comparison module is used to compare the actual verification value with the standard verification value to generate a verification result;
[0134] A judgment module, the judgment module being configured to determine, in response to the actual verification value being consistent with the standard verification value, that a verification result of the incremental snapshot data / full snapshot data / difference snapshot data is a successful verification;
[0135] The judgment module is further configured to determine, in response to the actual verification value being inconsistent with the standard verification value, that the verification result of the incremental snapshot data / full snapshot data / difference snapshot data is a verification failure.
[0136] In one embodiment, the apparatus further comprises:
[0137] The monitoring module is also used to monitor the production virtual machine and obtain the operation status data of the production virtual machine;
[0138] a third determination module, the third determination module being configured to determine the operating state of the production virtual machine according to the operating state data;
[0139] The generating module is further configured to generate a data transmission task according to the operating status data in response to an abnormality in the operating status of the production virtual machine, wherein the operating status data includes a failure time period of the production virtual machine and specified snapshot data within the failure time period, and the specified snapshot data includes incremental snapshot data / full snapshot data / difference snapshot data corresponding to the data transmission mode;
[0140] The transmission module is also used to send the data transmission task of the production site to the disaster recovery site according to a preset transmission protocol, wherein the preset transmission protocol includes an identification bit, protocol information and data information;
[0141] The identification bit includes a first identification bit, a second identification bit, a third identification bit and a fourth identification bit, the first identification bit is used to indicate the placeholder virtual machine corresponding to the production virtual machine, the second identification bit is used to indicate the type of the specified snapshot data transmitted by the production site to the disaster recovery site, the third identification bit is used to indicate that the production site notifies the disaster recovery site that the transmission of the specified snapshot data is wrong, and the fourth identification bit is used to indicate that the production site notifies the disaster recovery site that the data transmission task is completed;
[0142] The protocol information includes memory information, cache information and virtual disk information of the production virtual machine, and virtual disk information of the placeholder virtual machine;
[0143] The data information includes the failure time period of the production virtual machine and designated snapshot data.
[0144] For the specific definition of the data backup device, please refer to the definition of the data backup method above, which will not be repeated here. Each module in the above data backup device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0145] Embodiment 3
[0146] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0147] Monitoring the production virtual machine to obtain a data transmission mode of the production virtual machine;
[0148] In response to the data transmission mode being an incremental transmission mode, evaluating a network state between the production virtual machine and the placeholder virtual machine, and determining a first data backup mode according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode;
[0149] In response to the data transmission mode being the full transmission mode, a second data backup mode is determined according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode.
[0150] When the program instructions are read and executed by the one or more processors, the program instructions may also perform operations corresponding to the steps in the above method embodiments, and the above description may be referred to, which will not be repeated here. Figure 4 , which exemplarily shows the architecture of the electronic device, which may specifically include a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, and a memory 420. The processor 410, the video display adapter 411, the disk drive 412, the input / output interface 413, the network interface 414, and the memory 420 may be communicatively connected via a communication bus 430.
[0151] Among them, the processor 410 can be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.
[0152] The memory 420 can be implemented in the form of a read-only memory (ROM), a random access memory (RAM), a static storage device, a dynamic storage device, etc. The memory 420 can store an operating system 421 for controlling the operation of the electronic device 400, and a basic input and output system (BIOS) 422 for controlling the low-level operation of the electronic device 400. In addition, a web browser 423, a data storage manager 424, and an icon font processing system 425, etc. can also be stored. The above-mentioned icon font processing system 425 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 420 and is called and executed by the processor 410.
[0153] The input / output interface 413 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0154] The network interface 414 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0155] The bus 430 comprises a pathway for transmitting information between the various components of the device (eg, the processor 410, the video display adapter 411, the disk drive 412, the input / output interface 413, the network interface 414, and the memory 420).
[0156] In addition, the electronic device 400 can also obtain information on specific collection conditions from the virtual resource object collection condition information database 441 for use in condition judgment, etc.
[0157] It should be noted that, although the electronic device 400 only shows a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, a memory 420, a bus 430, etc., in the specific implementation process, the electronic device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.
[0158] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling an electronic device (which can be a personal computer, a cloud server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0159] Embodiment 4
[0160] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0161] Monitoring the production virtual machine to obtain a data transmission mode of the production virtual machine;
[0162] In response to the data transmission mode being an incremental transmission mode, evaluating a network state between the production virtual machine and the placeholder virtual machine, and determining a first data backup mode according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode;
[0163] In response to the data transmission mode being the full transmission mode, a second data backup mode is determined according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode.
[0164] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0165] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0166] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
[0167] Embodiment 5
[0168] In one embodiment, a computer program product is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0169] Monitoring the production virtual machine to obtain a data transmission mode of the production virtual machine;
[0170] In response to the data transmission mode being an incremental transmission mode, evaluating a network state between the production virtual machine and the placeholder virtual machine, and determining a first data backup mode according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode;
[0171] In response to the data transmission mode being the full transmission mode, a second data backup mode is determined according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode.
[0172] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a computer program product. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0173] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0174] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data backup method, applied to a data backup system, wherein the data backup system includes a production site and a disaster recovery site, wherein a production virtual machine is deployed in the production site, and a corresponding placeholder virtual machine is deployed in the disaster recovery site, wherein the placeholder virtual machine is used to perform data backup on the production virtual machine, and wherein: The method comprises: Monitoring the production virtual machine to obtain a data transmission mode of the production virtual machine; In response to the data transmission mode being an incremental transmission mode, evaluating a network state between the production virtual machine and the placeholder virtual machine, and determining a first data backup mode according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode; In response to the data transmission mode being the full transmission mode, a second data backup mode is determined according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode.
2. The method according to claim 1, characterized in that: The evaluating the network status between the production virtual machine and the placeholder virtual machine includes: Acquire preset network indicators, and monitor the network performance between the production virtual machine and the placeholder virtual machine based on the preset network indicators to obtain network performance data, wherein the preset network indicators include at least one of network transmission bandwidth, network transmission delay, network transmission packet loss rate, and network transmission throughput; Obtaining a preset performance standard, and determining whether the network performance data meets the preset performance standard; In response to the network performance data meeting the preset performance standard, determining that a network between the production virtual machine and the placeholder virtual machine is in a normal state; In response to the network performance data not meeting the preset performance standard, it is determined that a network between the production virtual machine and the placeholder virtual machine is in an abnormal state.
3. The method according to claim 2, characterized in that: The data backup system further includes a transmission module, wherein the first data backup mode is determined according to the network state, wherein the first data backup mode is a memory backup mode or a cache backup mode, including: In response to the network between the production virtual machine and the placeholder virtual machine being in a normal state, determining that the first data backup mode is a memory backup mode, wherein the memory backup mode includes: obtaining incremental snapshot data in the production virtual machine, and saving the incremental snapshot data to the memory of the production virtual machine, and sending the incremental snapshot data in the memory to the placeholder virtual machine for backup through the transmission module; In response to the network between the production virtual machine and the placeholder virtual machine being in an abnormal state, it is determined that the first data backup method is a cache backup method, wherein the cache backup method includes: obtaining incremental snapshot data in the production virtual machine, saving the incremental snapshot data to the cache of the production virtual machine, and sending the incremental snapshot data in the cache to the placeholder virtual machine for backup through the transmission module.
4. The method according to claim 3, characterized in that: Determining a second data backup mode according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup mode is a differential backup mode or a full backup mode, including: In response to the presence of baseline snapshot data in the production virtual machine, determining that the second data backup mode is a differential backup mode, wherein the differential backup mode includes: obtaining full snapshot data in the production virtual machine, comparing the full snapshot data with the baseline snapshot data to obtain differential snapshot data, and sending the differential snapshot data to the placeholder virtual machine for backup through the transmission module; In response to the absence of baseline snapshot data in the production virtual machine, it is determined that the second data backup method is a full backup method, wherein the full backup method includes: obtaining the full snapshot data in the production virtual machine, and sending the full snapshot data to the placeholder virtual machine for backup through the transmission module.
5. The method according to claim 4, characterized in that: The method further comprises: Generate a pair of public and private keys in the placeholder virtual machine according to a preset encryption algorithm, and send the public key to the production virtual machine through the transmission module; Encrypting the incremental snapshot data / full snapshot data / difference snapshot data by using the public key to obtain encrypted data, and sending the encrypted data to the placeholder virtual machine by using the transmission module; The encrypted data is decrypted by using the private key to obtain decrypted data, and the decrypted data is written into the virtual disk in the placeholder virtual machine.
6. The method according to claim 4, characterized in that: The method further comprises: The incremental snapshot data / full snapshot data / difference snapshot data sent by the production virtual machine are calculated according to a preset verification algorithm to obtain a standard verification value; Calculate the incremental snapshot data / full snapshot data / difference snapshot data received by the placeholder virtual machine according to the preset verification algorithm to obtain an actual verification value; Compare the actual verification value with the standard verification value to generate a verification result; In response to the actual check value being consistent with the standard check value, determining that the check result of the incremental snapshot data / full snapshot data / difference snapshot data is a successful check; In response to the actual check value being inconsistent with the standard check value, it is determined that the check result of the incremental snapshot data / full snapshot data / difference snapshot data is a check failure.
7. The method according to claim 1, characterized in that: The method comprises: Monitoring the production virtual machine, obtaining operation status data of the production virtual machine, and determining the operation status of the production virtual machine according to the operation status data; In response to an abnormality in the running state of the production virtual machine, a data transmission task is generated according to the running state data, wherein the running state data includes a failure time period of the production virtual machine and specified snapshot data within the failure time period, and the specified snapshot data includes incremental snapshot data / full snapshot data / difference snapshot data corresponding to the data transmission mode; According to a preset transmission protocol, the data transmission task of the production site is sent to the disaster recovery site, wherein the preset transmission protocol includes an identification bit, protocol information and data information; The identification bit includes a first identification bit, a second identification bit, a third identification bit and a fourth identification bit, the first identification bit is used to indicate the placeholder virtual machine corresponding to the production virtual machine, the second identification bit is used to indicate the type of the specified snapshot data transmitted by the production site to the disaster recovery site, the third identification bit is used to indicate that the production site notifies the disaster recovery site that the transmission of the specified snapshot data is wrong, and the fourth identification bit is used to indicate that the production site notifies the disaster recovery site that the data transmission task is completed; The protocol information includes memory information, cache information and virtual disk information of the production virtual machine, and virtual disk information of the placeholder virtual machine; The data information includes the failure time period of the production virtual machine and designated snapshot data.
8. A data backup device, characterized in that: The device comprises: A monitoring module, the monitoring module is used to monitor the production virtual machine and obtain the data transmission mode of the production virtual machine; an evaluation module, the evaluation module being configured to evaluate a network status between the production virtual machine and the placeholder virtual machine in response to the data transmission mode being an incremental data transmission mode; a first determining module, the first determining module being configured to determine a first data backup mode according to the network state in response to the data transmission mode being the incremental data transmission mode, wherein the first data backup mode includes a memory backup mode and a cache backup mode; The second determination module is used to determine the second data backup method in response to the data transmission mode being the full data transmission mode, according to whether there is baseline snapshot data in the production virtual machine, wherein the second data backup method includes a differential backup method and a full backup method.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data transmission control method and device based on eMBMS and electronic equipment
CN111328136A
Virtual machine disk data backup method and device, terminal and storage medium
CN113626256A
Backup method, disaster recovery method, device and equipment of virtual machine
CN115098299A
Data processing method and device, storage medium and management server
CN117033087A
Virtual machine disaster recovery protection method and device, electronic equipment and storage medium
CN117389692A
Cited By
Data backup method, device, equipment, medium and computer program product
CN121210216A