CN117033082A - Virtual machine backup recovery method and device, computer equipment and storage medium - Google Patents
Virtual machine backup recovery method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN117033082A CN117033082A CN202311125851.4A CN202311125851A CN117033082A CN 117033082 A CN117033082 A CN 117033082A CN 202311125851 A CN202311125851 A CN 202311125851A CN 117033082 A CN117033082 A CN 117033082A
- Authority
- CN
- China
- Prior art keywords
- file
- virtual machine
- backup
- score
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000011084 recovery Methods 0.000 title claims abstract description 61
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000006978 adaptation Effects 0.000 claims abstract description 45
- 238000004590 computer program Methods 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 4
- 230000001360 synchronised effect Effects 0.000 abstract description 3
- 238000012549 training Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 8
- 238000012545 processing Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000006854 communication Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000013527 convolutional neural network Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000004308 accommodation Effects 0.000 description 2
- 230000007175 bidirectional communication Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1464—Management of the backup or restore process for networked environments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a virtual machine backup recovery method, a device, computer equipment and a storage medium, comprising the following steps: analyzing platform information and virtual machine attribute information from the backup recovery request; inputting platform information into a pre-constructed virtualized platform adaptation model, and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model; determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface; initializing a target virtual machine and creating a bitmap of a first virtual disk corresponding to a source virtual machine; generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk; the plurality of incremental backup files are synchronized to the target virtual machine based on the file attribute information. According to the application, the target virtual machine can be automatically created through the target application interface, and the created target virtual machine meets preset virtual machine attributes and is matched with the current virtualization platform.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a virtual machine backup recovery method, a device, a computer device, and a storage medium.
Background
With the rapid development of cloud computing technology, virtualization technology has also developed rapidly, and virtual machines are the focus of virtualization technology implementation. The virtual machine may fail for a plurality of reasons during operation, and in order to avoid loss of user data, data backup and recovery of the virtual machine are required. The existing virtual machine backup and recovery method is generally as follows: and backing up the disk files in the source virtual machine, manually filling in the name of the target virtual machine aiming at the backup files, and then synchronizing the backup files to the disk of the target virtual machine. In the backup and recovery process, the target virtual machine needs to be filled manually, the operation is complex, and the problem that the manually filled target virtual machine is not matched with the current virtualization platform exists.
Disclosure of Invention
The embodiment of the application provides a virtual machine backup recovery method, a device, computer equipment and a storage medium, wherein a target virtual machine can be automatically created through a target application interface, and the created target virtual machine meets preset virtual machine attributes and is matched with a current virtualization platform.
In one aspect, the present application provides a virtual machine backup recovery method, including:
receiving a backup recovery request aiming at a source virtual machine, and analyzing platform information and virtual machine attribute information from the backup recovery request;
inputting platform information into a pre-constructed virtualized platform adaptation model, and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model; the method comprises the steps that API interfaces of a plurality of virtualization platforms are stored in a virtualization platform adaptation model, and a plurality of candidate application interfaces are API interfaces which are output by the virtualization platform adaptation model and are matched with platform information;
determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface;
initializing a target virtual machine and creating a bitmap of a first virtual disk corresponding to a source virtual machine;
generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk;
and acquiring file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information so as to realize recovery of the plurality of incremental backup files.
In some embodiments of the present application, the virtual machine attribute information includes virtual machine capacity information and virtual machine type information, and determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information includes:
determining a target interface score of each candidate application interface based on the virtual machine capacity information and the virtual machine type information;
a target application interface is determined from the plurality of candidate application interfaces based on the target interface score.
In some embodiments of the present application, the virtual machine capacity information includes processor capacity information, memory capacity information, and bandwidth capacity information, and determining a target interface score for each candidate application interface based on the virtual machine capacity information and the virtual machine type information includes:
based on the processor capacity information, the memory capacity information, the bandwidth capacity information and the virtual machine type information, determining a first interface score, a second interface score, a third interface score and a fourth interface score of each candidate application interface respectively;
a target interface score for each candidate application interface is determined based on the first interface score, the second interface score, the third interface score, and the fourth interface score.
In some embodiments of the present application, generating a plurality of incremental backup files corresponding to a first virtual disk based on a bitmap of the first virtual disk includes:
Acquiring a current backup incremental bitmap and a historical backup incremental bitmap of the first virtual disk, and determining the incremental bitmap of the first virtual disk according to the current backup incremental bitmap and the historical backup incremental bitmap;
copying the data blocks corresponding to the incremental bitmap in the first virtual disk to a pre-constructed storage pool to generate a plurality of incremental backup files corresponding to the first virtual disk.
In some embodiments of the present application, the target virtual machine includes a plurality of second virtual disks, the plurality of second virtual disks respectively corresponding to a plurality of temporary merge areas constructed in advance, and synchronizing a plurality of incremental backup files to the target virtual machine based on file attribute information, including:
acquiring the accommodating data type and the accommodating data volume of each second virtual disk in the plurality of second virtual disks;
determining a second virtual disk corresponding to each incremental backup file from the plurality of second virtual disks based on the file attribute information, the accommodating data type and the accommodating data amount;
sending each incremental backup file to a temporary merging area of a second virtual disk corresponding to each incremental backup file for merging to obtain a first merging file corresponding to each second virtual disk;
And synchronizing the first combined file corresponding to each second virtual disk.
In some embodiments of the present application, the file attribute information includes a file type, a file keyword, a file data amount, a file privacy level, and a file importance level, and determining a second virtual disk corresponding to each incremental backup file from the plurality of second virtual disks based on the file attribute information, the accommodated data type, and the accommodated data amount includes:
based on the file type, the file keyword, the file privacy level and the file importance level, determining a first file score, a second file score, a third file score and a fourth file score of each incremental backup file respectively;
determining a target file score for each incremental backup file based on the first file score, the second file score, the third file score, and the fourth file score;
and determining a second virtual disk corresponding to each incremental backup file from the plurality of second virtual disks based on the target file score, the file data amount, the accommodated data type and the accommodated data amount.
In some embodiments of the present application, initializing a target virtual machine includes:
copying the data blocks in the first virtual disk to a storage pool to generate a plurality of full-volume backup files corresponding to the first virtual disk;
Determining a second virtual disk corresponding to each full-back file from a plurality of second virtual disks based on the file attribute information, the accommodating data type and the accommodating data amount of each full-back file;
sending each full-volume backup file to a temporary merging area of a second virtual disk corresponding to each full-volume backup file for merging to obtain a second merging file corresponding to each second virtual disk;
and synchronizing the second combined file corresponding to each second virtual disk.
In another aspect, the present application provides a virtual machine backup recovery apparatus, including:
the information analysis unit is used for receiving a backup recovery request aiming at the source virtual machine and analyzing platform information and virtual machine attribute information from the backup recovery request;
the interface determining unit is used for inputting the platform information into a pre-constructed virtualized platform adaptation model and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model; the method comprises the steps that API interfaces of a plurality of virtualization platforms are stored in a virtualization platform adaptation model, and a plurality of candidate application interfaces are API interfaces which are output by the virtualization platform adaptation model and are matched with platform information;
the virtual machine creation unit is used for determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information and creating a target virtual machine based on the target application interface;
The bitmap construction unit is used for initializing the target virtual machine and creating a bitmap of the first virtual disk corresponding to the source virtual machine;
the file backup unit is used for generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk;
and the backup restoring unit is used for acquiring the file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information so as to restore the plurality of incremental backup files.
In another aspect, the present application also provides a computer device, including:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in memory and configured to be executed by a processor to implement the virtual machine backup restoration method of any of the first aspects.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program to be loaded by a processor to perform the steps of the virtual machine backup restoration method of any of the first aspects.
According to the application, a plurality of candidate application interfaces are output through platform information and a pre-built virtualization platform adaptation model, a target application interface is determined from the plurality of candidate application interfaces based on virtual machine attribute information, a target virtual machine is established based on the target application interface, the target virtual machine can be automatically established through the target application interface, and the established target virtual machine meets the preset virtual machine attribute and is adapted to the current virtualization platform; the incremental backup is carried out based on the bitmap of the first virtual disk, and the bitmap is recorded in the memory instead of the disk, so that the incremental backup of disk files in any format can be supported; based on the file attribute information, synchronizing the plurality of incremental backup files to the target virtual machine, and classifying and recovering the incremental backup files with different attributes can be realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of a virtual machine backup and restore system according to an embodiment of the present application;
FIG. 2 is a flowchart of an embodiment of a virtual machine backup recovery method provided in an embodiment of the present application;
FIG. 3 is a flowchart of a specific embodiment of a virtual machine backup and restore method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of an embodiment of a virtual machine backup and restore device according to the present application;
FIG. 5 is a schematic diagram of an embodiment of a computer device provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the drawings are merely for convenience in describing the present application and simplifying the description, and do not indicate or imply that the apparatus or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the present application, the term "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described as "exemplary" in this disclosure is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes have not been described in detail so as not to obscure the description of the application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
It should be noted that, because the method of the embodiment of the present application is executed in the computer device, the processing objects of each computer device exist in the form of data or information, for example, time, which is essentially time information, it can be understood that in the subsequent embodiment, if the size, the number, the position, etc. are all corresponding data, so that the computer device can process the data, which is not described herein in detail.
The embodiment of the application provides a virtual machine backup recovery method, a virtual machine backup recovery device, computer equipment and a storage medium, and the method, the device and the storage medium are respectively described in detail below.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of a virtual machine backup and restore system provided by an embodiment of the present application, where the virtual machine backup and restore system may include a computer device 100, and a virtual machine backup and restore apparatus, such as the computer device in fig. 1, is integrated in the computer device 100.
In the embodiment of the present application, the computer device 100 is mainly configured to receive a backup recovery request for a source virtual machine, and parse platform information and virtual machine attribute information from the backup recovery request; inputting platform information into a pre-constructed virtualized platform adaptation model, and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model; determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface; initializing a target virtual machine and creating a bitmap of a first virtual disk corresponding to a source virtual machine; generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk; the method comprises the steps of acquiring file attribute information of each incremental backup file in a plurality of incremental backup files, synchronizing the plurality of incremental backup files to a target virtual machine based on the file attribute information so as to restore the plurality of incremental backup files, realizing file backup of a webpage application program, and carrying out priority backup on files with higher privacy degree and higher importance degree.
In the embodiment of the present application, the computer device 100 may be an independent server, or may be a server network or a server cluster formed by servers, for example, the computer device 100 described in the embodiment of the present application includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a cloud server formed by a plurality of servers. Wherein the Cloud server is composed of a large number of computers or web servers based on Cloud Computing (Cloud Computing).
It is to be understood that the computer device 100 used in embodiments of the present application may be a device that includes both receive and transmit hardware, i.e., a device having receive and transmit hardware capable of performing bi-directional communications over a bi-directional communication link. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The computer device 100 may be a desktop terminal or a mobile terminal, and the computer device 100 may be one of a mobile phone, a tablet computer, a notebook computer, and the like.
Those skilled in the art will appreciate that the application environment shown in fig. 1 is merely an application scenario of the present application, and is not limited to the application scenario of the present application, and other application environments may further include more or fewer computer devices than those shown in fig. 1, for example, only 1 computer device is shown in fig. 1, and it will be appreciated that the virtual machine backup recovery system may further include one or more other services, which are not limited herein.
In addition, as shown in fig. 1, the virtual machine backup and restore system may further include a memory 200 for storing data, such as attribute information, e.g., file attributes, file types, file keywords, such as virtual machine capacity information, e.g., processor capacity information, memory capacity information, bandwidth capacity information, etc.
It should be noted that, the schematic view of the scenario of the virtual machine backup and restore system shown in fig. 1 is only an example, and the virtual machine backup and restore system and scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided by the embodiments of the present application, and as a person of ordinary skill in the art can know that, along with the evolution of the virtual machine backup and restore system and the appearance of a new service scenario, the technical solution provided by the embodiments of the present application is equally applicable to similar technical problems.
Firstly, in the embodiment of the present application, a virtual machine backup and restore method is provided, an execution body of the virtual machine backup and restore method is a virtual machine backup and restore device, the virtual machine backup and restore device is applied to a computer device, and the virtual machine backup and restore method includes: receiving a backup recovery request aiming at a source virtual machine, and analyzing platform information and virtual machine attribute information from the backup recovery request; inputting platform information into a pre-constructed virtualized platform adaptation model, and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model; determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface; initializing a target virtual machine and creating a bitmap of a first virtual disk corresponding to a source virtual machine; generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk; and acquiring file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information so as to realize recovery of the plurality of incremental backup files.
Fig. 2 is a schematic flow chart of an embodiment of a backup recovery method in an embodiment of the present application, where the backup recovery method for a virtual machine includes:
s100, receiving a backup recovery request aiming at the source virtual machine, and analyzing the platform information and the virtual machine attribute information from the backup recovery request.
Specifically, the backup recovery refers to a process of backing up a disk file in a source virtual machine and recovering the backup file in a target virtual machine, and the virtual machine attribute information refers to attribute information of the target virtual machine, where the virtual machine attribute information includes, but is not limited to, virtual machine capacity information of the target virtual machine, virtual machine type information of the target virtual machine, and the like. The platform information refers to a type of virtualization platform that can manage the target virtual machine, for example, the platform information may be a virtualization platform underlying a Kernel-based virtual machine (Kernel-based Virtual Machine, KVM).
The backup recovery request is a backup recovery instruction for a source virtual machine sent by a user to the computer device, where the backup recovery request includes, but is not limited to, a touch instruction, a mouse instruction, a remote control instruction, a voice instruction, and the like, for example, when the user wants to perform backup recovery on a disk file in a certain virtual machine, the user directly clicks an icon of the virtual machine on the touch screen, or the user clicks an icon of the virtual machine on the touch screen through a mouse, or the user sends a voice instruction of "performing backup recovery on a file of the virtual machine". After a user sends a backup recovery request for a source virtual machine to computer equipment, the computer acquires the backup recovery request, and analyzes platform information and virtual machine attribute information from the backup recovery request.
S200, inputting platform information into a pre-constructed virtualized platform adaptation model, outputting a plurality of candidate application interfaces through the virtualized platform adaptation model, wherein the virtualized platform adaptation model accommodates API interfaces of a plurality of virtualized platforms, and the plurality of candidate application interfaces are the API interfaces which are output by the virtualized platform adaptation model and are matched with the platform information.
The plurality of candidate application interfaces are API interfaces which are output by the virtualization platform adaptation model and are matched with the platform information, the virtualization platform adaptation model is a model which is constructed in advance and is used for outputting the API interfaces matched with the platform information, most of the API interfaces of the virtualization platform taking the KVM as the bottom layer are contained in the virtualization platform adaptation model, and only the virtualization platform taking the KVM as the bottom layer can carry out virtual machine backup recovery by adopting the virtual machine backup recovery method.
S300, determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface.
The target application interface is an API interface for creating a target virtual machine, in this embodiment, after outputting a plurality of candidate application interfaces through the virtualization platform adaptation model, the target application interface is determined from the plurality of candidate application interfaces based on the virtual machine attribute information, and the target virtual machine is created based on the target application interface, where in this embodiment, the target virtual machine adapted to the current virtualization platform and the virtual machine attribute information can be created based on the target application interface.
In one embodiment, step S300 includes:
s310, determining a target interface score of each candidate application interface based on the virtual machine capacity information and the virtual machine type information;
s320, determining a target application interface from a plurality of candidate application interfaces based on the target interface score.
In a specific implementation, the virtual machine attribute information includes virtual machine capacity information and virtual machine type information, where the virtual machine capacity information includes, but is not limited to, capacity of a central processing unit CPU, memory capacity, bandwidth capacity, hard disk capacity, I/O capacity, and the like, and the virtual machine type information includes, but is not limited to, serial number identification of the virtual machine, and the like. The target interface score is a total score of each candidate application interface determined based on the virtual machine capacity information and the virtual machine type information, the target interface score can represent the adaptation degree of a plurality of candidate application interfaces to the virtual machine capacity information and the virtual machine type information, specifically, the higher the target interface score is, the higher the adaptation degree of the plurality of candidate application interfaces to the virtual machine capacity information and the virtual machine type information is; conversely, the lower the target interface score, the lower the degree of adaptation of the plurality of candidate application interfaces to the virtual machine capacity information and the virtual machine type information.
After a plurality of candidate application interfaces are output through a virtualization platform adaptation model, determining a target interface score of each candidate application interface based on virtual machine capacity information and virtual machine type information, and then selecting a candidate application interface with the highest target interface score from the plurality of candidate application interfaces as a target application interface. For example, if the target interface scores of the candidate application interface a, the candidate application interface B, and the candidate application interface C are 0.5, 0.9, and 0.8, respectively, the candidate application interface B is determined as the target application interface.
In one embodiment, step S310 includes:
s311, based on the processor capacity information, the memory capacity information, the bandwidth capacity information and the virtual machine type information, determining a first interface score, a second interface score, a third interface score and a fourth interface score of each candidate application interface respectively;
s312, determining a target interface score of each candidate application interface based on the first interface score, the second interface score, the third interface score and the fourth interface score.
In a specific embodiment, the virtual machine capacity information includes processor capacity information, memory capacity information and bandwidth capacity information, and the first interface score, the second interface score, the third interface score and the fourth interface score are respectively used for characterizing the adaptation degree of the processor capacity information, the memory capacity information, the bandwidth capacity information and the virtual machine type information to each candidate application interface. When determining the target interface score of each candidate application interface, the embodiment first determines the first interface score, the second interface score, the third interface score and the fourth interface score of each candidate application interface based on the processor capacity information, the memory capacity information, the bandwidth capacity information and the virtual machine type information, and then determines the target interface score of each candidate application interface based on the first interface score, the second interface score, the third interface score and the fourth interface score.
Further, when determining the target interface score based on the first interface score, the second interface score, the third interface score, and the fourth interface score, the first interface score, the second interface score, the third interface score, and the fourth interface score may be summed, or the first interface score, the second interface score, the third interface score, and the fourth interface score may be weighted and summed, or the first interface score, the second interface score, the third interface score, and the fourth interface score may be averaged after summing, which is not limited in the present application.
In a specific implementation manner, when determining the first interface score, the second interface score, the third interface score, and the fourth interface score based on the processor capacity information, the memory capacity information, the bandwidth capacity information, the virtual machine type information, and the virtual machine type information, the processor capacity information, the memory capacity information, the bandwidth capacity information, the virtual machine type information, and the plurality of candidate application interfaces may be input into a pre-trained prediction model, and the first interface score, the second interface score, the third interface score, and the fourth interface score of each candidate application interface may be output through the prediction model.
The prediction model is obtained by training a preset network model based on a preset training sample set, and the preset network model can be a deep learning model or a machine learning model, for example, a convolutional neural network (Convolutional Neural Networks, CNN), a deconvolution neural network (De-Convolutional Networks, DN), and the like.
Further, the training sample set includes a plurality of sets of training data, a plurality of application interfaces, and a true score of each application interface under each set of training data, each set of training data including processor capacity information, memory capacity information, bandwidth capacity information, and virtual machine type information. When training the preset network model, firstly inputting a plurality of groups of training data and a plurality of application interfaces in a training sample set into the preset network model, outputting a predicted score of each group of training data under each application interface through the preset network model, then determining a loss value according to a real score, the predicted score and a loss function of the preset network model, when the loss value does not meet preset conditions, correcting model parameters of the preset network model according to a preset parameter learning rate, and continuously executing the step of outputting the predicted score of each group of training data under each application interface through the preset network model until the loss value meets the preset conditions, thereby obtaining the predicted model. The loss value meeting the preset condition may be that the loss value is smaller than a preset first threshold, or that a difference value between two obtained loss values is smaller than a preset second threshold.
S400, initializing a target virtual machine and creating a bitmap of a first virtual disk corresponding to the source virtual machine.
The initialization of the target virtual machine is to restore the full-volume backup of the data in the source virtual machine to the target virtual machine, so as to build a standby environment which is preliminarily consistent with the source virtual machine through the full-volume backup restoration. After creating a bitmap (bitmap) of a first virtual disk corresponding to the source virtual machine, the bitmap exists in the memory, the count attribute of the bitmap is 0, and when data in the first virtual disk changes, the bitmap records the change, and the count attribute of the bitmap increases. Therefore, based on the bitmap of the first virtual disk, incremental data in the first virtual disk can be determined, and in this embodiment, incremental backup is performed based on the bitmap, and compared with the existing incremental backup mode based on external snapshot, because the bitmap is recorded in the memory instead of the disk, any type of underlying disk, such as a local disk, a ceph rbd, and the like, and at the same time, disk formats of any format, such as qcow2, raw, and the like, can be supported.
S500, generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk.
The plurality of incremental backup files are backup files obtained by performing incremental backup on data in the first virtual disk. After creating a bitmap of a first virtual disk corresponding to a source virtual machine, the embodiment performs incremental backup on data in the first virtual disk based on the bitmap of the first virtual disk to obtain a plurality of incremental backup files corresponding to the first virtual disk.
In one embodiment, step S500 includes:
s510, acquiring a current backup incremental bitmap and a historical backup incremental bitmap of the first virtual disk, and determining the incremental bitmap of the first virtual disk according to the current backup incremental bitmap and the historical backup incremental bitmap;
and S520, copying the data blocks corresponding to the incremental bitmap in the first virtual disk to a pre-constructed storage pool to generate a plurality of incremental backup files corresponding to the first virtual disk.
When generating a plurality of incremental backup files corresponding to the first virtual disk, the embodiment first obtains the current backup incremental bitmap and the historical backup incremental bitmap of the first virtual disk, determines the incremental bitmap of the first virtual disk according to the current backup incremental bitmap and the historical backup incremental bitmap, and copies the data blocks corresponding to the incremental bitmap in the first virtual disk to a pre-built storage pool to generate a plurality of incremental backup files corresponding to the first virtual disk.
S600, acquiring file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information so as to realize recovery of the plurality of incremental backup files.
Each incremental backup file has corresponding file attribute information including, but not limited to, file type, file keywords, file data size, file privacy level, file importance level, and the like. After generating a plurality of incremental backup files, the embodiment obtains file attribute information of each incremental backup file in the plurality of incremental backup files, and then synchronizes the plurality of incremental backup files to the target virtual machine based on the file attribute information, so that incremental data in the source virtual machine are synchronized to the target virtual machine, and when the source virtual machine fails, the target virtual machine can be used for replacing the source virtual machine to provide services to the outside.
In one embodiment, the step of synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information in step S600 includes:
s610, acquiring the accommodating data type and the accommodating data volume of each second virtual disk in the plurality of second virtual disks;
S620, determining a second virtual disk corresponding to each incremental backup file from a plurality of second virtual disks based on file attribute information, accommodating data types and accommodating data amounts;
s630, sending each incremental backup file to a temporary merging area of a second virtual disk corresponding to each incremental backup file for merging to obtain a first merging file corresponding to each second virtual disk;
s640, synchronizing the first combined file corresponding to each second virtual disk.
The target virtual machine comprises a plurality of second virtual disks, the accommodating data type is the type of file data which can be stored by each second virtual disk, the accommodating data type comprises, but is not limited to, pictures, videos, texts and the like, and the accommodating data amount is the data amount of the file data which can be further accommodated by each second virtual disk currently. As shown in fig. 3, in order to implement file data merging, in this embodiment, a plurality of temporary merging areas are also pre-constructed, where the plurality of temporary merging areas respectively correspond to the plurality of second virtualized disks.
Specifically, when synchronizing multiple incremental backup files to a target virtual machine based on file attribute information, the embodiment first obtains an accommodating data type and an accommodating data amount of each second virtual disk in multiple second virtual disks, then determines a second virtual disk corresponding to each incremental backup file from the multiple second virtual disks based on the file attribute information, the accommodating data type and the accommodating data amount, then sends each incremental backup file to a temporary merging area of the second virtual disk corresponding to each incremental backup file for merging, obtains a first merging file corresponding to each second virtual disk, and finally synchronizes the first merging file corresponding to each second virtual disk.
In one embodiment, step S620 includes:
s621, respectively determining a first file score, a second file score, a third file score and a fourth file score of each incremental backup file based on the file type, the file keyword, the file privacy level and the file importance level;
s622, determining a target file score of each incremental backup file based on the first file score, the second file score, the third file score and the fourth file score;
s623, determining a second virtual disk corresponding to each incremental backup file from the plurality of second virtual disks based on the target file score, the file data volume, the accommodated data type and the accommodated data volume.
In a specific implementation manner, when determining the second virtual disk corresponding to each incremental backup file, the file attribute information includes a file type, a file keyword, a file data amount, a file privacy level, and a file importance level, first, second, third, and fourth file scores of each incremental backup file may be determined based on the file type, the file keyword, the file privacy level, and the file importance level, then, a target file score of each incremental backup file is determined based on the first, second, third, and fourth file scores, and finally, the second virtual disk corresponding to each incremental backup file is determined from the plurality of second virtual disks based on the target file score, the file data amount, the accommodation data type, and the accommodation data amount. For example, the target file scores of the incremental backup files a are respectively 0.85, the second virtual disk a and the second virtual disk B can accommodate the incremental backup files with the target file scores between 0.8 and 0.9, but the accommodating data volume of the second virtual disk B is smaller than the data volume of the incremental backup files a, and the second virtual disk a is determined to be the second virtual disk corresponding to the incremental backup files a.
Further, before determining the first file score, the second file score, the third file score and the fourth file score of each incremental backup file, a corresponding relationship between the file type and the first file score, a corresponding relationship between the file keyword and the second file score, a corresponding relationship between the file privacy level and the third file score, and a corresponding relationship between the file importance level and the fourth file score may be preset, for example, the privacy level a, the privacy level B, and the privacy level C respectively correspond to the third file score A1, the third file score A2, the third file score A3, and the importance level B1, the importance level B2, and the importance level B3 respectively correspond to the fourth file score A4, the fourth file score A5, and the fourth file score A6. After the file type, the file keyword, the file privacy level and the file importance level are obtained, the first file score, the second file score, the third file score and the fourth file score of each incremental backup file can be determined based on the file type, the file keyword, the file privacy level, the file importance level and the preset corresponding relation.
When determining the target file score based on the first file score, the second file score, the third file score and the fourth file score, the first file score, the second file score, the third file score and the fourth file score may be summed, or the first file score, the second file score, the third file score and the fourth file score may be weighted and summed, or the first file score, the second file score, the third file score and the fourth file score may be averaged after summing, which is not limited in the present application.
In one embodiment, the initializing the target virtual machine in step S400 includes:
s410, copying the data blocks in the first virtual disk to a storage pool to generate a plurality of full backup files corresponding to the first virtual disk;
s420, determining a second virtual disk corresponding to each full-volume backup file from a plurality of second virtual disks based on the file attribute information, the accommodating data type and the accommodating data volume of each full-volume backup file;
s430, sending each full-volume backup file to a temporary merging area of a second virtual disk corresponding to each full-volume backup file for merging to obtain a second merging file corresponding to each second virtual disk;
s440, synchronizing the second combined file corresponding to each second virtual disk.
When the target virtual machine is virtualized, the data blocks in the first virtual disk are copied to the storage pool to generate a plurality of full-volume backup files corresponding to the first virtual disk, then the second virtual disk corresponding to each full-volume backup file is determined from the plurality of second virtual disks based on the file attribute information, the accommodating data type and the accommodating data volume of each full-volume backup file, then each full-volume backup file is sent to the temporary merging area of the second virtual disk corresponding to each full-volume backup file to be merged, a second merging file corresponding to each second virtual disk is obtained, and finally the second merging file corresponding to each second virtual disk is synchronized to each second virtual disk. The step of determining the second virtual disk corresponding to each full-backed up file from the plurality of second virtual disks based on the file attribute information, the accommodated data type and the accommodated data amount of each full-backed up file is the same as the step of S620, and the step of S620 may be referred to specifically, and the application is not repeated herein.
In order to better implement the virtual machine backup and restore method in the embodiment of the present application, on the basis of the virtual machine backup and restore method, the embodiment of the present application further provides a virtual machine backup and restore device, as shown in fig. 4, where the virtual machine backup and restore device 700 includes:
an information parsing unit 701, configured to receive a backup recovery request for a source virtual machine, and parse platform information and virtual machine attribute information from the backup recovery request;
an interface determining unit 702, configured to input platform information into a virtualized platform adaptation model constructed in advance, and output a plurality of candidate application interfaces through the virtualized platform adaptation model; the method comprises the steps that API interfaces of a plurality of virtualization platforms are stored in a virtualization platform adaptation model, and a plurality of candidate application interfaces are API interfaces which are output by the virtualization platform adaptation model and are matched with platform information;
a virtual machine creation unit 703 for determining a target application interface from among the plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface;
the bitmap construction unit 704 is configured to initialize a target virtual machine and create a bitmap of a first virtual disk corresponding to the source virtual machine;
a file backup unit 705, configured to generate a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk;
The backup restoring unit 706 is configured to obtain file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronize the plurality of incremental backup files to the target virtual machine based on the file attribute information, so as to achieve restoration of the plurality of incremental backup files.
In the embodiment of the application, a plurality of candidate application interfaces are output through platform information and a pre-built virtualization platform adaptation model, a target application interface is determined from the plurality of candidate application interfaces based on virtual machine attribute information, a target virtual machine is established based on the target application interface, the target virtual machine can be automatically established through the target application interface, and the established target virtual machine meets the preset virtual machine attribute and is adapted to the current virtualization platform; the incremental backup is carried out based on the bitmap of the first virtual disk, and the bitmap is recorded in the memory instead of the disk, so that the incremental backup of disk files in any format can be supported; based on the file attribute information, synchronizing the plurality of incremental backup files to the target virtual machine, and classifying and recovering the incremental backup files with different attributes can be realized.
In some embodiments of the present application, the virtual machine attribute information includes virtual machine capacity information and virtual machine type information, and the virtual machine creation unit 703 is specifically configured to:
Determining a target interface score of each candidate application interface based on the virtual machine capacity information and the virtual machine type information;
a target application interface is determined from the plurality of candidate application interfaces based on the target interface score.
In some embodiments of the present application, the virtual machine capacity information includes processor capacity information, memory capacity information, and bandwidth capacity information, and the virtual machine creation unit 703 is specifically further configured to:
based on the processor capacity information, the memory capacity information, the bandwidth capacity information and the virtual machine type information, determining a first interface score, a second interface score, a third interface score and a fourth interface score of each candidate application interface respectively;
a target interface score for each candidate application interface is determined based on the first interface score, the second interface score, the third interface score, and the fourth interface score.
In some embodiments of the present application, the file backup unit 705 is specifically configured to:
acquiring a current backup incremental bitmap and a historical backup incremental bitmap of the first virtual disk, and determining the incremental bitmap of the first virtual disk according to the current backup incremental bitmap and the historical backup incremental bitmap;
copying the data blocks corresponding to the incremental bitmap in the first virtual disk to a pre-constructed storage pool to generate a plurality of incremental backup files corresponding to the first virtual disk.
In some embodiments of the present application, the target virtual machine includes a plurality of second virtual disks, where the plurality of second virtual disks respectively correspond to a plurality of temporary merge areas constructed in advance, and the backup recovery unit 706 is specifically configured to:
acquiring the accommodating data type and the accommodating data volume of each second virtual disk in the plurality of second virtual disks;
determining a second virtual disk corresponding to each incremental backup file from the plurality of second virtual disks based on the file attribute information, the accommodating data type and the accommodating data amount;
sending each incremental backup file to a temporary merging area of a second virtual disk corresponding to each incremental backup file for merging to obtain a first merging file corresponding to each second virtual disk;
and synchronizing the first combined file corresponding to each second virtual disk.
In some embodiments of the present application, the file attribute information includes a file type, a file keyword, a file data amount, a file privacy level, and a file importance level, and the backup restoring unit 706 is specifically further configured to:
based on the file type, the file keyword, the file privacy level and the file importance level, determining a first file score, a second file score, a third file score and a fourth file score of each incremental backup file respectively;
Determining a target file score for each incremental backup file based on the first file score, the second file score, the third file score, and the fourth file score;
and determining a second virtual disk corresponding to each incremental backup file from the plurality of second virtual disks based on the target file score, the file data amount, the accommodated data type and the accommodated data amount.
In some embodiments of the present application, the bitmap construction unit 704 is specifically configured to:
copying the data blocks in the first virtual disk to a storage pool to generate a plurality of full-volume backup files corresponding to the first virtual disk;
determining a second virtual disk corresponding to each full-back file from a plurality of second virtual disks based on the file attribute information, the accommodating data type and the accommodating data amount of each full-back file;
sending each full-volume backup file to a temporary merging area of a second virtual disk corresponding to each full-volume backup file for merging to obtain a second merging file corresponding to each second virtual disk;
and synchronizing the second combined file corresponding to each second virtual disk.
The embodiment of the application also provides a computer device, which integrates any of the virtual machine backup and recovery devices provided by the embodiment of the application, and the computer device comprises:
One or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in memory and configured to be executed by the processor to perform the steps in the virtual machine backup restoration method of any of the virtual machine backup restoration method embodiments described above.
The embodiment of the application also provides computer equipment which integrates any of the virtual machine backup and recovery devices provided by the embodiment of the application. As shown in fig. 5, a schematic structural diagram of a computer device according to an embodiment of the present application is shown, specifically:
the computer device may include one or more processing cores 'processors 801, one or more computer-readable storage media's memory 802, power supply 803, and input unit 804, among other components. Those skilled in the art will appreciate that the computer device structure shown in FIG. 5 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components. Wherein:
the processor 801 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 802, and calling data stored in the memory 802, thereby performing overall monitoring of the computer device. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 801.
The memory 802 may be used to store software programs and modules, and the processor 801 executes various functional applications and data processing by executing the software programs and modules stored in the memory 802. The memory 802 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
The computer device also includes a power supply 803 for powering the various components, preferably, the power supply 803 can be logically coupled to the processor 801 via a power management system such that functions such as managing charge, discharge, and power consumption can be performed by the power management system. The power supply 803 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may further comprise an input unit 804, which input unit 804 may be used for receiving input digital or character information and for generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the computer device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 801 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 executes the application programs stored in the memory 802, so as to implement various functions, as follows:
receiving a backup recovery request aiming at a source virtual machine, and analyzing platform information and virtual machine attribute information from the backup recovery request;
inputting platform information into a pre-constructed virtualized platform adaptation model, and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model;
determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface;
initializing a target virtual machine and creating a bitmap of a first virtual disk corresponding to a source virtual machine;
Generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk;
and acquiring file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information so as to realize recovery of the plurality of incremental backup files.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like. The computer program is stored on the virtual machine backup recovery method, and the computer program is loaded by a processor to execute the steps in any virtual machine backup recovery method provided by the embodiment of the application. For example, the loading of the computer program by the processor may perform the steps of:
Receiving a backup recovery request aiming at a source virtual machine, and analyzing platform information and virtual machine attribute information from the backup recovery request;
inputting platform information into a pre-constructed virtualized platform adaptation model, and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model;
determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface;
initializing a target virtual machine and creating a bitmap of a first virtual disk corresponding to a source virtual machine;
generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk;
and acquiring file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information so as to realize recovery of the plurality of incremental backup files.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of one embodiment that are not described in detail in the foregoing embodiments may be referred to in the foregoing detailed description of other embodiments, which are not described herein again.
In the implementation, each unit or structure may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit or structure may be referred to the foregoing method embodiments and will not be repeated herein.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The above describes in detail a virtual machine backup recovery method, apparatus, computer device and storage medium provided by the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the descriptions of the above embodiments are only used to help understand the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.
Claims (10)
1. The virtual machine backup and recovery method is characterized by comprising the following steps:
receiving a backup recovery request aiming at a source virtual machine, and analyzing platform information and virtual machine attribute information from the backup recovery request;
inputting the platform information into a pre-constructed virtualized platform adaptation model, and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model; the virtualized platform adaptation model is used for accommodating API interfaces of a plurality of virtualized platforms, and the candidate application interfaces are the API interfaces which are output by the virtualized platform adaptation model and are matched with the platform information;
Determining a target application interface from a plurality of candidate application interfaces based on the virtual machine attribute information, and creating a target virtual machine based on the target application interface;
initializing the target virtual machine and creating a bitmap of a first virtual disk corresponding to the source virtual machine;
generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk;
and acquiring file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information so as to realize recovery of the plurality of incremental backup files.
2. The virtual machine backup restoration method as recited in claim 1, wherein the virtual machine attribute information includes virtual machine capacity information and virtual machine type information, and wherein the determining a target application interface from among the plurality of candidate application interfaces based on the virtual machine attribute information comprises:
determining a target interface score of each candidate application interface based on the virtual machine capacity information and the virtual machine type information;
and determining a target application interface from a plurality of candidate application interfaces based on the target interface score.
3. The virtual machine backup restoration method as recited in claim 2, wherein the virtual machine capacity information includes processor capacity information, memory capacity information, and bandwidth capacity information, and wherein determining the target interface score for each of the candidate application interfaces based on the virtual machine capacity information and the virtual machine type information comprises:
determining a first interface score, a second interface score, a third interface score and a fourth interface score of each candidate application interface based on the processor capacity information, the memory capacity information, the bandwidth capacity information and the virtual machine type information;
a target interface score for each of the candidate application interfaces is determined based on the first interface score, the second interface score, the third interface score, and the fourth interface score.
4. The method of claim 1, wherein generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk comprises:
acquiring a current backup incremental bitmap and a historical backup incremental bitmap of the first virtual disk, and determining the incremental bitmap of the first virtual disk according to the current backup incremental bitmap and the historical backup incremental bitmap;
Copying the data blocks corresponding to the incremental bitmap in the first virtual disk to a pre-constructed storage pool to generate a plurality of incremental backup files corresponding to the first virtual disk.
5. The virtual machine backup and restore method of claim 4, wherein the target virtual machine includes a plurality of second virtual disks, the plurality of second virtual disks respectively corresponding to a plurality of temporary merge areas constructed in advance, the synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information includes:
acquiring the accommodating data type and the accommodating data volume of each second virtual disk in the plurality of second virtual disks;
determining a second virtual disk corresponding to each incremental backup file from a plurality of second virtual disks based on the file attribute information, the accommodating data type and the accommodating data amount;
sending each incremental backup file to a temporary merging area of a second virtual disk corresponding to each incremental backup file for merging to obtain a first merging file corresponding to each second virtual disk;
and synchronizing the first combined file corresponding to each second virtual disk.
6. The virtual machine backup and restore method of claim 5, wherein the file attribute information includes a file type, a file keyword, a file data amount, a file privacy level, and a file importance level, and wherein determining a second virtual disk corresponding to each incremental backup file from the plurality of second virtual disks based on the file attribute information, the accommodated data type, and the accommodated data amount comprises:
determining a first file score, a second file score, a third file score and a fourth file score of each incremental backup file based on the file type, the file keyword, the file privacy level and the file importance level respectively;
determining a target file score for each of the incremental backup files based on the first file score, the second file score, the third file score, and the fourth file score;
and determining a second virtual disk corresponding to each incremental backup file from a plurality of second virtual disks based on the target file score, the file data amount, the accommodating data type and the accommodating data amount.
7. The virtual machine backup restoration method as recited in claim 5, wherein initializing the target virtual machine comprises:
Copying the data blocks in the first virtual disk to the storage pool to generate a plurality of full-volume backup files corresponding to the first virtual disk;
determining a second virtual disk corresponding to each full-size backup file from a plurality of second virtual disks based on file attribute information, the accommodating data type and the accommodating data amount of each full-size backup file;
sending each full-volume backup file to a temporary merging area of a second virtual disk corresponding to each full-volume backup file for merging to obtain a second merging file corresponding to each second virtual disk;
and synchronizing the second combined file corresponding to each second virtual disk.
8. A virtual machine backup restoration apparatus, comprising:
the information analysis unit is used for receiving a backup recovery request aiming at the source virtual machine and analyzing platform information and virtual machine attribute information from the backup recovery request;
the interface determining unit is used for inputting the platform information into a pre-constructed virtualized platform adaptation model and outputting a plurality of candidate application interfaces through the virtualized platform adaptation model; the virtualized platform adaptation model is used for accommodating API interfaces of a plurality of virtualized platforms, and the candidate application interfaces are the API interfaces which are output by the virtualized platform adaptation model and are matched with the platform information;
A virtual machine creation unit configured to determine a target application interface from a plurality of the candidate application interfaces based on the virtual machine attribute information, and create a target virtual machine based on the target application interface;
the bitmap construction unit is used for initializing the target virtual machine and creating a bitmap of the first virtual disk corresponding to the source virtual machine;
the file backup unit is used for generating a plurality of incremental backup files corresponding to the first virtual disk based on the bitmap of the first virtual disk;
and the backup restoring unit is used for acquiring the file attribute information of each incremental backup file in the plurality of incremental backup files, and synchronizing the plurality of incremental backup files to the target virtual machine based on the file attribute information so as to restore the plurality of incremental backup files.
9. A computer device, the computer device comprising:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the virtual machine backup restoration method of any of claims 1-7.
10. A computer readable storage medium, having stored thereon a computer program, the computer program being loaded by a processor to perform the steps in the virtual machine backup restoration method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311125851.4A CN117033082A (en) | 2023-09-01 | 2023-09-01 | Virtual machine backup recovery method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311125851.4A CN117033082A (en) | 2023-09-01 | 2023-09-01 | Virtual machine backup recovery method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117033082A true CN117033082A (en) | 2023-11-10 |
Family
ID=88643138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311125851.4A Pending CN117033082A (en) | 2023-09-01 | 2023-09-01 | Virtual machine backup recovery method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117033082A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117312264A (en) * | 2023-12-01 | 2023-12-29 | 中孚信息股份有限公司 | File synchronization method, system, equipment and medium in virtual disk system |
-
2023
- 2023-09-01 CN CN202311125851.4A patent/CN117033082A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117312264A (en) * | 2023-12-01 | 2023-12-29 | 中孚信息股份有限公司 | File synchronization method, system, equipment and medium in virtual disk system |
CN117312264B (en) * | 2023-12-01 | 2024-02-20 | 中孚信息股份有限公司 | File synchronization method, system, equipment and medium in virtual disk system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11030517B2 (en) | Summary obtaining method, apparatus, and device, and computer-readable storage medium | |
CN106062742B (en) | System and method for improving snapshot performance | |
JP5592480B2 (en) | Dynamic placement of replicated data | |
CN117033082A (en) | Virtual machine backup recovery method and device, computer equipment and storage medium | |
CN101313277A (en) | Method and system for carrying multiple suspended runtime images | |
CN105052111A (en) | Service migration across cluster boundaries | |
EP3489957A1 (en) | Accelerated clinical biomarker prediction (acbp) platform | |
CN104731848B (en) | Manage the method and client devices of the access to the data on client devices | |
CN112433812B (en) | Virtual machine cross-cluster migration method, system, equipment and computer medium | |
JP2005056404A (en) | Method and apparatus for providing updated system locality during run time | |
WO2022042233A1 (en) | Application interface migration system, method, and related device | |
CN111566615A (en) | Feature usage prediction using shell application feature telemetry | |
WO2023087764A1 (en) | Algorithm application element packaging method and apparatus, device, storage medium, and computer program product | |
CN115205925A (en) | Expression coefficient determining method and device, electronic equipment and storage medium | |
CN115174406B (en) | Container application expansion and contraction method and device, computer equipment and storage medium | |
CN116578447B (en) | Virtual machine data recovery method and device, computer equipment and storage medium | |
CN114742926A (en) | Animation redirection method and device, computer equipment and storage medium | |
CN114584574A (en) | Data synchronization method and device, computer equipment and storage medium | |
CN115174890B (en) | Flow playback testing method and device, computer equipment and storage medium | |
CN115221060A (en) | Case generation method, device and equipment based on associated field and storage medium | |
WO2012109874A1 (en) | Method and apparatus for dynamic addition and dynamic removal of device | |
CN106412125B (en) | A kind of based on load balance and sequence cloud monitoring system and construction method | |
CN113271323B (en) | Cluster capacity expansion method and device and storage medium | |
CN114615287B (en) | File backup method and device, computer equipment and storage medium | |
CN112306373B (en) | Cluster capacity expansion method and system, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |