CN112817698A - Virtual machine backup method and device, electronic equipment and storage medium - Google Patents

Virtual machine backup method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112817698A
CN112817698A CN202110193991.XA CN202110193991A CN112817698A CN 112817698 A CN112817698 A CN 112817698A CN 202110193991 A CN202110193991 A CN 202110193991A CN 112817698 A CN112817698 A CN 112817698A
Authority
CN
China
Prior art keywords
file
virtual machine
files
block
backup
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
Application number
CN202110193991.XA
Other languages
Chinese (zh)
Inventor
石琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
MIGU Music Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Music Co Ltd
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, MIGU Music Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110193991.XA priority Critical patent/CN112817698A/en
Publication of CN112817698A publication Critical patent/CN112817698A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The embodiment of the invention relates to the technical field of computers, in particular to a virtual machine backup method, a device, electronic equipment and a storage medium.

Description

Virtual machine backup method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a virtual machine backup method and device, electronic equipment and a storage medium.
Background
A Virtual Machine (Virtual Machine) refers to a complete computer system with complete hardware system functionality, operating in a completely isolated environment, simulated by software. The work that can be done in a physical computer can be implemented in a virtual machine. When creating a virtual machine in a computer, it is necessary to use a part of the hard disk and the memory capacity of the physical machine as the hard disk and the memory capacity of the virtual machine. Each virtual machine has a separate CMOS (Complementary Metal Oxide Semiconductor), hard disk, and operating system, and can operate as if a physical machine is used.
The corresponding data of the virtual machine is backed up, and the virtual machine is quickly recovered when a fault occurs, so that the enterprise data can be protected and the enterprise loss can be reduced. The existing common backup method of the virtual machine mainly comprises data backup of an operating system layer and snapshot backup of the virtual machine. The data backup of the operating system layer realizes the backup of data files of the virtual machine by installing data copy software in the operating system of the virtual machine and setting a backup method from a production target to a virtual machine of a backup target, and if the data of the production target is damaged, the data can be recovered from the backup target; the virtual machine snapshot backup makes a snapshot for the virtual machine to be backed up according to the virtualization management software, the special backup software copies the virtual machine snapshot file to the special backup storage, and if the virtual machine file used by the production target is damaged, the virtual machine snapshot file can be restored through the snapshot data on the backup target.
The data backup of the operating system layer can realize the data backup and copy among different storages, can realize the data backup and copy in a long distance, but the special backup software needs to be installed in each virtual machine, and copy parameters are set, so that under the condition of a huge scale environment of thousands of or even more virtual machines, a large amount of backup software needs to be installed, the general backup software charges according to the platform, great manpower and financial resources are needed, meanwhile, the workload of later operation and maintenance is increased, and the backup requirement under the large scale environment is not facilitated; the virtual machine snapshot backup backs up the virtual machine in a snapshot mode, management software of a virtualization platform is relied on, and under the conditions of large-scale scenes, high utilization rate, frequent snapshots, large virtual machine files and the like, the virtual machine is easy to crash in the snapshot backup process, and the normal operation of a service system is influenced.
Disclosure of Invention
An object of embodiments of the present invention is to provide a virtual machine backup method, an apparatus, an electronic device, and a storage medium, which solve the problems in the prior art that a data backup method of an operating system layer increases the cost of material resources and financial resources, and the normal operation of a service system is affected by downtime caused by a snapshot method.
To solve the foregoing technical problem, in a first aspect, an embodiment of the present invention provides a virtual machine backup method, including:
capturing virtual machine files transmitted by each virtual machine in a virtual environment, cutting the virtual machine files into block files by taking data blocks as units, and determining capturing time and file contents corresponding to each block file;
and according to a predetermined backup strategy, the block files corresponding to the virtual machine files to be backed up are copied in batch, and the copied block files are aggregated according to the capture time and the file content and then transmitted to a backup system.
In a second aspect, an embodiment of the present invention provides a virtual machine backup device, including file scissors and a data aggregation rectifier, where the file scissors and the data aggregation rectifier are disposed in a data transmission layer in a virtualization environment;
the file scissors are used for capturing virtual machine files transmitted by each virtual machine in a virtual environment, cutting the virtual machine files into block files by taking data blocks as units, and determining capturing time and file contents corresponding to the block files;
and the data collecting rectifier is used for copying the block files corresponding to the virtual machine files to be backed up in batch according to a predetermined backup strategy, and aggregating the copied block files according to the capture time and the file content and then transmitting the aggregated block files to the backup system.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the virtual machine backup method according to the embodiment of the first aspect of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the virtual machine backup method according to the embodiment of the first aspect of the present invention.
Compared with the prior art, the method and the device have the advantages that the virtualized files are cut into the block files, the single concurrent data streams are rectified and aggregated into the high concurrent data streams and are written into the backup system in batches, the scheduling of the data streams is reduced, the virtual machine files transmitted by each virtual machine are captured on the virtualized file data transmission layer in a proxy-free mode, any proxy does not need to be installed in the virtual machine, the non-stop operation can be realized, the influence on a production system is avoided, the method and the device are also suitable for use in a large-scale scene, and the dependence on virtualized management software and storage is eliminated.
In addition, the capturing of the virtual machine file transmitted by each virtual machine in the virtual environment specifically includes:
determining a physical host carrying the virtual machine in the virtualization environment, and capturing a virtual machine file, which is prepared to be written into a storage device, of the physical host at a data transmission layer in the virtualization environment. The virtual machine file is captured at the transmission layer outlet of the virtual machine file, and no agent is required to be installed in the virtual machine, so that the non-stop operation can be realized, and the production system is not influenced.
In addition, after the virtual machine file is cut into block files by taking data blocks as units, the method further comprises the following steps:
determining the link relation of each block file corresponding to the same virtual machine file, wherein the link relation comprises a position sequence;
determining the capture time, the file position and the file source of each virtual machine file;
and generating a file clipping log according to the link relation of each file block and the capture time, the file position and the file source of the corresponding virtual machine file. The method comprises the following steps of cutting a virtual machine file into block files, recording the capture time, the file source and the file source of the virtual machine file corresponding to each file block by a file cutting log, recording the position sequence of the cut block files, and generating a time point view of each data stream (virtual machine file) by a playable log recording mode; corresponding logs are required to be recorded for the cut files with blocks and the files without blocks, so that the files can be conveniently gathered for later use, the view traceability function and the instant use of massive data time points can be realized, and the consistency protection of data streams can be realized.
In addition, after the virtual machine file is cut into block files by taking data blocks as units, the method further comprises the following steps:
if the file contents of two or more block files within the same capture time are judged to be the same, adding the same exclusive file mark to the corresponding two or more block files so as to mark the corresponding two or more block files as non-different block files;
and if the file content of a certain block file and the file content of any other block file in the same capture time are different, adding an exclusive file mark for the corresponding block file so as to mark the corresponding block file as a non-blocked file. The block file is divided by taking time and content as standards, but not divided by file sources, and the same data transmission and aggregation standard can be established.
In addition, if the file positions of the plurality of non-blocked files with the same exclusive file mark are judged to be the same, the plurality of non-blocked files are judged to be in a repeated relationship;
and deleting the repeated non-blocked files, and recording a deletion record and a repeated relation into the file clipping log. The same non-blocked file of each virtual machine is transmitted in the data transmission process, and the transmission difference of the blocked files reduces the overhead of data stream storage.
In addition, the aggregating the copied block files according to the capture time and the file content and then transmitting the aggregated block files to the backup system specifically comprises:
aggregating the block files in a set time into a concurrent data stream, and transmitting the concurrent data stream to the backup system;
performing convergence verification on the file source of each block file according to the file cutting log, and restoring a corresponding virtual machine file according to each block file;
and writing the restored virtual machine file into a backup system. The data of the block files are gathered, rectified and written into a production end storage system, simultaneously, the virtual machine files needing to be backed up are transferred to a back-up system at the rear end through a high-speed data stream transmission belt in the production end storage system according to a back-up strategy, the back-up system receives the back-up data of the production end storage system, the transferred data are managed, gathering verification is carried out through a file cutting log, data restoration before cutting can be achieved, and finally the data are written into a back-up storage.
In addition, after the cutting the virtual machine file into block files by using data blocks as units, the method further includes:
aggregating the block files in a set time into a concurrent data stream, and transmitting the concurrent data stream to a production end storage system;
and restoring the virtual machine file corresponding to the block file before clipping according to the file clipping log, and writing the virtual machine file into a production end storage system.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a flowchart of a virtual machine backup method according to a first embodiment of the present invention;
FIG. 2 is a flow diagram of file cropping according to an embodiment of the present invention;
fig. 3 is a diagram of a virtual machine backup apparatus according to a third embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, the terms "comprise" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a system, product or apparatus that comprises a list of elements or components is not limited to only those elements or components but may alternatively include other elements or components not expressly listed or inherent to such product or apparatus. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
The data backup of the operating system layer can realize the data backup and copy among different storages, can realize the data backup and copy in a long distance, but the special backup software needs to be installed in each virtual machine, and copy parameters are set, so that under the condition of a huge scale environment of thousands of or even more virtual machines, a large amount of backup software needs to be installed, the general backup software charges according to the platform, great manpower and financial resources are needed, meanwhile, the workload of later operation and maintenance is increased, and the backup requirement under the large scale environment is not facilitated; the virtual machine snapshot backup backs up the virtual machine in a snapshot mode, management software of a virtualization platform is relied on, and under the conditions of large-scale scenes, high utilization rate, frequent snapshots, large virtual machine files and the like, the virtual machine is very likely to be down in the snapshot backup process, and the normal operation of a service system is affected.
Therefore, the virtual machine backup method, the virtual machine backup device, the electronic equipment and the storage medium in the embodiment of the invention can effectively avoid the cost in material and financial resources caused by the data backup method of the operating system layer, and reduce the later maintenance workload; the method avoids the downtime influence caused by the snapshot method adopted by the virtual machine, is also suitable for large-scale scenes, and improves the operation and maintenance efficiency. The following description and description will proceed with reference being made to various embodiments.
A first embodiment of the present invention relates to a virtual machine backup method, as shown in fig. 1, including:
s1, capturing virtual machine files transmitted by each virtual machine in a virtual environment, cutting the virtual machine files into block files by taking data blocks as units, and determining capturing time and file content corresponding to each block file;
specifically, in the present embodiment, in the virtualization environment, a data stream (virtual machine file) is written from the virtual machine, and the data stream enters the device file of the storage device identified by the physical host from the file system of the physical host, and is ready to be written into the storage device at the back end;
recording capture time, file position and file source of a virtual machine file by determining a physical host bearing the virtual machine in a virtualization environment and capturing the virtual machine file which is ready to be written into a storage device by the physical host; the storage device is a back-end storage device identified by the physical host. The virtual machine file is captured at the transmission layer outlet of the virtual machine file, and no agent is required to be installed in the virtual machine, so that non-stop operation can be realized, and no influence is caused on a production system;
capturing virtual machine files of each virtual machine through a data transmission layer of a virtualization environment, cutting the files to obtain block files, and determining the link relation of the cut block files so as to be conveniently gathered for later use;
and S2, copying the block files corresponding to the virtual machine files to be backed up in batch according to a predetermined backup strategy, and aggregating the copied block files according to the capture time and the file content and then transmitting the aggregated block files to a backup system.
In the embodiment, the virtualized files are cut into block files, the corresponding single concurrent data stream is rectified into high concurrent data streams, the high concurrent data streams are written into a production end storage system in batch or transmitted to a backup system in batch, the scheduling of the data streams is reduced, the virtual machine files transmitted by each virtual machine are captured on the virtualized file data transmission layer in an agent-free mode, any agent does not need to be installed in the virtual machine, the non-stop operation can be realized, the production system is not influenced, the method is also suitable for large-scale scenes, and the dependence on virtualized management software and storage is eliminated.
A second embodiment of the present invention relates to a virtual machine backup method. The second embodiment is a refinement of the first embodiment. In a second embodiment of the present invention, each of the block files is divided into a blocked file and a non-blocked file; the non-blocked files are block files with the same file content, and the blocked files are block files with different file contents; the virtual machine backup method comprises the following steps:
s1, capturing virtual machine files transmitted by each virtual machine in a virtual environment, cutting the virtual machine files into block files by taking data blocks as units, and determining capturing time and file content corresponding to each block file;
s11, capturing a virtual machine file which is ready to be written into a storage device by the physical host in the virtualization environment through determining the physical host bearing the virtual machine in the virtualization environment and capturing the capture time, the file position and the file source of the virtual machine file in a data transmission layer in the virtualization environment; the storage device is a back-end storage device identified by the physical host. The virtual machine file is captured at the transmission layer outlet of the virtual machine file, and no agent is required to be installed in the virtual machine, so that non-stop operation can be realized, and no influence is caused on a production system;
specifically, in the present embodiment, in the virtualization environment, a data stream (corresponding to a virtual machine file) is written from a virtual machine, and the data stream enters a device file of the storage device identified by the physical host from a file system of the physical host and is ready to be written into the storage device at the back end;
s12, determining the link relation of each block file corresponding to the same virtual machine file, wherein the link relation comprises a position sequence;
determining the capture time, the file position and the file source of each virtual machine file;
and generating a file clipping log according to the link relation of each file block and the capture time, the file position and the file source of the corresponding virtual machine file.
Specifically, the process of file clipping is located at the outlet of a file transmission layer of the virtual machine, the virtual machine file can be clipped through file scissors, the virtual machine file is clipped into block files, a file clipping log records the capture time, the file source and the file source of the virtual machine file corresponding to each file block, the position sequence of the clipped block files can be recorded, and a time point view of each data stream (the virtual machine file) can be generated by adopting a playbackable log recording mode; corresponding logs are required to be recorded for the cut files with blocks and the files without blocks, so that the files can be conveniently gathered for later use, the view traceability function and the instant use of massive data time points can be realized, and the consistency protection of data streams can be realized.
S13, if the file contents of two or more block files in the same capture time are judged to be the same, adding the same exclusive file mark to the corresponding two or more block files, and marking the corresponding two or more block files as non-different block files;
if the file content of a certain block file and the file content of any other block file in the same capture time are different, adding an exclusive file mark for the corresponding block file, and marking the corresponding block file as a non-blocked file;
if the file positions of the plurality of non-blocked files with the same exclusive file mark are judged to be the same, judging that the plurality of non-blocked files are in a repeated relation;
and deleting the repeated non-blocked files, and recording a deletion record and a repeated relation into the file clipping log.
The cutting principle is to distinguish files with blocks from files without blocks of the virtual machine. And transmitting one copy of the same non-blocked file of each virtual machine in the data transmission process, wherein the transmission difference amount of the blocked files is different. And recording file block cutting blocks through the file cutting log. As shown in fig. 2, the non-blocked file is marked with the letter S, and specifically, different dedicated file marks may be used for the non-blocked files at different capture times, for example, in fig. 2, the non-blocked file with the capture time of 00:00:01 and the file content of 0101 is marked with "S1", the non-blocked file with the capture time of 00:00:02 and the file content of 0102 is marked with "S2", and the blocked file is marked with the letter N. After the virtual machine file is cut into block files by taking data blocks as units, a block file is reserved for non-blocked files with the same capture time and the same file position, the rest of files are discarded and recorded in a file scissors cutting log, the cut non-blocked files and the cut non-blocked files can be directly transmitted, filed and rectified, the data storage overhead is reduced, and meanwhile, the connection relationship between the non-blocked files and the non-blocked files is established through the file cutting log.
In this embodiment, the file cropping log records the capture time, the file location, the file source, and the location sequence of each block file, and a time point view of each data stream can be produced by playing back the file cropping log; the link relation between files with blocks and files without blocks after cutting needs to be recorded in a file cutting log, so that the files can be conveniently gathered for use at the later stage, the view traceability function and the instant use of massive data time points are realized, and the consistency protection of data streams is realized.
And S2, copying the block files corresponding to the virtual machine files to be backed up in batch according to a predetermined backup strategy, and aggregating the copied block files according to the capture time and the file content and then transmitting the aggregated block files to a backup system.
S21, rectifying the captured single concurrent data stream (namely the virtual machine file) into a high concurrent data stream by adopting a data aggregation technology, and transmitting the high concurrent data stream to the production end storage system in batches, so that the bandwidth occupation can be reduced;
copying other files and/or non-other files of the virtual machine files to be backed up from a production end storage system, verifying file sources and the number of the other files and/or the non-other files in the transmission process according to the file cutting log, and transmitting the files in batches to a backup system in a high-speed data stream mode;
in this embodiment, a backup strategy needs to be determined in advance according to a plan, which virtual machine files need to be backed up is determined so as to capture correct data streams, and the data streams of useless virtual machine files are ignored and directly written into a production end storage system;
distinguishing the non-blocked files and the blocked files after cutting, and normally writing the files into production storage aiming at the virtual machine which does not need to be copied;
and while the data with the files without the files in the blocks are gathered, rectified and written into the production end storage system, the virtual machine files to be backed up are transferred from the production end storage system to a back-up system through a high-speed data stream conveyor belt according to a backup strategy.
And S22, restoring the corresponding virtual machine file before cutting according to the file with the other blocks and/or the file without the other blocks by the backup system.
The back-end backup system receives the backup data from the production-end storage system through the rectifier receiver 50, manages the transmitted data, performs the convergence verification through the file cutting log generated in the step S1, can realize the data restoration before cutting, and finally writes the data into the backup storage.
In the embodiment, the virtualized files are cut into block files, the single concurrent data stream is rectified into high concurrent data streams, and the high concurrent data streams are written into a production end storage system in batch or transmitted to a backup system in batch, so that the scheduling of the data streams is reduced, the virtual machine files transmitted by each virtual machine are captured on the virtualized file data transmission layer in an agent-free mode, no agent is required to be installed in the virtual machine, the non-stop operation can be realized, the production system is not influenced, the method is also suitable for large-scale scenes, and the dependence on virtualized management software and storage is eliminated.
A third embodiment of the present invention relates to a virtual machine backup apparatus, based on the virtual machine backup method in each of the above embodiments, as shown in fig. 3, the virtual machine backup apparatus includes file scissors 10 and a data aggregation rectifier, where the file scissors 10 and the data aggregation rectifier are disposed in a data transmission layer in a virtualization environment;
the file scissors 10 are configured to capture a virtual machine file transmitted by each virtual machine in a virtual environment, clip the virtual machine file into block files by using data blocks as units, and determine capture time and file content corresponding to each block file;
and the data collecting rectifier is used for copying the block files corresponding to the virtual machine files to be backed up in batch according to a predetermined backup strategy, and aggregating the copied block files according to the capture time and the file content and then transmitting the aggregated block files to the backup system.
Specifically, in this embodiment, the file scissors 10 are located at an outlet of a file transmission layer of the virtual machine, and the file scissors 10 perform clipping on the file of the virtual machine, where the clipping principle is to distinguish between files with blocks and files without blocks of the virtual machine. And transmitting one copy of the same non-blocked file of each virtual machine in the data transmission process, wherein the transmission difference amount of the blocked files is different. And performing file block cutting block recording through a cutting log collector. Unblock files are marked with the letter S and with block files with the letter N, as shown in fig. 3.
The process of the file scissors 10 to cut the file blocks of the virtual machine is as follows:
1) the file scissors 10 cut the virtual machine file into block files by taking data blocks as units;
2) only one file is reserved for the files without the blocks at the same capture time and the same file position in each virtual machine, the corresponding other files without the blocks are discarded, and a file cutting log of the file scissors 10 is recorded;
3) the clipped files without the blocks are directly written into a data archiving rectifier, so that the expense of data stream storage is reduced;
4) the cut files with different blocks are directly written into a data archiving rectifier, so that the expense of data stream storage is reduced;
5) and establishing a link relation between the files with the blocks and the files without the blocks through the file clipping log of the file scissors 10.
In this embodiment, the virtual machine file is cut into a file with a block and a file without a block, the file cutting log records the capture time, the file source and the file source of the virtual machine file corresponding to each file block, the position sequence of the cut block file can be recorded, and a time point view of each data stream (virtual machine file) can be generated by adopting a playbacked log recording mode; corresponding logs are required to be recorded for the cut files with blocks and the files without blocks, so that the files can be conveniently gathered for later use, the view traceability function and the instant use of massive data time points can be realized, and the consistency protection of data streams can be realized.
Specifically, in this embodiment, the data archiving rectifier does not belong to the space between the file scissors 10 and the storage device, and the data archiving rectifier includes a virtual machine, the file scissors 10, a data aggregating rectifier, and a back-end storage (including a production-end storage system and a backup system); the method comprises the steps of scanning virtual machine files in a data transmission layer of a virtualization environment through an exploration interface of a data archiving rectifier, determining which virtual machine files need to be backed up according to a planned backup strategy so as to capture correct data streams, ignoring corresponding data streams for useless virtual machine files, and directly writing the data streams into a production-end storage system through the data archiving rectifier.
The data gathering rectifier is deployed on a data transmission layer in a virtualization environment, a data stream is captured from a system kernel of a physical machine bearing a virtual machine, and after the existence of the files with the blocks and the absence of the files with the blocks are determined, the capturing process of the rectifier is as follows:
1) the data stream is written from the virtual machine;
2) the data stream enters the equipment file of the storage equipment identified by the physical host from the file system of the physical host and is ready to be written into the storage equipment at the back end;
3) the file scissors 10 clip the data stream when writing from the kernel of the physical host system to the storage device;
4) the data collecting rectifier distinguishes files without blocks and files with blocks after cutting, and the files are normally written into a production storage system aiming at virtual machines which do not need to be copied;
specifically, a first data aggregation rectifier 201 is arranged at the storage system of the production end of the embodiment, and a second data aggregation rectifier 202 is arranged at the backup system, wherein the first data aggregation rectifier 201 is used for receiving a high concurrent data stream transmitted by the file scissors 10, restoring the virtual machine file corresponding to the non-blocked file and/or the non-blocked file before being clipped according to the file clipping log, and writing the file into the storage system of the production end; the second data gathering rectifier 202 is configured to receive a high concurrent data stream corresponding to the virtual machine file that needs to be backed up, restore the corresponding virtual machine file before clipping according to the non-blocked file and/or the blocked file, and write the file into the backup system.
Specifically, the system further comprises a back-end data rectification agent management unit 30, a rectification deliverer 40, a rectification receiver 50 and a background data rectification agent management unit 60;
the production end in the virtualization environment collects data streams corresponding to files with other blocks and files without other blocks, writes the data streams into a production end storage system through a first data collection rectifier 201, simultaneously transmits virtual machine files to be backed up to a backup system according to a backup strategy, and a rear-end data collection agent management unit 30 verifies the source number of the files with other blocks and files without other blocks in the data transmission process and transmits the files to a rectifier deliverer 40 in batches after verifying that the files are complete virtual machine files to be backed up; the streamer 40 transfers data (virtual machine files) to be backed up to a back-end backup system via a high-speed data stream transfer tape.
The rectifying receiver 50 receives the data from the rectifying deliverer 40 and transmits the data to the background data rectifying agent management unit 60, and the background data rectifying agent management unit 60 manages the data transmitted by the rectifying receiver 50, and when the data is transmitted to the second data collecting rectifier 202, the data is collected and verified according to the cutting log of the file, so that the data before cutting can be restored, and the data is finally written into a backup system for storage.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fourth embodiment of the present invention relates to an electronic device, which includes a server, as shown in fig. 4, the server includes a processor (processor)810, a communication Interface (Communications Interface)820, a memory (memory)830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 complete communication with each other through the communication bus 840. Processor 810 may invoke logic instructions in memory 830 to perform the steps of the virtual machine backup method as described in the various embodiments above. Examples include:
s1, capturing virtual machine files transmitted by each virtual machine in a virtual environment, cutting the virtual machine files into block files by taking data blocks as units, and determining capturing time and file content corresponding to each block file;
and S2, copying the block files corresponding to the virtual machine files to be backed up in batch according to a predetermined backup strategy, and aggregating the copied block files according to the capture time and the file content and then transmitting the aggregated block files to a backup system.
Where the memory and processor are connected by a communications bus, which may include any number of interconnected buses and bridges, connecting together the various circuits of the memory and one or more processors. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between a communication bus and a transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the steps of the virtual machine backup method as described in the embodiments above. Examples include:
s1, capturing virtual machine files transmitted by each virtual machine in a virtual environment, cutting the virtual machine files into block files by taking data blocks as units, and determining capturing time and file content corresponding to each block file;
and S2, copying the block files corresponding to the virtual machine files to be backed up in batch according to a predetermined backup strategy, and aggregating the copied block files according to the capture time and the file content and then transmitting the aggregated block files to a backup system.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (10)

1. A virtual machine backup method is characterized by comprising the following steps:
capturing virtual machine files transmitted by each virtual machine in a virtual environment, cutting the virtual machine files into block files by taking data blocks as units, and determining capturing time and file contents corresponding to each block file;
and according to a predetermined backup strategy, the block files corresponding to the virtual machine files to be backed up are copied in batch, and the copied block files are aggregated according to the capture time and the file content and then transmitted to a backup system.
2. The virtual machine backup method according to claim 1, wherein the capturing of the virtual machine file transmitted by each virtual machine in the virtual environment specifically includes:
determining a physical host carrying the virtual machine in the virtualization environment, and capturing a virtual machine file, which is prepared to be written into a storage device, of the physical host at a data transmission layer in the virtualization environment.
3. The virtual machine backup method according to claim 1, wherein after the virtual machine file is cut into block files in units of data blocks, the method further comprises:
determining the link relation of each block file corresponding to the same virtual machine file, wherein the link relation comprises a position sequence;
determining the capture time, the file position and the file source of each virtual machine file;
and generating a file clipping log according to the link relation of each file block and the capture time, the file position and the file source of the corresponding virtual machine file.
4. The virtual machine backup method according to claim 3, wherein after the virtual machine file is cut into block files in units of data blocks, the method further comprises:
if the file contents of two or more block files within the same capture time are judged to be the same, adding the same exclusive file mark to the corresponding two or more block files so as to mark the corresponding two or more block files as non-different block files;
and if the file content of a certain block file and the file content of any other block file in the same capture time are different, adding an exclusive file mark for the corresponding block file so as to mark the corresponding block file as a non-blocked file.
5. The virtual machine backup method according to claim 4, further comprising:
if the file positions of the plurality of non-blocked files with the same exclusive file mark are judged to be the same, judging that the plurality of non-blocked files are in a repeated relation;
and deleting the repeated non-blocked files, and recording a deletion record and a repeated relation into the file clipping log.
6. The virtual machine backup method according to claim 3, wherein the aggregating the copied block files according to capture time and file content and then transmitting the aggregated block files to the backup system specifically comprises:
aggregating the block files in a set time into a concurrent data stream, and transmitting the concurrent data stream to the backup system;
performing convergence verification on the file source of each block file according to the file cutting log, and restoring a corresponding virtual machine file according to each block file;
and writing the restored virtual machine file into a backup system.
7. The virtual machine backup method according to claim 3, wherein after the virtual machine file is cut into block files in units of data blocks, the method further comprises:
aggregating the block files in a set time into a concurrent data stream, and transmitting the concurrent data stream to a production end storage system;
and restoring the virtual machine file corresponding to the block file before clipping according to the file clipping log, and writing the virtual machine file into a production end storage system.
8. A virtual machine backup device is characterized by comprising file scissors and a data gathering rectifier, wherein the file scissors and the data gathering rectifier are arranged on a data transmission layer in a virtualization environment;
the file scissors are used for capturing virtual machine files transmitted by each virtual machine in a virtual environment, cutting the virtual machine files into block files by taking data blocks as units, and determining capturing time and file contents corresponding to the block files;
and the data collecting rectifier is used for copying the block files corresponding to the virtual machine files to be backed up in batch according to a predetermined backup strategy, and aggregating the copied block files according to the capture time and the file content and then transmitting the aggregated block files to the backup system.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the virtual machine backup method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the virtual machine backup method according to any one of claims 1 to 7.
CN202110193991.XA 2021-02-20 2021-02-20 Virtual machine backup method and device, electronic equipment and storage medium Pending CN112817698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110193991.XA CN112817698A (en) 2021-02-20 2021-02-20 Virtual machine backup method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110193991.XA CN112817698A (en) 2021-02-20 2021-02-20 Virtual machine backup method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112817698A true CN112817698A (en) 2021-05-18

Family

ID=75864340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110193991.XA Pending CN112817698A (en) 2021-02-20 2021-02-20 Virtual machine backup method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112817698A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034684A (en) * 2012-11-27 2013-04-10 北京航空航天大学 Optimizing method for storing virtual machine mirror images based on CAS (content addressable storage)
CN103034566A (en) * 2012-12-06 2013-04-10 华为技术有限公司 Method and device for restoring virtual machine
CN105022678A (en) * 2015-07-02 2015-11-04 深圳市深信服电子科技有限公司 Data backup method and apparatus for virtual machine
WO2016045428A1 (en) * 2014-09-24 2016-03-31 华为技术有限公司 Method for creating virtual machine and apparatus for creating virtual machine
CN105550063A (en) * 2015-12-03 2016-05-04 上海爱数信息技术股份有限公司 Continuous data protection and kvm virtualization based disaster recovery method
WO2016106756A1 (en) * 2014-12-31 2016-07-07 华为技术有限公司 Disaster recovery method, system and apparatus
CN111309433A (en) * 2018-12-12 2020-06-19 中国移动通信集团四川有限公司 Virtualization system and virtual machine data copying method
CN111651305A (en) * 2020-08-05 2020-09-11 腾讯科技(深圳)有限公司 Virtual machine backup method, virtual machine backup assembly and cloud computing system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034684A (en) * 2012-11-27 2013-04-10 北京航空航天大学 Optimizing method for storing virtual machine mirror images based on CAS (content addressable storage)
CN103034566A (en) * 2012-12-06 2013-04-10 华为技术有限公司 Method and device for restoring virtual machine
WO2016045428A1 (en) * 2014-09-24 2016-03-31 华为技术有限公司 Method for creating virtual machine and apparatus for creating virtual machine
WO2016106756A1 (en) * 2014-12-31 2016-07-07 华为技术有限公司 Disaster recovery method, system and apparatus
CN105022678A (en) * 2015-07-02 2015-11-04 深圳市深信服电子科技有限公司 Data backup method and apparatus for virtual machine
CN105550063A (en) * 2015-12-03 2016-05-04 上海爱数信息技术股份有限公司 Continuous data protection and kvm virtualization based disaster recovery method
CN111309433A (en) * 2018-12-12 2020-06-19 中国移动通信集团四川有限公司 Virtualization system and virtual machine data copying method
CN111651305A (en) * 2020-08-05 2020-09-11 腾讯科技(深圳)有限公司 Virtual machine backup method, virtual machine backup assembly and cloud computing system

Similar Documents

Publication Publication Date Title
US10135922B2 (en) Granular sync/semi-sync architecture
CN102981931B (en) Backup method and device for virtual machine
US7581077B2 (en) Method and system for transferring data in a storage operation
US7136976B2 (en) System and method for backup which synchronously or asynchronously stores additional information depending on the target backup data
US8949395B2 (en) Systems and methods of event driven recovery management
US8473462B1 (en) Change tracking for shared disks
US10203904B1 (en) Configuration of replication
US20040019615A1 (en) Method for backing up a disk array system
US8793456B2 (en) Automated migration to a new target volume via merged bitmaps to maintain consistency
EP1918828A1 (en) Distributed snapshot process
US8260752B1 (en) Systems and methods for change tracking with multiple backup jobs
CN102495772B (en) Characteristic-based terminal program cloud backup and recovery methods
KR101090633B1 (en) Virtual tape device at original center, virtual tape device at duplicate center, virtual library system and virtual tape control method
WO2014079028A1 (en) Data processing method and storage device
CN102495771A (en) Terminal object classified backup and recovery methods based on cloud architecture
CN111078464A (en) Method, device and system for backing up data
CN112130959B (en) Virtual machine protection system and method
CN104583966A (en) Backup and restore system for a deduplicated file system and corresponding server and method
CN101901173A (en) Disaster preparation system and method thereof
CN112817698A (en) Virtual machine backup method and device, electronic equipment and storage medium
CN111984196A (en) File migration method, device, equipment and readable storage medium
CN107395429A (en) The method and apparatus that virtual machine is managed in cloud data center
US10719256B1 (en) Performance of deduplication storage systems
CN105159790A (en) Data rescue method and file server
US9633066B1 (en) Taking a consistent cut during replication for storage across multiple nodes without blocking input/output

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