CN106126427A - A kind of method and system of fast quick-recovery test - Google Patents

A kind of method and system of fast quick-recovery test Download PDF

Info

Publication number
CN106126427A
CN106126427A CN201610524104.1A CN201610524104A CN106126427A CN 106126427 A CN106126427 A CN 106126427A CN 201610524104 A CN201610524104 A CN 201610524104A CN 106126427 A CN106126427 A CN 106126427A
Authority
CN
China
Prior art keywords
test
resource
backup
main frame
recovery
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610524104.1A
Other languages
Chinese (zh)
Inventor
郝建明
张炼
秦京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201610524104.1A priority Critical patent/CN106126427A/en
Publication of CN106126427A publication Critical patent/CN106126427A/en
Pending legal-status Critical Current

Links

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/1456Hardware arrangements for backup
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • 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

Landscapes

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

Abstract

The present invention provides the method and system that a kind of fast quick-recovery is tested, and wherein, the method for this fast quick-recovery test includes: in resource pool, newly-built one corresponding to testing the first resource backup machine of main frame, and in first resource backup machine, record has the configuration information of test main frame;Test data are backed up by first resource backup machine, generates test backup data file;According to the instruction of user, the configuration information of first resource backup machine is configured to test the configuration information of main frame.By implementing the present invention, can be under the basis that test environment is controlled, it is achieved the fast quick-recovery of test data, thus realize quickly repeatedly testing, improve testing efficiency.

Description

A kind of method and system of fast quick-recovery test
Technical field
The present invention is the field tests about computer IT system, specifically, is the side about the test of a kind of fast quick-recovery Method and system.
Background technology
During the construction and O&M of IT system, it is often necessary to system is carried out various test, the business of checking can be used Or the target such as impact property, system reliability, high availability.In test process, the preparation rank of the biggest test often Section, if there being unpredictable impact, often needs retest, the test implementation often that conventional automated test is paid close attention to Stage, and test the preparatory stage and fail to have technological means efficient, reliable, that be suitable for.
At present in the test of IT system, especially real-time transaction system, maximum difficulty does not lies in test process, and In how ensureing the effectiveness of data and environment, such as the test of transaction system, required primary data often with the transaction scale of construction, friendship Easily coverage is directly proportional, and needs test efficient, true to nature, and preparation requirement and the workload of data volume are the biggest, with bank Card is swiped the card as a example by transaction test, and the primary data amount needed for 5,000,000 transactions is 50,000,000 data storehouse records, prepares in test In the stage, just data import the time just needing 4 hours.Test environment itself uncontrollable, brings test result for test Insecure risk and the demand repeatedly tested.
In existing testing and control and technology, seldom can have and both are jointly controlled, under the basis that test environment is controlled, real Now test the fast quick-recovery of data, thus ensure to test quality, improve testing efficiency.
Summary of the invention
The main purpose of the embodiment of the present invention is the method and system providing a kind of fast quick-recovery to test, with at test wrapper Under the basis that border is controlled, it is achieved the fast quick-recovery of test data, thus improve testing efficiency, can realize the most repeatedly Test.
To achieve these goals, the embodiment of the present invention provides the method for a kind of fast quick-recovery test, described method bag Include: in resource pool, newly-built one corresponding to testing the first resource backup machine of main frame, records and have in described first resource backup machine The configuration information of described test main frame;Test data are backed up by described first resource backup machine, generates test data Backup file;According to the instruction of user, according to described test backup data file, described test main frame is recovered.
In one embodiment, in resource pool after the newly-built one first resource backup machine corresponding to test main frame, described Method also include: in described first resource backup machine, record the configuration information of described test main frame.
In one embodiment, according to described test backup data file, described test main frame is recovered, specifically wraps Include: in described resource pool, newly-built one corresponds to the Secondary resource backup machine of described test main frame;Described Secondary resource is backed up The configuration information of machine is configured to the configuration information of described test main frame;With the test master described in the replacement of described Secondary resource backup machine Machine.
In one embodiment, above-mentioned according to described test backup data file, described test main frame is recovered, Specifically include: in described resource pool, newly-built one corresponds to the information resources backup machine of described test main frame;By described test number According in backup file access pattern to described information resources backup machine;With the test master described in the replacement of described information resources backup machine Machine.
In one embodiment, above-mentioned according to described test backup data file, described test main frame is recovered, Specifically include: in external storage resource, generate memory image according to described test backup data file;By described test data Place volume group unloads volume, the memory image described in carry, with the test data described in replacement.
The embodiment of the present invention also provides for the system of a kind of fast quick-recovery test, and described system includes: first resource is newly-built Unit, in resource pool newly-built one corresponding to testing the first resource backup machine of main frame, in described first resource backup machine Record has the configuration information of described test main frame;First backup units, is used in described first resource backup machine test number According to backing up, generate test backup data file;First recovery unit, for the instruction according to user, according to described test Backup data file, recovers described test main frame.
In one embodiment, the newly-built unit of above-mentioned first resource is additionally operable to: record in described first resource backup machine The configuration information of described test main frame.
In one embodiment, the first above-mentioned recovery unit specifically for: receive user instruction, in described resource pool The newly-built one Secondary resource backup machine corresponding to described test main frame;The configuration information of described Secondary resource backup machine is configured to The configuration information of described test main frame;With the test main frame described in the replacement of described Secondary resource backup machine.
In one embodiment, the first above-mentioned recovery unit specifically for: receive user instruction, in described resource pool The newly-built one information resources backup machine corresponding to described test main frame;Described test backup data file is recovered to the most described the In three resource backup machines;With the test main frame described in the replacement of described information resources backup machine.
In one embodiment, the first above-mentioned recovery unit specifically for: according to described test backup data file outside Put in storage resource and generate memory image;Described test data place volume group is unloaded volume, and the memory image described in carry, to replace Described test data.
Having the beneficial effects that of the embodiment of the present invention, different data types (static, dynamically) and different data contents (file, catalogue, data base, table), different resource capacities, determine different backups and recovery, restored method, and the present invention is real Execute example and provide the Fast Restoration method met under different demand and environmental condition, for quickly/repeatedly/efficiently test provide can Can manage it, integral data and the diversity of resource, and be managed collectively, realize interdepartmental by ssh client, NFS and different scripts System, across hardware, across the integration of software.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, embodiment will be described below The accompanying drawing used required in is briefly described, it should be apparent that, the accompanying drawing in describing below is only some of the present invention Embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to according to these Accompanying drawing obtains other accompanying drawing.
Fig. 1 is the flow chart of the method for the fast quick-recovery test according to the embodiment of the present invention;
Fig. 2 is the structural representation of the data management module 20 according to the embodiment of the present invention;
Fig. 3 is the structural representation of the resource management module 30 according to the embodiment of the present invention;
Fig. 4 is the fast quick-recovery test that the data management module 20 according to the embodiment of the present invention performs the embodiment of the present invention The flow chart of method;
Fig. 5 is that each step of transaction system execution traditional test process time-consumingly adds up schematic diagram;
Fig. 6 is the structural representation of the system of the fast quick-recovery test according to the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise Embodiment, broadly falls into the scope of protection of the invention.
The embodiment of the present invention provides the method and system of a kind of fast quick-recovery test.Below in conjunction with accompanying drawing, the present invention is carried out Describe in detail.
The embodiment of the present invention provides the method for a kind of fast quick-recovery test, as it is shown in figure 1, the method for this fast quick-recovery test Mainly comprise the steps that
Step S101: newly-built one corresponding to testing the first resource backup machine of main frame in resource pool;
Step S102: back up test data in first resource backup machine, generates test backup data file;
Step S103: according to the instruction of user, according to test backup data file, test main frame is recovered.
By above-mentioned step S101 to step S103, the method for the fast quick-recovery test of the embodiment of the present invention can will be located Back up as an entirety in information such as the main frame of test environment, data base, configuration attributes, in order to fast in subsequent process The test environment that quick-recovery is original, thus enter into conveniently and efficiently in next test process.
Have below in conjunction with each step in the method that the fast quick-recovery of the embodiment of the present invention is tested by concrete example Body explanation.
Above-mentioned step S101, in resource pool, newly-built one corresponding to testing the first resource backup machine of main frame.
Initial environment and the data of building test prepare, and confirm that environmental condition (is not initiating actual test process after possessing Before), carry out data classification analysis, formulate different strategies, and be managed collectively.In the embodiment of the present invention, can be to use PHP builds B/S framework, uses MVC model, it is provided that the page carries out strategy main body, the typing of resource, updates, deletes management.This reality Execute the Policy model underlying attribute information provided in example as shown in table 1.
Table 1
For test system itself, different tactful main body be can be combined and arrange in pairs or groups, emulation test system of such as concluding the business, its The tactful main body comprised is main frame 1 (key=1), main frame 2 (key=2), data base 1 (key=3), data base 2 (key=4) Deng.
In the specific implementation, can be according to the difference of test environment, by test main frame, this survey of use required in test process Try the attribute information (numbering, IP, parameter etc.) of main frame and test targeted test data, being configured to strategy main body.
For above-mentioned test main frame, in resource pool, newly-built one corresponding to testing the first resource backup machine of main frame.Its In, this first resource backup machine is the backup reference file needed for providing for follow-up multiple resource backups, recovery process, for reality The most repeatedly recover, it is necessary to retain the backup file of a benchmark, and it is main that first resource backup machine is not directly returned to test Machine.It should be noted that in this embodiment, it is to illustrate with the test main frame that this newly-built resource is corresponding.But In the middle of actual application, resource newly-built in resource pool can also is that data file, host server, database, can basis Depending on the practical service environment of resource, the present invention is not limited thereto.
In one embodiment, in above-mentioned first resource backup machine, record has the configuration information of test main frame, and this configuration is believed Breath includes testing the numbering of main frame, IP address, parameter etc..
Test data are backed up in first resource backup machine by above-mentioned step S102, generate test data backup File.
For different types of data in above-mentioned tactful main body, there is different backup scenarios, different scripts realize, Select when typing strategy main body, according to the configuration of typing in its strategy main body, different tactful carriers can be generated.
In actual applications, corresponding each strategy main body has its unique backup method, can write corresponding backup script Perform backup operation.
Such as: for data base, table level is other, and the most single table or the backup of multilist, script is generic script, and parameter is table Name set;For data base, storehouse rank, generally data base whole storehouse mirror back-up, such as the backup of db2, parameter is data base Name and access user, password etc.;For file system, generally tar bag or gzip bag, script is generic script, and parameter is complete Path file directory listing.
Wherein, strategy carrier is mainly used in depositing the backup of strategy main body, according to different tactful main bodys, can be that table is standby Part, file backup, DB Backup etc..It should be noted that same data or environment main (such as test main frame) can configure For different several strategy main bodys, adapt to different backups and recovery demand.Such as, strategy one as configurable in online library is table Backup, then need to generate a full storehouse table and derive backup, as strategy carrier, be placed in resource pool and (include that ip, path etc. are wanted Element).Equally, it is whole library backup that online library can also be configured strategy two, then need to generate the DB Backup mirror of a db2backup Picture, as strategy carrier, is placed in resource pool.
In being embodied as, it is by carrying out resource distribution in resource pool, using this resource as above-mentioned tactful carrier, Database backup file in storage strategy main body, from content above, the database backup file described in this embodiment Being only the one in test data, the present invention is not limited thereto.Resource itself can be data file, host server, number According to storehouse etc..Resource itself need to set up mapping relations with strategy main body, and its mapping relations are 1 strategy main body: N resource, i.e. one plan Slightly main body can corresponding multiple resources.Needing exist for explanation, resource can also be strategy main body itself.
Then, in the resource corresponding to above-mentioned tactful main body, the database file in strategy main body is backed up, Generate database backup file.
Above-mentioned step S103, according to the instruction of user, according to test backup data file, carries out extensive to test main frame Multiple.
After the backup completing test initial data, test initial data can be triggered according to the instruction of user or operation Recovery operation, according in above-mentioned steps S102 generate database backup file recover this test main frame.
Specifically, can be the newly-built one Secondary resource backup machine corresponding to this test main frame in resource pool;By this The configuration information of two resource backup machines is configured to the configuration information of this test main frame, replaces this test master with Secondary resource backup machine Machine, thus realize fast and effeciently recovering original test environment and test data, it is simple to open test process again.Different Its restoration methods of the data of type is different, such as, for data base, table level is other, and general restoration methods is that whole table imports, and recovers foot This is generic script, and parameter is library name, table name;For data base, storehouse rank, general restoration methods is that whole storehouse is recovered, and recovers foot This is generic script, and parameter is library name, user name, password;For file system, generally tar bag or gzip bag, script is logical With script, parameter is tar bag name, host subscriber, password etc..
In one embodiment, above-mentioned steps S103 also can mainly be realized by following steps: in resource pool newly-built one Information resources backup machine corresponding to test main frame;Test backup data file is recovered to information resources backup machine;With this Information resources backup machine replaces above-mentioned test main frame.
In this embodiment, in the case of being primarily directed to unnecessary main frame and database resource, new in resource pool Build an information resources backup machine, and the test backup data file of the first backup units backup is recovered to information resources backup machine In;Then, test main frame is replaced with this information resources backup machine.
In another embodiment, above-mentioned steps S103 also can mainly be realized by following steps: standby according to test data Part file generates memory image in external storage resource;Test data place volume group is unloaded volume, and carry memory image, to replace Test data.
In this embodiment, in the case of being primarily directed to there is unnecessary storage resource (external disk storage resource), root (B/C volume of synchronization of such as Hewlett-Packard Corporation or storage are fast to generate memory image in external storage resource according to test backup data file The snapped volume of former data base is generated according to technology), then, former test data place volume group is unloaded volume, the memory image that carry is above-mentioned, To replace former test data.
In actual applications, the method for above-mentioned fast quick-recovery test can be applicable to data management module as shown in Figure 2 In 20.Data management module 20 main working process is as follows: policy management module 201 has been responsible for the typing of strategy, deletion, more Newly, in policy check module 202, existing strategy can be verified, in order to complete the assembling of subsequent commands, it is ensured that life The effectiveness of order.The various demands of test system can be generated instruction, by order sending module by order management module 203 204 transmission to resource management modules 30 as shown in Figure 3 carry out testing the backup of data, recovery and environmental renovation.Certain strategy The corresponding test data of main body or environment main, and association attributes is set.
As it is shown on figure 3, resource management module 30 is in order to operate the resource in test environment.Resource management module work Make stream as follows: the order receiver module 301 of resource management module 30 can receive data management module 20 and send the order of coming, and Being forwarded to ssh client 302, ssh client 302 obtains the IP address in order, performs user, password, path and script name Title, parameter information etc., perform associated script to resource host, complete action required.
In a preferred embodiment, data management module 20 performs the method for fast quick-recovery test of the embodiment of the present invention Implement process as shown in Figure 4.
In this embodiment, being carried out bank card and swipe the card mock trading test, its online library changes very big the most afterwards, Also it is the main object of test analysis simultaneously, is then set to dynamic data, fast quick-recovery (the initial shape before the mainly test of its demand State).First component strategy main body, and the corresponding information of typing strategy main body in data management module 20, such as table 2 institute Show.
Table 2
Title cupa-pit-paonldb-0
Numbering (key) 1011
IP address 172.16.184.22
Strategy container name DB Backup
Strategy carrier positions //sharenfs/cupa-pit-paonldb/20150515
Strategy backup script: //sharenfs/scripts/dbbackup.sh
Policing parameter one paonldb
Policing parameter two pa_onldb
………… …………
Then, backup operation is performed for above-mentioned tactful main body (key=1011).
Such as in this example, first by a resource newly-increased in resource management module 30, for online master library strategy (strategy Main body) one backup, its attribute definition typing are as shown in table 3.
Table 3
In data management module 20, for strategy main body (key=1011), perform backup operation, use resource (key =3988), then by order management module 203, generating instruction, send to resource management module 30, resource management module 30 is adjusted Performing DB Backup with corresponding backup script, its result can generate a data base under the path that strategy carrier is configured Backup.
After test terminates, when needing test environment and test data are recovered, perform recovery operation.
First, newly-increased resource in resource management module 30, its attribute definition is as shown in table 4.
Table 4
Title cupa-paonldb-backup-2
Numbering (key) 3989
IP address 172.16.184.22
Corresponding tactful main body (key) 1011
Recover script 1 //sharenfs/scripts/db2restore.sh
Whether IP maps It is
Restore script 1 //sharenfs/scripts/db2refresh.sh
······ ······
In data management module 20, for strategy main body (key=1011), perform recovery operation, use resource (key =3989), then by order management module 203, generating instruction, send to resource management module 30, resource management module 30 is adjusted Performing database recovery with the corresponding script that recovers, its result can be by the data base backup recovery under strategy carrier to numbered 3989, ip addresses are the data base of 172.16.184.22.Needing exist for explanation, recovery object now is only data Storehouse.
The basic environment of its resource host, such as host information, user, example etc., can pass through manual creation, and only possible with Former strategy main body is consistent (depending on whether applied environment requires).
Finally, recovery operation is performed.
In data management module 20, for strategy main body (key=1011), perform recovery operation, use resource (key =3989), then by order management module 203, generating instruction, send to resource management module 30, resource management module 30 is adjusted Restore with the corresponding script execution environment that restores.Recovery should be tried one's best transparence, is i.e. not required to carry out application or operation system itself Amendment.
Wherein, according to the difference of available resources, concrete recovery operation can be divided into following several.
Restored method one: can write recovery script, revises the online library cataloguing address of each application server host, is revised as Main frame corresponding to resource (key=3989), restarts and applies.
Restored method two: the IP address of amendment resource (key=3989) is the IP address of former strategy main body (key=1011) (including network card configuration and network port configuration), resource backup is used to replace former strategy main body.
Restored method three: if any storage resource (external storage resource) more than needed, former data base can be placed on external dish, (B/C volume of synchronization or the storage snapping technique of such as Hewlett-Packard Corporation generate the fast of former data base to generate a external dish database mirroring According to volume), direct carry snapped volume during recovery.
In above-mentioned restored method, method one can realize with script, but need to revise application configuration, and method two needs hand adaptation Network operation realizes, but transparence degree is high, it is not necessary to amendment application configuration.In the case of resource is more than needed, the best way is Method three.
In a concrete application example, transaction system application the embodiment of the present invention fast quick-recovery test method it Before, in its test process, each step is time-consumingly added up as shown in Fig. 5 and table 5.
Table 5
Transaction system application the embodiment of the present invention fast quick-recovery test method after, online master library data import, The management storehouse parameter importing time can instantaneous complete (if resource-constrained, to use extensive restoration strategy main body, then time-consumingly subtracted by 2400 minutes It is 30 minutes, if resource is had more than needed, then restores and can complete in 1 minute), whole testing efficiency was foreshortened to by original 6930 minutes About 4560 minutes, improved efficiency 65.8%.
The embodiment of the present invention provides the system of a kind of fast quick-recovery test, as shown in Figure 6, the system of this fast quick-recovery test Specifically include that the newly-built unit of first resource the 1, first backup units 2 and the first recovery unit 3 etc..
Wherein, the newly-built unit of first resource 1 is standby corresponding to the first resource of test main frame in resource pool newly-built one Part machine;First backup units 2, for backing up test data in first resource backup machine, generates test data backup literary composition Part;Test main frame, for the instruction according to user, according to test backup data file, is recovered by the first recovery unit 3.
By each above-mentioned ingredient, the system of the fast quick-recovery test of the embodiment of the present invention can will be in test The information such as the main frame of environment, data base, configuration attribute back up as an entirety, in order to fast quick-recovery in subsequent process Original test environment, thus enter into conveniently and efficiently in next test process.
Enter below in conjunction with each ingredient in the system that the fast quick-recovery of the embodiment of the present invention is tested by concrete example Row illustrates.
The newly-built unit of above-mentioned first resource 1, in resource pool newly-built one corresponding to testing the first resource of main frame Backup machine.
Initial environment and the data of building test prepare, and confirm that environmental condition (is not initiating actual test process after possessing Before), carry out data classification analysis, formulate different strategies, and be managed collectively.In the embodiment of the present invention, can be to use PHP builds B/S framework, uses MVC model, it is provided that the page carries out strategy main body, the typing of resource, updates, deletes management.This reality Execute the Policy model underlying attribute provided in example as shown in table 1.
For test system itself, different tactful main body be can be combined and arrange in pairs or groups, emulation test system of such as concluding the business, its The tactful main body comprised is main frame 1 (key=1), main frame 2 (key=2), data base 1 (key=3), data base 2 (key=4) Deng.
In the specific implementation, can be according to the difference of test environment, by test main frame, this survey of use required in test process The attribute information (numbering, IP, parameter etc.) of examination main frame and test targeted test data as an entirety, is configured to plan Slightly main body.
Backed up by the newly-built unit of first resource 1 newly-built one first resource corresponding to above-mentioned test main frame in resource pool Machine, in first resource backup machine, record has the configuration information of test main frame.Wherein, this first resource backup machine is for follow-up multiple Backup reference file needed for the offer of resource backup, recovery process, in order to realize repeatedly recovering, it is necessary to retains a benchmark Backup file, and be not directly returned to first resource backup machine test main frame.It should be noted that in this embodiment, it is Illustrate with the test main frame that this newly-built resource is corresponding.But in the middle of reality application, money newly-built in resource pool Source can also is that data file, host server, database, can be according to the practical service environment of resource depending on, the present invention is also It is not limited.
In one embodiment, in above-mentioned first resource backup machine, record has the configuration information of test main frame, and this configuration is believed Breath includes testing the numbering of main frame, IP address, parameter etc., wants the dissimilar of resource backup according to test main frame, the present embodiment Support expansible number of parameters, and provide unified interface to call for command module.
The first above-mentioned backup units 2, for test data being backed up in first resource backup machine, generates test Backup data file.
For different types of data in above-mentioned tactful main body, there is different backup scenarios, different scripts realize, Select when typing strategy main body, according to the configuration of typing in its strategy main body, different tactful carriers can be generated.
In actual applications, corresponding each strategy main body has its unique backup method, can write corresponding backup script Perform backup operation.
Such as: for data base, table level is other, and the most single table or the backup of multilist, script is generic script, and parameter is table Name set;For data base, storehouse rank, generally data base whole storehouse mirror back-up, such as the backup of db2, parameter is data base Name and access user, password etc.;For file system, generally tar bag or gzip bag, script is generic script, and parameter is complete Path file directory listing.
Wherein, strategy carrier is mainly used in depositing the backup of strategy main body, according to different tactful main bodys, can be that table is standby Part, file backup, DB Backup etc..It should be noted that same data or environment main (such as test main frame) can configure For different several strategy main bodys, adapt to different backups and recovery demand.Such as, strategy one as configurable in online library is table Backup, then need to generate a full storehouse table and derive backup, as strategy carrier, be placed in resource pool and (include that ip, path etc. are wanted Element).Equally, it is whole library backup that online library can also be configured strategy two, then need to generate the DB Backup mirror of a db2backup Picture, as strategy carrier, is placed in resource pool.
In being embodied as, it is by carrying out resource distribution in resource pool, using this resource as above-mentioned tactful carrier, Database backup file in storage strategy main body, from content above, the database backup file described in this embodiment Being only the one in test data, the present invention is not limited thereto.Resource itself can be data file, host server, number According to storehouse etc..Resource itself need to set up mapping relations with strategy main body, and its mapping relations are 1 strategy main body: N resource, i.e. one plan Slightly main body can corresponding multiple resources.Needing exist for explanation, resource can also be strategy main body itself.
Then, in the resource corresponding to above-mentioned tactful main body, the database file in strategy main body is backed up, Generate database backup file.
The first above-mentioned recovery unit 3, for the instruction according to user, according to test backup data file, main to test Machine recovers.
After the backup completing test initial data, test initial data can be triggered according to the instruction of user or operation Recovery operation, recover this test main frame according to the database backup file that the first backup units 2 carries out backing up.
Specifically, can be the newly-built one Secondary resource backup machine corresponding to this test main frame in resource pool;By this The configuration information of two resource backup machines is configured to the configuration information of this test main frame, replaces this test master with Secondary resource backup machine Machine, thus realize fast and effeciently recovering original test environment and test data, it is simple to open test process again.Different Its restoration methods of the data of type is different, such as, for data base, table level is other, and general restoration methods is that whole table imports, and recovers foot This is generic script, and parameter is library name, table name;For data base, storehouse rank, general restoration methods is that whole storehouse is recovered, and recovers foot This is generic script, and parameter is library name, user name, password;For file system, generally tar bag or gzip bag, script is logical With script, parameter is tar bag name, host subscriber, password etc..
In one embodiment, the first recovery unit 3 of the embodiment of the present invention is specifically for performing following steps: at resource pool In newly-built one corresponding to test main frame information resources backup machine;Test backup data file is recovered to information resources backup machine In;Above-mentioned test main frame is replaced with this information resources backup machine.
In this embodiment, in the case of being primarily directed to unnecessary main frame and database resource, logical in resource pool Cross the newly-built information resources backup machine of the newly-built unit of Secondary resource, and pass through what the first backup units was backed up by the second recovery unit Test backup data file recovers to information resources backup machine;Then, above-mentioned test is replaced with this information resources backup machine Main frame.
In another embodiment, the first recovery unit 3 of the embodiment of the present invention is specifically for performing following steps: according to survey Examination backup data file generates memory image in external storage resource;Test data place volume group is unloaded volume, carry storage mirror Picture, with replacement test data.
In this embodiment, in the case of being primarily directed to there is unnecessary storage resource (external disk storage resource), logical Cross memory image signal generating unit and in external storage resource, generate memory image (such as Hewlett-Packard Corporation according to test backup data file B/C volume synchronization or storage snapping technique generate former data base snapped volume), then, by the second replacement unit by former test Data place volume group unloads volume, the memory image that carry is above-mentioned, to replace former test data.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method can be led to Program of crossing completes to instruct relevant hardware, and this program can be stored in a computer read/write memory medium, such as ROM/RAM, magnetic disc, CD etc..
Particular embodiments described above, has been carried out the purpose of the present invention, technical scheme and beneficial effect the most in detail Describe in detail bright, be it should be understood that the specific embodiment that the foregoing is only the present invention, the guarantor being not intended to limit the present invention Protect scope, all within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. done, should be included in this Within the protection domain of invention.

Claims (10)

1. the method for a fast quick-recovery test, it is characterised in that described method includes:
In resource pool, newly-built one corresponding to testing the first resource backup machine of main frame;
Test data are backed up by described first resource backup machine, generates test backup data file;
According to the instruction of user, according to described test backup data file, described test main frame is recovered.
The method of fast quick-recovery the most according to claim 1 test, it is characterised in that newly-built one corresponds in resource pool After the first resource backup machine of test main frame, described method also includes:
The configuration information of described test main frame is recorded in described first resource backup machine.
The method of fast quick-recovery the most according to claim 2 test, it is characterised in that according to described test data backup literary composition Part, recovers described test main frame, specifically includes:
In described resource pool, newly-built one corresponds to the Secondary resource backup machine of described test main frame;
The configuration information of described Secondary resource backup machine is configured to the configuration information of described test main frame;
With the test main frame described in the replacement of described Secondary resource backup machine.
The method of fast quick-recovery the most according to claim 1 test, it is characterised in that according to described test data backup literary composition Part, recovers described test main frame, specifically includes:
In described resource pool, newly-built one corresponds to the information resources backup machine of described test main frame;
Described test backup data file is recovered to described information resources backup machine;
With the test main frame described in the replacement of described information resources backup machine.
The method of fast quick-recovery the most according to claim 1 test, it is characterised in that according to described test data backup literary composition Part, recovers described test main frame, specifically includes:
In external storage resource, memory image is generated according to described test backup data file;
Described test data place volume group is unloaded volume, and the memory image described in carry, with the test data described in replacement.
6. the system of a fast quick-recovery test, it is characterised in that described system includes:
The newly-built unit of first resource, in resource pool newly-built one corresponding to testing the first resource backup machine of main frame;
First backup units, for backing up test data in described first resource backup machine, generates test data standby Part file;
First recovery unit, for the instruction according to user, according to described test backup data file, to described test main frame Recover.
The system of fast quick-recovery the most according to claim 6 test, it is characterised in that the newly-built unit of described first resource It is additionally operable to: in described first resource backup machine, record the configuration information of described test main frame.
The system of fast quick-recovery the most according to claim 7 test, it is characterised in that the first described recovery unit is concrete For:
Receiving the instruction of user, in described resource pool, newly-built one corresponds to the Secondary resource backup machine of described test main frame;
The configuration information of described Secondary resource backup machine is configured to the configuration information of described test main frame;
With the test main frame described in the replacement of described Secondary resource backup machine.
The system of fast quick-recovery the most according to claim 6 test, it is characterised in that the first described recovery unit is concrete For:
Receiving the instruction of user, in described resource pool, newly-built one corresponds to the information resources backup machine of described test main frame;
Described test backup data file is recovered to described information resources backup machine;
With the test main frame described in the replacement of described information resources backup machine.
The system of fast quick-recovery the most according to claim 6 test, it is characterised in that the first described recovery unit tool Body is used for:
In external storage resource, memory image is generated according to described test backup data file;
Described test data place volume group is unloaded volume, and the memory image described in carry, with the test data described in replacement.
CN201610524104.1A 2016-07-06 2016-07-06 A kind of method and system of fast quick-recovery test Pending CN106126427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610524104.1A CN106126427A (en) 2016-07-06 2016-07-06 A kind of method and system of fast quick-recovery test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610524104.1A CN106126427A (en) 2016-07-06 2016-07-06 A kind of method and system of fast quick-recovery test

Publications (1)

Publication Number Publication Date
CN106126427A true CN106126427A (en) 2016-11-16

Family

ID=57468843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610524104.1A Pending CN106126427A (en) 2016-07-06 2016-07-06 A kind of method and system of fast quick-recovery test

Country Status (1)

Country Link
CN (1) CN106126427A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967190A (en) * 2017-11-23 2018-04-27 郑州云海信息技术有限公司 A kind of disaster recovery test method
CN109376073A (en) * 2018-09-14 2019-02-22 珠海金山网络游戏科技有限公司 A kind of memory of test environment and restoration methods
CN111767286A (en) * 2020-06-29 2020-10-13 携程旅游网络技术(上海)有限公司 Data mirror image backup method, test method and system based on order
CN112631643A (en) * 2019-10-08 2021-04-09 华晨宝马汽车有限公司 Comprehensive operation and maintenance management method, system, equipment and medium
CN113836018A (en) * 2021-09-24 2021-12-24 中国建设银行股份有限公司 Backup method and related device for test environment configuration parameters

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876940A (en) * 2009-11-30 2010-11-03 北京飞天诚信科技有限公司 Automatic test method and device
CN102413010A (en) * 2011-11-18 2012-04-11 华为技术有限公司 Testing environment deployment method and device
CN103473148A (en) * 2012-06-08 2013-12-25 中兴通讯股份有限公司 Method and device for restoring testing environment
US20150347242A1 (en) * 2014-05-28 2015-12-03 Unitrends, Inc. Disaster Recovery Validation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876940A (en) * 2009-11-30 2010-11-03 北京飞天诚信科技有限公司 Automatic test method and device
CN102413010A (en) * 2011-11-18 2012-04-11 华为技术有限公司 Testing environment deployment method and device
CN103473148A (en) * 2012-06-08 2013-12-25 中兴通讯股份有限公司 Method and device for restoring testing environment
US20150347242A1 (en) * 2014-05-28 2015-12-03 Unitrends, Inc. Disaster Recovery Validation

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967190A (en) * 2017-11-23 2018-04-27 郑州云海信息技术有限公司 A kind of disaster recovery test method
CN109376073A (en) * 2018-09-14 2019-02-22 珠海金山网络游戏科技有限公司 A kind of memory of test environment and restoration methods
CN109376073B (en) * 2018-09-14 2021-08-03 珠海金山网络游戏科技有限公司 Test environment memory and recovery method
CN112631643A (en) * 2019-10-08 2021-04-09 华晨宝马汽车有限公司 Comprehensive operation and maintenance management method, system, equipment and medium
CN112631643B (en) * 2019-10-08 2024-05-24 华晨宝马汽车有限公司 Comprehensive operation and maintenance management method, system, equipment and medium
CN111767286A (en) * 2020-06-29 2020-10-13 携程旅游网络技术(上海)有限公司 Data mirror image backup method, test method and system based on order
CN113836018A (en) * 2021-09-24 2021-12-24 中国建设银行股份有限公司 Backup method and related device for test environment configuration parameters
CN113836018B (en) * 2021-09-24 2024-04-09 中国建设银行股份有限公司 Backup method and related device for testing environment configuration parameters

Similar Documents

Publication Publication Date Title
US11243928B2 (en) Method and system for cloning enterprise content management systems
CN106126427A (en) A kind of method and system of fast quick-recovery test
CN103368767B (en) For disposing the method and system of software application in the Internet cloud of fault tolerant
US9678680B1 (en) Forming a protection domain in a storage architecture
CN109582443A (en) Virtual machine standby system based on distributed storage technology
CN104216801B (en) The data copy method and system of a kind of Virtual environment
US8966382B1 (en) Managing production and replica copies dynamically
CN106951345A (en) A kind of conformance test method and device of magnetic disk of virtual machine data
CN103309650B (en) The generation method and apparatus of persistent layer code
CN104516796B (en) A kind of network element backup and restoration methods and device based on command set
CN105095103A (en) Storage device management method and device used for cloud environment
CN113672350B (en) Application processing method and device and related equipment
US20140223168A1 (en) Testing a configuration change
CN107818029A (en) A kind of cloud hard disc data recovers the automated testing method of uniformity
US9207966B2 (en) Method and system for providing a high-availability application
US20220067065A1 (en) Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs
US20100106749A1 (en) Reorganizing table-based data objects
US10387262B1 (en) Federated restore of single instance databases and availability group database replicas
US20140195721A1 (en) Instantaneous save/restore of virtual machines with persistent memory
US10409629B1 (en) Automated host data protection configuration
CN104978279A (en) Continuous data protection method based on data block
CN111291354A (en) Device binding management method, system, readable storage medium and device terminal
CN105426780A (en) Classification auditing method and system applied to operation behavior auditing system
CN110471730A (en) Methods of exhibiting, system, big screen system and medium based on Echarts
AU2021268828B2 (en) Secure data replication in distributed data storage environments

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161116