CN107506295B - Virtual machine backup testing method and device and computer readable storage medium - Google Patents

Virtual machine backup testing method and device and computer readable storage medium Download PDF

Info

Publication number
CN107506295B
CN107506295B CN201710568268.9A CN201710568268A CN107506295B CN 107506295 B CN107506295 B CN 107506295B CN 201710568268 A CN201710568268 A CN 201710568268A CN 107506295 B CN107506295 B CN 107506295B
Authority
CN
China
Prior art keywords
virtual machine
backup
tested
test
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
CN201710568268.9A
Other languages
Chinese (zh)
Other versions
CN107506295A (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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201710568268.9A priority Critical patent/CN107506295B/en
Publication of CN107506295A publication Critical patent/CN107506295A/en
Application granted granted Critical
Publication of CN107506295B publication Critical patent/CN107506295B/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/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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/45591Monitoring or debugging support

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)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a test method of virtual machine backup, which comprises the following steps: acquiring a source backup file of a virtual machine to be tested; creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file; and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule. The invention also discloses a test device for virtual machine backup and a computer readable storage medium. The invention can solve the technical problems that the virtualization platform cannot sense the availability of the backup and cannot drill and test the recovery of the backup.

Description

Virtual machine backup testing method and device and computer readable storage medium
Technical Field
The present invention relates to the field of virtual machine technologies, and in particular, to a method and an apparatus for testing a virtual machine backup, and a computer-readable storage medium.
Background
At present, an enterprise data center increasingly realizes "cloud" through a virtualization technology, a large number of virtual machines running in a virtualization platform are used for bearing a key service system of a client, and in order to guarantee data security and service continuity, the client generally backs up the virtual machines through the virtualization platform.
The backup is a basic data protection function of virtualization, a virtualization platform generally realizes backup at a virtual machine level through a backup function of the platform, and if backup recovery fails, the backup has no value on data protection. The existing common virtual machine backup is realized by mirroring, and the defects are as follows: 1) when backup is unavailable due to the situations of data damage, virtual machine failure, disk bad track, hardware failure and the like, the platform cannot sense the availability of the backup; 2) the backup recovery cannot be exercised and tested.
Disclosure of Invention
The invention mainly aims to provide a test method, equipment and a computer readable storage medium for virtual machine backup, and aims to solve the technical problems that a virtualization platform cannot sense the availability of backup and cannot drill and test the recovery of the backup.
In order to achieve the above object, the present invention provides a method for testing a virtual machine backup, which comprises the following steps:
acquiring a source backup file of a virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
Optionally, before the step of obtaining the source backup file of the virtual machine to be tested, the method further includes:
binding a plurality of virtual machines related to a preset service type to form an application program group;
and taking the virtual machine in the application program group as a virtual machine to be tested.
Optionally, after the step of creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file, the creating of the virtual sandbox further includes:
judging whether the virtual machine to be tested is started normally within a preset time length or not;
if yes, executing the following steps: carrying out recoverability test on the virtual machine to be tested according to a preset test rule;
if not, judging that the virtual machine backup to be tested is unavailable.
Optionally, the step of performing a backup recoverability test on the virtual machine to be tested according to a preset test rule includes:
sending a preset network access instruction to the virtual machine to be tested through a virtualization platform;
if the fact that the virtual machine to be tested normally responds to the network access instruction is detected, it is judged that the virtual machine to be tested passes the backup recoverability test;
or running a custom script on the virtual machine to be tested;
and if the user-defined script is detected to normally run, judging that the virtual machine to be tested passes the backup recoverability test.
Optionally, the method for testing the virtual machine backup further includes:
and generating a backup recoverability test report of the virtual machine to be tested according to the test result.
In addition, to achieve the above object, the present invention further provides a test device for virtual machine backup, where the test device for virtual machine backup includes: the virtual machine backup test system comprises a memory, a processor and a virtual machine backup test program which is stored on the memory and can run on the processor, wherein when the virtual machine backup test program is executed by the processor, the following steps are realized:
acquiring a source backup file of a virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
Optionally, the test program backed up by the virtual machine further implements the following steps when executed by the processor:
binding a plurality of virtual machines related to a preset service type to form an application program group;
and taking the virtual machine in the application program group as a virtual machine to be tested.
Optionally, the test program backed up by the virtual machine further implements the following steps when executed by the processor:
judging whether the virtual machine to be tested is started normally within a preset time length or not;
if yes, executing the following steps: carrying out recoverability test on the virtual machine to be tested according to a preset test rule;
if not, judging that the virtual machine backup to be tested is unavailable.
Optionally, the test program backed up by the virtual machine further implements the following steps when executed by the processor:
sending a preset network access instruction to the virtual machine to be tested through a virtualization platform;
if the fact that the virtual machine to be tested normally responds to the network access instruction is detected, it is judged that the virtual machine to be tested passes the backup recoverability test;
or running a custom script on the virtual machine to be tested;
and if the user-defined script is detected to normally run, judging that the virtual machine to be tested passes the backup recoverability test.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, on which a virtual machine backup test program is stored, and when executed by a processor, the virtual machine backup test program implements the following steps:
acquiring a source backup file of a virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
The method includes the steps that a source backup file of a virtual machine to be tested is obtained; creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file; and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule. The virtual machine is created in the virtual sandbox according to the source backup file of the virtual machine, the backup recoverability test is carried out on the created virtual machine, the availability of the backup of the virtual machine can be tested on the premise of not influencing production business, the technical problems that a virtualization platform cannot sense the availability of the backup and cannot drill and test the recovery of the backup are solved, the recoverability of the backup once needed is ensured, and the safety of data and the continuity of business are guaranteed.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a method for testing a virtual machine backup according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a testing method for virtual machine backup according to the present invention;
fig. 4 is a flowchart illustrating a testing method for virtual machine backup according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring a source backup file of a virtual machine to be tested; creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file; and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
In the prior art, virtual machine backup is realized by mirroring, and the defects are as follows: 1) when backup is unavailable due to the situations of data damage, virtual machine failure, disk bad track, hardware failure and the like, the platform cannot sense the availability of the backup; 2) the backup recovery cannot be exercised and tested.
The virtual machine is created in the virtual sandbox according to the source backup file of the virtual machine, the backup recoverability test is carried out on the created virtual machine, and the availability of the backup of the virtual machine can be tested on the premise of not influencing production business, so that the technical problems that a virtualization platform cannot sense the availability of the backup and cannot drill and test the recovery of the backup are solved, and the safety of data and the continuity of business are guaranteed.
The invention provides a test method for virtual machine backup.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
The test equipment for virtual machine backup in the embodiment of the present invention may be a PC, a server (e.g., an X86 server), or a terminal equipment such as a virtual machine, which is equipped with a virtualization platform.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the device architecture shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a test program for virtual machine backup.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call a test program of the virtual machine backup stored in the memory 1005, and perform the following operations:
acquiring a source backup file of a virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
Further, the processor 1001 may call the test program of the virtual machine backup stored in the memory 1005, and also perform the following operations:
binding a plurality of virtual machines related to a preset service type to form an application program group;
and taking the virtual machine in the application program group as a virtual machine to be tested.
Further, the processor 1001 may call the test program of the virtual machine backup stored in the memory 1005, and also perform the following operations:
judging whether the virtual machine to be tested is started normally within a preset time length or not;
if yes, executing the following steps: carrying out recoverability test on the virtual machine to be tested according to a preset test rule;
if not, judging that the virtual machine backup to be tested is unavailable.
Further, the processor 1001 may call the test program of the virtual machine backup stored in the memory 1005, and also perform the following operations:
sending a preset network access instruction to the virtual machine to be tested through a virtualization platform;
if the fact that the virtual machine to be tested normally responds to the network access instruction is detected, it is judged that the virtual machine to be tested passes the backup recoverability test;
or running a custom script on the virtual machine to be tested;
and if the user-defined script is detected to normally run, judging that the virtual machine to be tested passes the backup recoverability test.
Further, the processor 1001 may call the test program of the virtual machine backup stored in the memory 1005, and also perform the following operations:
and generating a backup recoverability test report of the virtual machine to be tested according to the test result.
Based on the hardware structure, the embodiment of the test method for the virtual machine backup is provided.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a testing method for virtual machine backup according to the present invention, where the method includes:
step S10, obtaining a source backup file of the virtual machine to be tested;
a virtual machine refers to a complete computer system with complete hardware system functionality, which is emulated by software, running in a completely isolated environment. Virtualization means that one physical computer is virtualized into a plurality of logical computers through virtualization technology, the logical computers are simultaneously operated on one computer, each logical computer can operate different operating systems, and application programs can operate in mutually independent spaces without mutual influence, so that the resource utilization rate of the computer is remarkably improved.
At present, an enterprise data center increasingly realizes "cloud" through a virtualization technology, a large number of virtual machines running in a virtualization platform are used for bearing a key service system of a client, and in order to guarantee data security and service continuity, the client generally backs up the virtual machines through the virtualization platform, but if backup recovery fails, the backup has no value on data protection. Therefore, the invention provides a method for carrying out backup recoverability test on a virtual machine.
The test method for the virtual machine backup can be realized through a virtualization platform. Firstly, a virtualization platform obtains a source backup file of a virtual machine to be tested, wherein the virtual machine to be tested can be specified by a tester according to business needs. In one embodiment, the tester may only specify a certain virtual machine for backup recoverability testing, and in further embodiments, due to the complexity of modern data centers, a large number of virtual machines are dependent on each other, such as for a simple three-tier web application: the front end is a web server, the middle layer is an application server, all of which are supported by some type of database server, and if the three functions are not available, the restoration condition of the application cannot be really tested, so that a tester can bind the three virtual machines to an application program group as a virtual machine to be tested and perform backup recoverability test on the virtual machine, and thus an enterprise can ensure and verify the backup recoverability of the whole application program instead of only a single virtual machine.
The source backup files of the virtual machine are generally mirror image files, the virtualization platform initializes the virtual storage first, and then obtains the source backup files of the virtual machine from the designated backup path.
Step S20, creating a virtual sandbox, creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
in this step, the virtualization platform creates a virtual sandbox to provide an isolated operating environment for the backup recoverability test of the virtual machine.
After the source backup file of the virtual machine to be tested is acquired, an area for safely starting the virtual machines is needed, and the production environment is not affected. In this case, the virtual sandbox is effectively an isolated area isolated from the production network, but still maps the production network settings. By using isolated virtual sandbox techniques during backup recoverability verification, administrators and application owners can test the recoverability of backup files in this environment.
In the virtual sandbox, a virtualization platform creates a virtual machine according to an obtained virtual machine source backup file, specifically, a manager may configure test parameters for each virtual machine to be tested in advance, where the test parameters include, but are not limited to, an application group to which the virtual machine belongs, an application group role, a virtual machine operating system, memory and storage occupied by the virtual machine, start delay time of the virtual machine, and the like, and then the virtualization platform creates and starts the virtual machine to be tested according to the configured test parameters, including allocating memory and storage for the virtual machine according to the configured test parameters, controlling the virtual machine to start according to the set start delay time, and the like.
For example, the virtual machines 1, 2, and 3 to be tested may all belong to a web application group according to web service configuration, roles of the web application group are web, MySQL (relational database management system), and Apache (web server software), operating systems of the virtual machines 1, 2, and 3 are all Windows service 2008R2, start delay times of the virtual machines 1, 2, and 3 are 300ms, 100ms, and 200ms, respectively, and the subsequent virtual machines 1, 2, and 3 are started according to the configured start delay times. It should be noted that the purpose of configuring the delayed start time is to ensure the preconditions and the relevance of the virtual machine service, for example, it may be set that the database virtual machine is started first, the back-end virtual machine is started second, and the front-end virtual machine is started last, so as to provide a precondition guarantee for the simulation operation of the service.
And step S30, performing backup recoverability test on the virtual machine to be tested according to a preset test rule.
After the virtual machine to be tested is created and started, the virtualization platform performs a backup recoverability test on the virtual machine to be tested according to a preset test rule.
Specifically, the backup recoverability test may include: 1. signal detection: installing VMtools software (a virtual machine enhancement software) in a virtual machine operating system, then executing preset commands on the virtual machine, such as cursor control, data query, enabling/disabling an application program and the like, and if a signal returned by the VMtools software is matched with a preset signal, the test is passed; 2. ping test-the server sends a set of pings to the virtual machines through the spoofed IP address. If the virtual machine responds to these pings, the test passes; 3. application testing-depending on the type of virtual machine being tested, the virtualization management software may run a set of application specific automatic tests, for example, if the virtual machine is an AD controller (domain controller), the LDAP (Lightweight Directory Access Protocol) port may be set to 389, if the system responds, the test passes; 4. custom script-running a series of custom scripts against the target virtual machine, if the scripts run normally, the test passes.
The backup recoverability test method can be flexibly combined or used independently according to actual needs, and does not limit the backup recoverability test method of the virtual machine.
In addition, before each test, a snapshot file is generated according to the source backup file of the virtual machine so as to record the state of the virtual machine before the test, and the test rollback and the test check can be conveniently carried out subsequently.
In this embodiment, a source backup file of a virtual machine to be tested is obtained; creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file; and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule. In the embodiment, the virtual machine is created in the virtual sandbox according to the source backup file of the virtual machine, and the backup recoverability test is performed on the created virtual machine, so that the availability of the backup of the virtual machine can be tested on the premise of not influencing production services, the technical problems that a virtualization platform cannot sense the availability of the backup and cannot perform drilling and testing on the recovery of the backup are solved, the recoverability of the backup once needed is ensured, and the safety of data and the continuity of services are guaranteed.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a testing method for virtual machine backup according to a second embodiment of the present invention. Based on the above embodiment shown in fig. 2, before step S10, the method may further include:
step S40, binding a plurality of virtual machines related to the preset service type to form an application program group;
and step S50, taking the virtual machine in the application program group as the virtual machine to be tested.
In this embodiment, the virtualization platform system may bundle a plurality of virtual machines related to a preset service type according to a setting instruction of a manager, so as to form an application group, where the application group represents the entire application program, and the application group includes a plurality of virtual machines, and the plurality of virtual machines have service relevance. For example, when the service type is an APP service, the front end, the back end, and the database virtual machine of the APP application may be bundled to form an APP application group; when the service type is web service, the virtual machines of the three-layer architecture (a website front-end server, a website background server, and a database server) of the web service can be bundled to form a web application group, and the like.
For each application program group, a name, a role, a description and virtual machines contained in the description can be set, and for each virtual machine in the application program group, various test parameters such as an operating system, the description, occupied memory and storage, a recovery time point, start delay time and the like can be set so as to ensure that the backup recoverability test of the virtual machine is carried out subsequently according to the set test parameters.
When the test is started, a tester selects one or more application program groups as application program groups to be tested, and uses the virtual machines in the selected application program groups as virtual machines to be tested. For example, there are currently two groups of applications A and B that are assigned to two different logical networks that are connected to a virtual switch within the production environment, and within a virtual sandbox where the IP and network information of the virtual machines are the same as the actual production environment, the virtual machines may run and communicate with each other, and the access of the virtual sandbox is restricted to the production network.
In this embodiment, an application program group is formed by binding a plurality of virtual machines related to a preset service type, and the virtual machines in the application program group are used as virtual machines to be tested, so that a relevance test can be performed on the virtual machines related to the application program, and the backup recoverability of a service system composed of the virtual machines is verified, that is, a service-level backup recoverability test is realized, and the security of service-level data and the continuity of services are guaranteed.
Further, referring to fig. 4, fig. 4 is a flowchart illustrating a testing method for virtual machine backup according to a third embodiment of the present invention. Based on the above-mentioned embodiment shown in fig. 2, after step S20, the method may further include:
step S60, judging whether the virtual machine to be tested is started normally within a preset time length;
if yes, executing step S30, and performing a recoverability test on the virtual machine to be tested according to a preset test rule;
if not, step S70 is executed to determine that the virtual machine backup to be tested is unavailable.
In this embodiment, when the virtual machine to be tested is started, the virtualization platform may determine whether the current start of the virtual machine to be tested is overtime, and if so, re-initiate the start command to start the virtual machine to be tested, and so on. If the virtual machine to be tested is detected to be normally started within the preset time length, performing recoverability test on the virtual machine to be tested according to a preset test rule, and if the virtual machine to be tested is not normally started within the preset time length, possibly causing data damage, virtual machine failure, bad magnetic disk track or hardware failure and the like, judging that the virtual machine to be tested is unavailable for backup at the moment, and generating a test report according to the unavailable backup result.
In the embodiment, the condition that the virtual machine to be tested cannot be normally started is considered, and when the virtual machine to be tested cannot be normally started, the virtual machine to be tested is judged to be unavailable for backup, so that testers can timely remove faults to perform subsequent backup recoverability test on the virtual machine.
Further, based on the first, second, and third embodiments of the testing method for virtual machine backup of the present invention, a fourth embodiment of the testing method for virtual machine backup of the present invention is proposed. In this embodiment, step S30 may include:
step S31, sending a preset network access instruction to the virtual machine to be tested through the virtualization platform;
step S32, if it is detected that the virtual machine to be tested normally responds to the network access instruction, determining that the virtual machine to be tested passes the backup recoverability test;
or, step S33, running a custom script on the virtual machine to be tested;
step S34, if the user-defined script is detected to run normally, the virtual machine to be tested is judged to pass the backup recoverability test.
In this embodiment, the method for performing a backup recoverability test on a virtual machine to be tested may be: sending a preset network access instruction to a virtual machine to be tested through a virtualization platform, if the virtual machine to be tested normally responds to the network access instruction, judging that the virtual machine to be tested passes a backup recoverability test, for example, a server sends a group of pings to the virtual machine through a disguised IP address, and if the virtual machine responds to the pings, the test is successful. The method for performing backup recoverability test on the virtual machine to be tested can also comprise the following steps: running a custom script on a virtual machine to be tested; if the self-defined script is detected to normally run, the virtual machine to be tested is judged to pass the backup recoverability test, for example, Select TOP (query operation) can be run for SQLserver (database software), or rest (representational state transfer) can be run for web server, and if the virtual machine normally responds to the operations, the test is successful.
Of course, for a certain virtual machine to be tested, the two methods can be simultaneously adopted to perform backup recoverability test, and flexible setting can be performed during specific implementation.
Further, based on the above embodiment, the method for testing virtual machine backup according to the present invention may further include: and generating a backup recoverability test report of the virtual machine to be tested according to the test result.
After the virtual machine to be tested is subjected to backup recoverability test, the virtualization platform generates a backup recoverability test report of the virtual machine to be tested according to a test result so as to clearly inform a client of feasibility of backup Recovery and a corresponding RTO/RPO index, wherein RTO (Recovery Time Objective) is the maximum Time length of service interruption tolerable for an enterprise; the RPO (Recovery Point object) refers to a time Point corresponding to data recovered after the service is recovered.
According to the recoverability test report, the customer can accurately know the backup security of the service system, and when the service system backup is unavailable, the customer can timely take corresponding measures (such as re-backup, data repair, hardware repair and the like) to remedy the backup data, so that the data security and the service continuity are guaranteed.
The invention also provides a test device for the virtual machine backup.
The test equipment for virtual machine backup comprises: a memory, a processor, and a virtual machine backup test program stored on the memory and operable on the processor, the virtual machine backup test program when executed by the processor implementing the steps of:
acquiring a source backup file of a virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
Further, when executed by the processor, the test program backed up by the virtual machine further implements the following steps:
binding a plurality of virtual machines related to a preset service type to form an application program group;
and taking the virtual machine in the application program group as a virtual machine to be tested.
Further, when executed by the processor, the test program backed up by the virtual machine further implements the following steps:
judging whether the virtual machine to be tested is started normally within a preset time length or not;
if yes, executing the following steps: carrying out recoverability test on the virtual machine to be tested according to a preset test rule;
if not, judging that the virtual machine backup to be tested is unavailable.
Further, when executed by the processor, the test program backed up by the virtual machine further implements the following steps:
sending a preset network access instruction to the virtual machine to be tested through a virtualization platform;
if the fact that the virtual machine to be tested normally responds to the network access instruction is detected, it is judged that the virtual machine to be tested passes the backup recoverability test;
or running a custom script on the virtual machine to be tested;
and if the user-defined script is detected to normally run, judging that the virtual machine to be tested passes the backup recoverability test.
The method implemented when the test program of the virtual machine backup running on the processor is executed may refer to the embodiment of the test method of the virtual machine backup of the present invention, and is not described herein again.
The invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a test program for virtual machine backup, and when executed by a processor, the test program for virtual machine backup implements the following steps:
acquiring a source backup file of a virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
The method implemented when the test program of the virtual machine backup running on the processor is executed may refer to the embodiment of the test method of the virtual machine backup of the present invention, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as a general magnetic disk or a solid state disk SSD) as described above, and includes several instructions for enabling a testing device for virtual machine backup to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A test method for virtual machine backup is characterized in that the test method for virtual machine backup comprises the following steps:
binding a plurality of virtual machines related to a preset service type to form an application program group, wherein the plurality of virtual machines have service relevance;
taking the virtual machine in the application program group as a virtual machine to be tested;
acquiring a source backup file of the virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
2. The method for testing virtual machine backup according to claim 1, wherein the step of creating a virtual sandbox, creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file further comprises:
judging whether the virtual machine to be tested is started normally within a preset time length or not;
if yes, executing the following steps: carrying out recoverability test on the virtual machine to be tested according to a preset test rule;
if not, judging that the virtual machine backup to be tested is unavailable.
3. The method for testing virtual machine backup according to any one of claims 1 to 2, wherein the step of performing backup recoverability test on the virtual machine to be tested according to a preset test rule comprises:
sending a preset network access instruction to the virtual machine to be tested through a virtualization platform;
if the fact that the virtual machine to be tested normally responds to the network access instruction is detected, it is judged that the virtual machine to be tested passes the backup recoverability test;
or running a custom script on the virtual machine to be tested;
and if the user-defined script is detected to normally run, judging that the virtual machine to be tested passes the backup recoverability test.
4. The method for testing virtual machine backup according to claim 3, wherein the method for testing virtual machine backup further comprises:
and generating a backup recoverability test report of the virtual machine to be tested according to the test result.
5. A test device for virtual machine backup is characterized in that the test device for virtual machine backup comprises: the virtual machine backup test system comprises a memory, a processor and a virtual machine backup test program which is stored on the memory and can run on the processor, wherein when the virtual machine backup test program is executed by the processor, the following steps are realized:
binding a plurality of virtual machines related to a preset service type to form an application program group, wherein the plurality of virtual machines have service relevance;
taking the virtual machine in the application program group as a virtual machine to be tested;
acquiring a source backup file of the virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
6. The virtual machine backup test device of claim 5, wherein the virtual machine backup test program when executed by the processor further performs the steps of:
judging whether the virtual machine to be tested is started normally within a preset time length or not;
if yes, executing the following steps: carrying out recoverability test on the virtual machine to be tested according to a preset test rule;
if not, judging that the virtual machine backup to be tested is unavailable.
7. The virtual machine backup test apparatus of any of claims 5 to 6, wherein the virtual machine backup test program when executed by the processor further implements the steps of:
sending a preset network access instruction to the virtual machine to be tested through a virtualization platform;
if the fact that the virtual machine to be tested normally responds to the network access instruction is detected, it is judged that the virtual machine to be tested passes the backup recoverability test;
or running a custom script on the virtual machine to be tested;
and if the user-defined script is detected to normally run, judging that the virtual machine to be tested passes the backup recoverability test.
8. A computer-readable storage medium having stored thereon a virtual machine backup test program, the virtual machine backup test program when executed by a processor implementing the steps of:
binding a plurality of virtual machines related to a preset service type to form an application program group, wherein the plurality of virtual machines have service relevance;
taking the virtual machine in the application program group as a virtual machine to be tested;
acquiring a source backup file of a virtual machine to be tested;
creating a virtual sandbox, and creating and starting the virtual machine to be tested in the virtual sandbox according to the obtained source backup file;
and carrying out backup recoverability test on the virtual machine to be tested according to a preset test rule.
CN201710568268.9A 2017-07-12 2017-07-12 Virtual machine backup testing method and device and computer readable storage medium Active CN107506295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710568268.9A CN107506295B (en) 2017-07-12 2017-07-12 Virtual machine backup testing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710568268.9A CN107506295B (en) 2017-07-12 2017-07-12 Virtual machine backup testing method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107506295A CN107506295A (en) 2017-12-22
CN107506295B true CN107506295B (en) 2021-04-09

Family

ID=60678958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710568268.9A Active CN107506295B (en) 2017-07-12 2017-07-12 Virtual machine backup testing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107506295B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10853122B2 (en) * 2019-04-10 2020-12-01 EMC IP Holding Company LLC Dynamically selecting optimal instance type for disaster recovery in the cloud
US11341234B1 (en) * 2019-06-05 2022-05-24 EMC IP Holding Company LLC System for securely recovering backup and data protection infrastructure
CN110597662B (en) * 2019-09-11 2022-08-30 深圳市科力锐科技有限公司 Backup data automatic verification method and device, user equipment and storage medium
CN110727501B (en) * 2019-09-29 2021-12-17 上海英方软件股份有限公司 Practicing method and system based on virtual machine backup data
CN113688035B (en) * 2021-08-06 2023-12-05 卢知白 Database dual-activity center verification method and system based on sandbox environment
CN114138557B (en) * 2021-11-26 2022-05-27 北京大道云行科技有限公司 Consistency test method and device for rollback data of stored snapshot

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7689859B2 (en) * 2006-12-20 2010-03-30 Symantec Operating Corporation Backup system and method
CN106878204B (en) * 2016-12-21 2020-09-08 新华三技术有限公司 Virtual machine creating method and device
CN106776143A (en) * 2016-12-27 2017-05-31 北京奇虎科技有限公司 The method and terminal device of a kind of mirror back-up for end application

Also Published As

Publication number Publication date
CN107506295A (en) 2017-12-22

Similar Documents

Publication Publication Date Title
CN107506295B (en) Virtual machine backup testing method and device and computer readable storage medium
US9146839B2 (en) Method for pre-testing software compatibility and system thereof
CN107451040B (en) Method and device for positioning fault reason and computer readable storage medium
US10025674B2 (en) Framework for running untrusted code
US9396200B2 (en) Auto-snapshot manager analysis tool
JP6788178B2 (en) Setting support program, setting support method and setting support device
US20160132420A1 (en) Backup method, pre-testing method for environment updating and system thereof
EP3311529A1 (en) Resilience as a service
CN103973515A (en) Network card stability testing method
CN111813495A (en) Node testing method and device, storage medium and electronic device
CN109274537B (en) Continuous network virtualization platform system
US20180307574A1 (en) Automated test generation for multi-interface and multi-platform enterprise virtualization management environment
CN113676368B (en) Method and device applied to ATS network performance test
CN111404780B (en) Function test method and device for remote direct memory access network cluster
US20140013317A1 (en) Computer-readable recording medium, patch determination method, and information processing apparatus
CN112286786A (en) Database testing method and device and server
CN115237441A (en) Upgrade test method, device and medium based on cloud platform
CN115373916A (en) Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium
US11621893B2 (en) Methods, systems, and computer readable media for establishing dynamic agent associations in a cloud computing environment
CN110618884A (en) Fault monitoring method, virtualized network function module manager and storage medium
CN111737130B (en) Public cloud multi-tenant authentication service testing method, device, equipment and storage medium
JP6818654B2 (en) Test automation equipment, test methods, and programs
CN110287066B (en) Server partition migration method and related device
CN114328196A (en) Method, device and equipment for testing data leakage prevention system and storage medium
CN113127369A (en) Processing method and device for execution script

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