CN113722157B - Virtual machine data management method, device, equipment and medium - Google Patents

Virtual machine data management method, device, equipment and medium Download PDF

Info

Publication number
CN113722157B
CN113722157B CN202111291141.XA CN202111291141A CN113722157B CN 113722157 B CN113722157 B CN 113722157B CN 202111291141 A CN202111291141 A CN 202111291141A CN 113722157 B CN113722157 B CN 113722157B
Authority
CN
China
Prior art keywords
virtual machine
target
backup
data
target virtual
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.)
Active
Application number
CN202111291141.XA
Other languages
Chinese (zh)
Other versions
CN113722157A (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111291141.XA priority Critical patent/CN113722157B/en
Publication of CN113722157A publication Critical patent/CN113722157A/en
Application granted granted Critical
Publication of CN113722157B publication Critical patent/CN113722157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/1458Management of the backup or restore process
    • 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/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • 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
    • 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/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for managing virtual machine data, which comprise the following steps: the method comprises the steps of obtaining a virtual machine backup request, and determining a target virtual machine corresponding to the virtual machine backup request from a cloud platform; acquiring target metadata corresponding to a target virtual machine from a cloud platform; determining a first storage position of disk data corresponding to a target virtual machine from a distributed storage system, and determining a second storage position for performing backup operation on the target virtual machine from the distributed storage system; judging whether the state information of the current target virtual machine meets a preset quick backup condition or not; and if so, taking the target metadata and the mapping relation between the first storage position and the second storage position as first target backup data of the target virtual machine, and storing the first target backup data to the second storage position. According to the method and the system, the backup and recovery of the data at the virtual machine level can be realized through the distributed storage system, and the data of the virtual machine can be effectively managed.

Description

Virtual machine data management method, device, equipment and medium
Technical Field
The present application relates to the field of virtual machine technologies, and in particular, to a method, an apparatus, a device, and a medium for virtual machine data management.
Background
Currently, with the rapid development of virtualization technologies, virtual machines are applied more and more widely in cloud computing, and the amount of data generated by enterprises is more and more, so that the protection of the data of the virtual machines becomes crucial. With the deepening of digital transformation, new requirements are put forward on the storage of mass data on the cloud platform.
The traditional storage mode has the advantages of mature technology, good performance, high availability and the like, but the defects are more and more obvious when the traditional storage mode faces mass data, such as poor expansibility, high cost and the like. In order to overcome the defects and meet the storage requirements of mass data of a cloud platform, a distributed storage technology is provided. The distributed storage technology is not to store data on one or more specific nodes, but to use disk space on each machine in the enterprise through a network, and to form a virtual storage device by using these distributed storage resources, the data is stored in various corners of the enterprise in a distributed manner. In a distributed storage architecture, data is usually backed up by adopting a multi-copy technology, so that data loss caused by single node failure can be prevented, and the effect of protecting the data is achieved. Therefore, how to better implement backup and recovery at the virtual machine level on the distributed storage of the cloud platform is one of the difficulties to be considered in the current cloud platform.
At present, both a backup and recovery scheme at a virtual machine level in a cloud platform are traditional backup and recovery schemes, that is, distributed Storage is used as a traditional IP-SAN (Storage Area Network), and the advantages of distributed Storage are not fully utilized. The distributed storage multi-copy technology only solves the problems of data backup and high storage availability at a storage level, and does not realize backup at a virtual machine level.
In summary, how to fully utilize the advantages of multiple nodes of distributed storage to implement virtual machine level data backup and data recovery is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device, and a medium for managing data of a virtual machine, which can fully utilize advantages of multiple nodes of distributed storage to implement data backup and data recovery at a virtual machine level. The specific scheme is as follows:
in a first aspect, the present application discloses a virtual machine data management method, including:
the method comprises the steps of obtaining a virtual machine backup request, and determining a target virtual machine corresponding to the virtual machine backup request from a cloud platform;
acquiring target metadata corresponding to the target virtual machine from the cloud platform;
determining a first storage position of disk data corresponding to the target virtual machine from a distributed storage system, and determining a second storage position for performing backup operation on the target virtual machine from the distributed storage system;
judging whether the current state information of the target virtual machine meets a preset quick backup condition or not;
and if the current state information of the target virtual machine meets the preset fast backup condition, taking the target metadata and the mapping relation between the first storage position and the second storage position as first target backup data of the target virtual machine, and storing the first target backup data to the second storage position.
Optionally, before the obtaining the target metadata corresponding to the target virtual machine from the cloud platform, the method further includes:
inquiring the state information of the current target virtual machine from the cloud platform;
judging whether the state information of the current target virtual machine meets a preset backup starting condition or not;
if the current state information of the target virtual machine meets the preset backup starting condition, triggering the step of acquiring target metadata corresponding to the target virtual machine from the cloud platform;
and if the current state information of the target virtual machine does not meet the preset backup starting condition, prohibiting triggering the step of acquiring the target metadata corresponding to the target virtual machine from the cloud platform.
Optionally, the determining whether the current state information of the target virtual machine meets a preset backup starting condition includes:
and judging whether the current environment state allows backup or not, or judging whether the current load pressure of the target virtual machine does not reach a preset maximum load pressure value or not.
Optionally, after determining whether the current state information of the target virtual machine meets a preset fast backup condition, the method further includes:
if the current state information of the target virtual machine does not meet the preset rapid backup condition, determining disk data corresponding to the target virtual machine from the distributed storage system;
and taking the target metadata and the disk data as second target backup data of the target virtual machine, and saving the second target backup data to the second saving position.
Optionally, the saving the second target backup data to the second saving location includes:
determining all object data corresponding to the second target backup data, determining a storage location point corresponding to each object data in the second storage location, and then respectively storing all the object data to the corresponding storage location points in the second storage location.
Optionally, after saving the second target backup data to the second saving location, the method further includes:
when the target virtual machine fails, acquiring a recovery request aiming at the target virtual machine;
determining the second storage position for storing the second target backup data of the target virtual machine according to the recovery request, and then reading the second target backup data of the target virtual machine from the second storage position;
and performing data recovery on the target virtual machine by using the read target metadata and the read disk data in the second target backup data.
Optionally, after saving the first target backup data to the second saving location, the method further includes:
acquiring a virtual machine creation request initiated aiming at the first target backup data on the second storage position;
reading the first target backup data on the second storage position according to the virtual machine creation request, determining the first storage position corresponding to the second storage position by using the mapping relation in the first target backup data, and reading the disk data of the target virtual machine from the first storage position;
and creating a corresponding new virtual machine by using the read disk data and the target metadata in the first target backup data.
In a second aspect, the present application discloses a virtual machine data management apparatus, including:
the request acquisition module is used for acquiring a virtual machine backup request and determining a target virtual machine corresponding to the virtual machine backup request from a cloud platform;
the data acquisition module is used for acquiring target metadata corresponding to the target virtual machine from the cloud platform;
the position determining module is used for determining a first storage position of the disk data corresponding to the target virtual machine from a distributed storage system, and determining a second storage position for performing backup operation on the target virtual machine in the distributed storage system;
the judging module is used for judging whether the state information of the current target virtual machine meets a preset quick backup condition or not;
and the storage module is used for taking the target metadata and the mapping relation between the first storage position and the second storage position as first target backup data of the target virtual machine and storing the first target backup data to the second storage position if the state information of the current target virtual machine meets the preset quick backup condition.
In a third aspect, the present application discloses an electronic device comprising a processor and a memory; wherein the processor implements the aforementioned virtual machine data management method when executing the computer program stored in the memory.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned virtual machine data management method.
It can be seen that, in the present application, a virtual machine backup request is first obtained, a target virtual machine corresponding to the virtual machine backup request is determined from a cloud platform, then target metadata corresponding to the target virtual machine is obtained from the cloud platform, then a first storage location of disk data corresponding to the target virtual machine is determined from a distributed storage system, a second storage location for performing backup operation on the target virtual machine is determined in the distributed storage system, and whether current state information of the target virtual machine meets a preset fast backup condition is determined, if the current state information of the target virtual machine meets the preset fast backup condition, the target metadata and a mapping relationship between the first storage location and the second storage location are used as first target backup data of the target virtual machine, and saving the first target backup data to the second saving position. Therefore, the method and the device can make full use of the advantages of multiple nodes of the distributed storage system, realize data backup and data recovery operation at the virtual machine level, reduce backup cost and improve backup efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for managing data of a virtual machine according to the present disclosure;
FIG. 2 is a flow chart illustrating a specific state detection process for a target virtual machine according to the present disclosure;
FIG. 3 is a flowchart of a specific method for managing virtual machine data disclosed herein;
fig. 4 is a schematic structural diagram of a virtual machine data management apparatus disclosed in the present application;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application discloses a virtual machine data management method, which is shown in fig. 1 and comprises the following steps:
step S11: the method comprises the steps of obtaining a virtual machine backup request, and determining a target virtual machine corresponding to the virtual machine backup request from a cloud platform.
In this embodiment, the cloud platform first needs to acquire a backup request sent by a target virtual machine, and then determines, according to feature information of the target virtual machine in the cloud platform, the target virtual machine corresponding to the backup request of the virtual machine. For example, the target virtual machine corresponding to the virtual machine backup request is determined according to the unique identifier of the virtual machine on the cloud platform.
Step S12: and acquiring target metadata corresponding to the target virtual machine from the cloud platform.
In this embodiment, after acquiring a virtual machine backup request and determining a target virtual machine corresponding to the virtual machine backup request from a cloud platform, the cloud platform acquires pre-stored target metadata corresponding to the target virtual machine by querying a local database.
It should be noted that, as shown in fig. 2, before the obtaining the target metadata corresponding to the target virtual machine from the cloud platform, specifically, the method may further include:
step S21: inquiring the state information of the current target virtual machine from the cloud platform;
step S22: judging whether the state information of the current target virtual machine meets a preset backup starting condition or not;
step S23: if the current state information of the target virtual machine meets the preset backup starting condition, triggering the step of acquiring target metadata corresponding to the target virtual machine from the cloud platform;
step S24: and if the current state information of the target virtual machine does not meet the preset backup starting condition, prohibiting triggering the step of acquiring the target metadata corresponding to the target virtual machine from the cloud platform.
It can be understood that, before the target metadata corresponding to the target virtual machine is acquired from the cloud platform, the current running state of the target virtual machine needs to be detected, and whether the target virtual machine allows backup is determined according to the current running state. Specifically, according to the feature information of a target virtual machine in a cloud platform, the current state information of the target virtual machine can be queried, then whether the state information of the target virtual machine meets a preset backup starting condition or not is judged, and if the current state information of the target virtual machine meets the preset backup starting condition, the step of obtaining target metadata corresponding to the target virtual machine from the cloud platform is continuously executed; on the contrary, if the state information of the current target virtual machine does not meet the preset backup starting condition, the step of acquiring the target metadata corresponding to the target virtual machine from the cloud platform is prohibited.
Further, the above determining whether the state information of the current target virtual machine meets a preset backup start condition may specifically include: and judging whether the current environment state allows backup or not, or judging whether the current load pressure of the target virtual machine does not reach a preset maximum load pressure value or not. It can be understood that whether the target virtual machine allows backup can be determined according to the current operating state of the target virtual machine, or whether the target virtual machine allows backup is determined according to the comparison result by comparing the current load pressure of the target virtual machine with a preset maximum load pressure value, and if the current load pressure of the target virtual machine does not reach the preset maximum load pressure value, the target metadata is allowed to be backed up by the virtual machine.
Step S13: and determining a first storage position of the disk data corresponding to the target virtual machine from the distributed storage system, and determining a second storage position for performing backup operation on the target virtual machine in the distributed storage system.
In this embodiment, after the target metadata corresponding to the target virtual machine is acquired from the cloud platform, the disk data corresponding to the target virtual machine may be determined from the distributed storage system, the storage location information corresponding to the disk data, that is, the first storage location, is further determined according to the mount manner of the storage pool in which the disk data is located, and a second storage location for performing multiple copy backup operations on the target virtual machine data is obtained through calculation.
Step S14: and judging whether the current state information of the target virtual machine meets a preset quick backup condition or not.
In this embodiment, after determining a first storage location of the disk data corresponding to the target virtual machine from the distributed storage system and determining a second storage location for performing a backup operation on the target virtual machine from the distributed storage system, it is further required to determine whether current state information of the target virtual machine meets a preset fast backup condition. It should be noted that the current state information of the target virtual machine includes a current environmental state and a current load pressure of the target virtual machine.
Step S15: and if the current state information of the target virtual machine meets the preset fast backup condition, taking the target metadata and the mapping relation between the first storage position and the second storage position as first target backup data of the target virtual machine, and storing the first target backup data to the second storage position.
In this embodiment, it is determined whether the state information of the current target virtual machine meets a preset fast backup condition, and if the state information of the current target virtual machine meets the preset fast backup condition, the obtained target metadata and the mapping relationship between the first storage location and the second storage location are jointly used as first target backup data of the target virtual machine, and the first target backup data is stored in the second storage location.
In this embodiment, after the first target backup data is saved to the second saving location, the result of the backup operation may be monitored by the distributed storage system, if a successful backup is monitored, a corresponding notification of successful backup is returned to the cloud platform, and if a failure of backup is monitored, a corresponding notification of failure of backup is returned to the cloud platform.
In this embodiment, after the saving the first target backup data to the second saving location, the method may further include: acquiring a virtual machine creation request initiated aiming at the first target backup data on the second storage position; reading the first target backup data on the second storage position according to the virtual machine creation request, determining the first storage position corresponding to the second storage position by using the mapping relation in the first target backup data, and reading the disk data of the target virtual machine from the first storage position; and creating a corresponding new virtual machine by using the read disk data and the target metadata in the first target backup data. Specifically, after the first target backup data is saved in the second saving position, when a virtual machine creation request initiated for the first target backup data in the second saving position is acquired, the first target backup data pre-saved in the second saving position may be read according to the virtual machine creation request, then the first saving position corresponding to the second saving position is further determined by using the mapping relationship in the read first target backup data, the disk data corresponding to the target virtual machine is read from the first saving position, and then a corresponding new virtual machine is created by using the read disk data and the target metadata in the first target backup data.
It can be seen that, in the embodiment of the present application, a virtual machine backup request is first obtained, a target virtual machine corresponding to the virtual machine backup request is determined from a cloud platform, then target metadata corresponding to the target virtual machine is obtained from the cloud platform, then a first storage location of disk data corresponding to the target virtual machine is determined from a distributed storage system, a second storage location for performing backup operation on the target virtual machine is determined in the distributed storage system, whether current state information of the target virtual machine meets a preset fast backup condition is determined, if the current state information of the target virtual machine meets the preset fast backup condition, the target metadata and a mapping relationship between the first storage location and the second storage location are used as first target backup data of the target virtual machine, and saving the first target backup data to the second saving position. Therefore, the embodiment of the application can fully utilize the advantages of multiple nodes of the distributed storage system, realize data backup and data recovery operation at the virtual machine level, reduce the backup cost and improve the backup efficiency.
The embodiment of the application discloses a specific virtual machine data management method, which is shown in fig. 3 and comprises the following steps:
step S31: the method comprises the steps of obtaining a virtual machine backup request, and determining a target virtual machine corresponding to the virtual machine backup request from a cloud platform.
Step S32: and acquiring target metadata corresponding to the target virtual machine from the cloud platform.
Step S33: and determining a first storage position of the disk data corresponding to the target virtual machine from the distributed storage system, and determining a second storage position for performing backup operation on the target virtual machine in the distributed storage system.
Step S34: and judging whether the current state information of the target virtual machine meets a preset quick backup condition or not.
Step S35: and if the current state information of the target virtual machine does not meet the preset rapid backup condition, determining the disk data corresponding to the target virtual machine from the distributed storage system.
In this embodiment, after determining whether the state information of the current target virtual machine satisfies a preset fast backup condition, if the state information of the current target virtual machine does not satisfy the preset fast backup condition, that is, the current running state of the current target virtual machine is good, and the load pressure is low, which can backup a large amount of data, the disk data corresponding to the target virtual machine is obtained from the distributed storage system.
Step S36: and taking the target metadata and the disk data as second target backup data of the target virtual machine, and saving the second target backup data to the second saving position.
In this embodiment, after the disk data corresponding to the target virtual machine is determined from the distributed storage system, the target metadata and the disk data are further stored in a unified manner, and are used as second target backup data of the target virtual machine, and then the second target backup data is stored in the second storage location in parallel through the parallel processing performance of the distributed storage system.
Specifically, the saving the second target backup data to the second saving location may include: determining all object data corresponding to the second target backup data, determining a storage location point corresponding to each object data in the second storage location, and then respectively storing all the object data to the corresponding storage location points in the second storage location. In this embodiment, in the process of saving the second target backup data to the second saving position, all Object (i.e., Object) data corresponding to the second target backup data may be determined, then a specific storage location point corresponding to each Object data in the second saving position is determined, and then all the Object data are saved in parallel to a plurality of corresponding storage location points in the second saving position.
In this embodiment, after the saving the second target backup data to the second saving location, the method may further include: when the target virtual machine fails, acquiring a recovery request aiming at the target virtual machine; determining the second storage position for storing the second target backup data of the target virtual machine according to the recovery request, and then reading the second target backup data of the target virtual machine from the second storage position; and performing data recovery on the target virtual machine by using the read target metadata and the read disk data in the second target backup data. It can be understood that, when the target virtual machine fails, a recovery request initiated for the target virtual machine is first obtained, then the second storage location for storing the second target backup data of the target virtual machine is determined from the distributed storage system according to the recovery request, the second target backup data corresponding to the target virtual machine is read from the obtained second storage location, and then the data recovery is performed on the target virtual machine by using the read target metadata and the read disk data in the second target backup data. Specifically, when a target virtual machine fails, a new virtual machine can be created through target metadata in acquired second target backup data, a new virtual machine disk can be created according to disk data in the acquired second target backup data, the new virtual machine disk can be mounted to the new virtual machine, recovery of the failed target virtual machine can be achieved through the mounting, after recovery is completed, the new virtual machine can be named according to specific task requirements, meanwhile, a recovery operation result can be monitored through a distributed storage system, if recovery success is monitored, a corresponding recovery success notification is returned to a cloud platform, and if recovery failure is monitored, a corresponding recovery failure notification is returned to the cloud platform.
For more specific processing procedures of the steps S31, S32, S33, and S34, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated herein.
Therefore, in the embodiment of the application, if the state information of the current target virtual machine does not meet the preset fast backup condition, the disk data corresponding to the target virtual machine is determined from the distributed storage system, the target metadata and the disk data are uniformly stored in the second storage position, the complete backup of the target virtual machine is realized through multiple nodes of the distributed storage system, and the backup efficiency is improved.
Correspondingly, an embodiment of the present application further discloses a virtual machine data management apparatus, as shown in fig. 4, the apparatus includes:
the request obtaining module 11 is configured to obtain a virtual machine backup request, and determine a target virtual machine corresponding to the virtual machine backup request from a cloud platform;
a data obtaining module 12, configured to obtain target metadata corresponding to the target virtual machine from the cloud platform;
a location determining module 13, configured to determine a first storage location of the disk data corresponding to the target virtual machine from a distributed storage system, and determine a second storage location for performing a backup operation on the target virtual machine in the distributed storage system;
the judging module 14 is configured to judge whether the state information of the current target virtual machine meets a preset fast backup condition;
a saving module 15, configured to, if the current state information of the target virtual machine meets the preset fast backup condition, use the target metadata and the mapping relationship between the first saving location and the second saving location as first target backup data of the target virtual machine, and save the first target backup data to the second saving location.
For the specific work flow of each module, reference may be made to corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
It can be seen that, in the embodiment of the present application, a virtual machine backup request is obtained, a target virtual machine corresponding to the virtual machine backup request is determined from a cloud platform, then target metadata corresponding to the target virtual machine is obtained from the cloud platform, then a first storage location of disk data corresponding to the target virtual machine is determined from a distributed storage system, a second storage location for performing backup operation on the target virtual machine is determined in the distributed storage system, whether current state information of the target virtual machine meets a preset fast backup condition is determined, if the current state information of the target virtual machine meets the preset fast backup condition, the target metadata and a mapping relationship between the first storage location and the second storage location are used as first target backup data of the target virtual machine, and saving the first target backup data to the second saving position. Therefore, the embodiment of the application can fully utilize the advantages of multiple nodes of the distributed storage system, realize data backup and data recovery operation at the virtual machine level, reduce the backup cost and improve the backup efficiency.
In some specific embodiments, before the data obtaining module 12, the data obtaining module may specifically include:
the information query unit is used for querying the state information of the current target virtual machine from the cloud platform;
the first condition judgment unit is used for judging whether the state information of the current target virtual machine meets a preset backup starting condition or not;
a triggering unit, configured to trigger the step of acquiring, from the cloud platform, target metadata corresponding to the target virtual machine if the state information of the current target virtual machine meets the preset backup starting condition;
and the trigger forbidding unit is used for forbidding to trigger the step of acquiring the target metadata corresponding to the target virtual machine from the cloud platform if the state information of the current target virtual machine does not meet the preset backup starting condition.
In some specific embodiments, the first condition determining unit may specifically include:
and the second condition judgment unit is used for judging whether the current environment state allows backup or not, or judging whether the current load pressure of the target virtual machine does not reach the maximum value of the preset load pressure or not.
In some specific embodiments, after the determining module 14, the method may further include:
the data determining unit is used for determining the disk data corresponding to the target virtual machine from the distributed storage system if the state information of the current target virtual machine does not meet the preset fast backup condition;
and the first data storage unit is used for taking the target metadata and the disk data as second target backup data of the target virtual machine and storing the second target backup data to the second storage position.
In some specific embodiments, the first data saving unit may specifically include:
and the second data storage unit is used for determining all object data corresponding to the second target backup data, determining a storage location point corresponding to each object data in the second storage location, and then respectively storing all the object data to the corresponding storage location points in the second storage location.
In some specific embodiments, after the first data saving unit, the method may further include:
a recovery request obtaining unit, configured to obtain, when the target virtual machine fails, a recovery request for the target virtual machine;
a location determining unit, configured to determine, according to the recovery request, the second storage location for storing the second target backup data of the target virtual machine;
a first data reading unit, configured to read out the second target backup data of the target virtual machine from the second saving location;
and the data recovery unit is configured to perform data recovery on the target virtual machine by using the target metadata and the disk data in the read second target backup data.
In some specific embodiments, after the saving module 15, the method may further include:
a request creating unit, configured to obtain a virtual machine creation request initiated for the first target backup data in the second saving position;
a second data reading unit, configured to read the first target backup data in the second storage location according to the virtual machine creation request, determine the first storage location corresponding to the second storage location by using the mapping relationship in the first target backup data, and then read the disk data of the target virtual machine from the first storage location;
and the virtual machine creating unit is used for creating a corresponding new virtual machine by using the read disk data and the target metadata in the first target backup data.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 5 is a block diagram of the electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the virtual machine data management method disclosed in any one of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage manner may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, Netware, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the virtual machine data management method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the virtual machine data management method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing detailed description is directed to a method, an apparatus, a device, and a medium for managing virtual machine data provided by the present application, and a specific example is applied in the detailed description to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A virtual machine data management method is characterized by comprising the following steps:
the method comprises the steps of obtaining a virtual machine backup request, and determining a target virtual machine corresponding to the virtual machine backup request from a cloud platform;
acquiring target metadata corresponding to the target virtual machine from the cloud platform;
determining a first storage position of disk data corresponding to the target virtual machine from a distributed storage system, and determining a second storage position for performing backup operation on the target virtual machine from the distributed storage system;
judging whether the current state information of the target virtual machine meets a preset quick backup condition or not; the current state information of the target virtual machine comprises the current environment state and the current load pressure of the target virtual machine;
and if the current state information of the target virtual machine meets the preset fast backup condition, taking the target metadata and the mapping relation between the first storage position and the second storage position as first target backup data of the target virtual machine, and storing the first target backup data to the second storage position.
2. The virtual machine data management method according to claim 1, wherein before the obtaining target metadata corresponding to the target virtual machine from the cloud platform, the method further comprises:
inquiring the state information of the current target virtual machine from the cloud platform;
judging whether the state information of the current target virtual machine meets a preset backup starting condition or not;
if the current state information of the target virtual machine meets the preset backup starting condition, triggering the step of acquiring target metadata corresponding to the target virtual machine from the cloud platform;
and if the current state information of the target virtual machine does not meet the preset backup starting condition, prohibiting triggering the step of acquiring the target metadata corresponding to the target virtual machine from the cloud platform.
3. The method for managing data of a virtual machine according to claim 2, wherein the determining whether the current state information of the target virtual machine meets a preset backup start condition includes:
and judging whether the current environment state allows backup or not, or judging whether the current load pressure of the target virtual machine does not reach a preset maximum load pressure value or not.
4. The method for managing data of a virtual machine according to claim 1, wherein after determining whether the current state information of the target virtual machine meets a preset fast backup condition, the method further comprises:
if the current state information of the target virtual machine does not meet the preset rapid backup condition, determining disk data corresponding to the target virtual machine from the distributed storage system;
and taking the target metadata and the disk data as second target backup data of the target virtual machine, and saving the second target backup data to the second saving position.
5. The virtual machine data management method of claim 4, wherein the saving the second target backup data to the second saving location comprises:
determining all object data corresponding to the second target backup data, determining a storage location point corresponding to each object data in the second storage location, and then respectively storing all the object data to the corresponding storage location points in the second storage location.
6. The virtual machine data management method according to claim 4, wherein after saving the second target backup data to the second saving location, further comprising:
when the target virtual machine fails, acquiring a recovery request aiming at the target virtual machine;
determining the second storage position for storing the second target backup data of the target virtual machine according to the recovery request, and then reading the second target backup data of the target virtual machine from the second storage position;
and performing data recovery on the target virtual machine by using the read target metadata and the read disk data in the second target backup data.
7. The virtual machine data management method according to any one of claims 1 to 6, wherein after saving the first target backup data to the second saving location, further comprising:
acquiring a virtual machine creation request initiated aiming at the first target backup data on the second storage position;
reading the first target backup data on the second storage position according to the virtual machine creation request, determining the first storage position corresponding to the second storage position by using the mapping relation in the first target backup data, and reading the disk data of the target virtual machine from the first storage position;
and creating a corresponding new virtual machine by using the read disk data and the target metadata in the first target backup data.
8. A virtual machine data management apparatus, comprising:
the request acquisition module is used for acquiring a virtual machine backup request and determining a target virtual machine corresponding to the virtual machine backup request from a cloud platform;
the data acquisition module is used for acquiring target metadata corresponding to the target virtual machine from the cloud platform;
the position determining module is used for determining a first storage position of the disk data corresponding to the target virtual machine from a distributed storage system, and determining a second storage position for performing backup operation on the target virtual machine in the distributed storage system;
the judging module is used for judging whether the state information of the current target virtual machine meets a preset quick backup condition or not; the current state information of the target virtual machine comprises the current environment state and the current load pressure of the target virtual machine;
and the storage module is used for taking the target metadata and the mapping relation between the first storage position and the second storage position as first target backup data of the target virtual machine and storing the first target backup data to the second storage position if the state information of the current target virtual machine meets the preset quick backup condition.
9. An electronic device comprising a processor and a memory; wherein the processor, when executing the computer program stored in the memory, implements the virtual machine data management method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the virtual machine data management method of any of claims 1 to 7.
CN202111291141.XA 2021-11-03 2021-11-03 Virtual machine data management method, device, equipment and medium Active CN113722157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111291141.XA CN113722157B (en) 2021-11-03 2021-11-03 Virtual machine data management method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111291141.XA CN113722157B (en) 2021-11-03 2021-11-03 Virtual machine data management method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN113722157A CN113722157A (en) 2021-11-30
CN113722157B true CN113722157B (en) 2022-03-08

Family

ID=78686526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111291141.XA Active CN113722157B (en) 2021-11-03 2021-11-03 Virtual machine data management method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113722157B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114328029B (en) * 2022-03-02 2022-06-03 苏州浪潮智能科技有限公司 Backup method and device of application resources, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105242990A (en) * 2015-10-28 2016-01-13 浪潮(北京)电子信息产业有限公司 Cloud platform based data backup method and apparatus
CN109324927A (en) * 2018-09-06 2019-02-12 郑州云海信息技术有限公司 A kind of virtual machine backup method and system based on distributed memory system
CN109344094A (en) * 2018-09-26 2019-02-15 郑州云海信息技术有限公司 Address mapping relation feedback method, device, equipment and readable storage medium storing program for executing
CN109582443A (en) * 2018-12-06 2019-04-05 国网江西省电力有限公司信息通信分公司 Virtual machine standby system based on distributed storage technology
CN109902034A (en) * 2019-02-25 2019-06-18 杭州宏杉科技股份有限公司 Snapshot creation method, device, electronic equipment and machine readable storage medium
CN110750325A (en) * 2019-02-25 2020-02-04 北京嘀嘀无限科技发展有限公司 Mirror image backup method and device of virtual machine, fault recovery method and device and electronic equipment
CN111625401A (en) * 2020-05-29 2020-09-04 浪潮电子信息产业股份有限公司 Data backup method and device based on cluster file system and readable storage medium
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
CN105242990A (en) * 2015-10-28 2016-01-13 浪潮(北京)电子信息产业有限公司 Cloud platform based data backup method and apparatus
CN109324927A (en) * 2018-09-06 2019-02-12 郑州云海信息技术有限公司 A kind of virtual machine backup method and system based on distributed memory system
CN109344094A (en) * 2018-09-26 2019-02-15 郑州云海信息技术有限公司 Address mapping relation feedback method, device, equipment and readable storage medium storing program for executing
CN109582443A (en) * 2018-12-06 2019-04-05 国网江西省电力有限公司信息通信分公司 Virtual machine standby system based on distributed storage technology
CN109902034A (en) * 2019-02-25 2019-06-18 杭州宏杉科技股份有限公司 Snapshot creation method, device, electronic equipment and machine readable storage medium
CN110750325A (en) * 2019-02-25 2020-02-04 北京嘀嘀无限科技发展有限公司 Mirror image backup method and device of virtual machine, fault recovery method and device and electronic equipment
CN111625401A (en) * 2020-05-29 2020-09-04 浪潮电子信息产业股份有限公司 Data backup method and device based on cluster file system and readable storage medium
CN111651305A (en) * 2020-08-05 2020-09-11 腾讯科技(深圳)有限公司 Virtual machine backup method, virtual machine backup assembly and cloud computing system

Also Published As

Publication number Publication date
CN113722157A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
TWI728036B (en) Information processing method, device and system
CN109614226B (en) Kubernetes-based stateful application storage management method
US10838829B2 (en) Method and apparatus for loading data from a mirror server and a non-transitory computer readable storage medium
CN110795029B (en) Cloud hard disk management method, device, server and medium
CN104239156A (en) External service call method and system
CN113722157B (en) Virtual machine data management method, device, equipment and medium
CN109165112B (en) Fault recovery method, system and related components of metadata cluster
CN112583760B (en) Object storage access method, device, equipment and computer storage medium
CN115599302A (en) Data writing method, device, equipment and storage medium
CN115426374A (en) Service quality control method, device, equipment and storage medium
CN109445988B (en) Heterogeneous disaster recovery method, device, system, server and disaster recovery platform
CN105740049A (en) Control method and apparatus
CN114328026A (en) Virtual disk backup method, device, equipment and medium
CN116701063B (en) Persistence method, device and system for internal memory state data for data language of digital networking
US11301436B2 (en) File storage method and storage apparatus
US10693731B2 (en) Flow entry management method and device
CN109032762B (en) Virtual machine backtracking method and related equipment
CN115314361B (en) Server cluster management method and related components thereof
CN113301173A (en) Domain name updating system and method, message forwarding method and server
CN115543687A (en) ETCD cluster service data recovery method, device, equipment and storage medium
CN114995762A (en) Thick backup roll capacity expansion method, device, equipment and storage medium
CN111522649B (en) Distributed task allocation method, device and system
CN114817134A (en) Snapshot task monitoring method, device, equipment and medium
CN113687910A (en) Method, device, equipment and storage medium for managing USB (universal serial bus) equipment in cluster
CN111767152B (en) Method, apparatus and computer readable storage medium for detecting resource idling

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
GR01 Patent grant
GR01 Patent grant