CN102541686B - Method for achieving backup and disaster recovery of system by utilizing virtual machine - Google Patents
Method for achieving backup and disaster recovery of system by utilizing virtual machine Download PDFInfo
- Publication number
- CN102541686B CN102541686B CN201110387202.2A CN201110387202A CN102541686B CN 102541686 B CN102541686 B CN 102541686B CN 201110387202 A CN201110387202 A CN 201110387202A CN 102541686 B CN102541686 B CN 102541686B
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- disaster recovery
- territory
- backup
- computer system
- 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
Links
Abstract
The invention provides a method for achieving backup and disaster recovery of a system by utilizing a virtual machine, which utilizes a Remus module of a Xen virtual machine to achieve the disaster recovery of a computer system and utilizes a libvirt bank commonly used by all the virtual machines to achieve the backup of the computer system. When the disaster recovery and the backup are achieved by utilizing the virtual machine operating the computer system, no extra installation of disaster recovery and backup software is required, time and cost for maintaining and upgrading a disaster recovery program and a backup program are reduced, and the problems of file read conflict and the like occurring in a traditional disaster recovery and backup method can be effectively avoided.
Description
Technical field
The present invention relates to computer system association area, relate in particular to a kind of virtual machine that uses to the method for the backup and disaster recovery that realize system.
Background technology
In the middle of the operational process of computer system, computer system and its assembly can be subjected to various fault, and these faults can cause the loss of computer system data.Such as, perhaps a memory device of a computer system can break down suddenly (as unexpected power failure), and the data on the equipment of being stored in can be caused to read.Can cause the mistake of data on memory device to the operation of software or hardware error, and perhaps any other all can break down because of this error in data with the related computer system of this memory device or assembly.
In order to reduce the risk of loss of data, data copy can be become many parts and be saved on different memory devices by the user of computer system.On the other hand, what user can be frequent is installed in the middle of computer system by some corresponding backup softwares, in the middle of the use procedure of computer system, and backup software meeting self-timing computer system is backed up.But under many circumstances, perhaps, some or multiple application is used, and this time, stand-by program performed suddenly, and perhaps these application programs are just opening one or more file, at this moment stand-by program is wanted to access these files and is not allowed to, thus causes the failure of backup file.
Therefore, some backup softwares can define a lot of code library for various application program, by code library, stand-by program is attempted and application program carries out communicating or cause application program that data are submitted to file thus make these files can be backed up software to back up by producing some flip flop equipments.But when application program changes time (such as application version changes), stand-by program also will change accordingly.On the other hand, some other files (registration table of such as windows) can be opened by frequent, are therefore difficult to back up.
Under many circumstances; disaster recovery configuration is used to provide extra protection for the loss of data produced because of fault; these faults are not only also comprise environmental factor (such as power-off suddenly, breaking out of fire) around system by the generation of computer system own.In disaster recovery configuration, the state of data periodically can be sent to another computer system from a certain computer system by state-detection bag, and in some cases, second computer system geographically can away from first computer system.If first computer system there occurs fault and can not use, data can safe being stored in the middle of second computer system.Also have in some cases, when first computer system there occurs fault can not use time, operate in application in first computer system and automatically can restart in the middle of second computer system and continue process data.But the disaster recovery software run on the computer systems can run into some problems, and these problems and backup software have similar situation.When application program is just being opened or used some file time, disaster recovery software reads this file simultaneously and generates and detects bag, thus having conflict generation, application program can stop disaster recovery software to read file, causes generating the failure of state-detection bag.In addition, if the application in first computer system will be operated at second computer system reboot, need all running statuses of this application to copy in second computer system, and this process is very complicated.
Summary of the invention
In view of existing computer system backup and the defect of disaster recovery, the object of the invention is to propose to use Xen virtual machine to realize backup and the disaster recovery of computer system.
Use virtual machine to a method for the backup and disaster recovery that realize system, linux operating system is provided with Xen virtual machine, and the method comprises disaster recovery step:
(21) virtual machine is monitored, catch the state that virtual machine is current;
(22) copy needs the virtual machine image of carrying out disaster recovery to disaster recovery node;
(23) current virtual machine state is periodically copied to disaster recovery node;
(24) virtual machine breaks down, and disaster recovery node recovers virtual machine state.
Said method also comprises backup-step:
(11) virtual machine is monitored, catch the state that virtual machine is current;
(12) pending operation is carried out to virtual machine;
(13) virtual machine image is copied;
(14) virtual machine running status is recovered.
The operating system of described computing machine comprises a territory 0, territory 0 is a linux kernel revised, uniquely operate in the virtual machine on Xen supervisory routine, it has the authority of access physical I/O resource, simultaneously and other virtual machines that system is run carry out alternately, multiple virtual machine can be built, and managing virtual equipment, can carry out the management role such as hanging up to virtual machine; In the middle of native system, user needed the computer system used to be installed on virtual machine territory 1, one or more application program can be run in territory 1, stand-by program and strategy execution program are installed in the middle of the virtual machine in territory 0.
Wherein in step (11), by Xen virtual machine territory 0, each virtual machine is monitored, and periodically obtain each virtual machine running status.
Wherein in step (12), by Xen virtual machine territory 0, each virtual machine is managed, when needs back up virtual machine state time, pending operation is carried out to virtual machine.
Wherein in step (14), after (13) step completes, recover virtual machine running status by Xen virtual machine territory 0.
Wherein in step (22), before carrying out disaster recovery, need in advance by the mirror-image copies of virtual machine on disaster recovery node, when disaster recovery starts to carry out time, disaster recovery node can create a new virtual machine by this mirror image, when former virtual machine breaks down time, new virtual machine can take over the running status of former virtual machine, thus the continual operation of application program that guarantee operates on former virtual machine.
Wherein in step (23), new virtual machine on disaster recovery node will be consistent with former virtual machine state, therefore the running status of former virtual machine is needed to copy on new virtual machine, periodically former virtual machine state is copied on new virtual machine by state-detection bag, can also judge whether former virtual machine breaks down by state-detection bag.
Wherein in step (24), have no progeny when periodically detecting in bag in step (23), system can judge former virtual machine and break down, and the new virtual machine of system meeting automatic activation takes over the running status of former virtual machine, thus guarantee system is normally run.
The present invention is backed up and disaster recovery computer system by Xen virtual machine, backup and disaster recovery process in the middle of, only need to back up and disaster recovery the virtual machine of moving calculation machine system, do not need extra installation backup software and disaster recovery software, decrease for backup software and disaster recovery software maintenance with upgrade the time and cost payout that bring, can effectively avoid the problems such as conflict are read for the such as file run in the middle of traditional backup and Disaster Recovery Method process.
Accompanying drawing explanation
Fig. 1 is single computer system structural representation;
Fig. 2 is Fig. 1 computer system duplication process detail flowchart;
Fig. 3 is duplex computer system structural representation, and wherein computer system 2 is the disaster recovery node of computer system 1;
Fig. 4 is Fig. 3 resumption of system disaster process detail flowchart.
Embodiment
Clearer understanding is obtained in order to make feature of the present invention and advantage, below in conjunction with accompanying drawing, be described in detail below: as shown in Figure 1, describe in linux operating system, to install single computer system structural representation after Xen virtual machine, this system comprises a territory 0(Domain 0), territory 0 is a Linux kernel(kernel revised), uniquely operate in Xen Hypervisor(supervisory routine) on virtual machine, it has the authority of access physical I/O resource, simultaneously and other virtual machines that system is run carry out alternately, it has special administration authority, it can build multiple virtual machine, and managing virtual equipment, can carry out the management role such as hanging up to virtual machine.In the middle of native system, user needed the computer system used to be installed on virtual machine territory 1, one or more application program can be run in territory 1.Stand-by program and strategy execution program are installed in the middle of the virtual machine in territory 0, strategy execution program can use C language or script to write, primary responsibility performs user-defined backup policy, by reading the stand-by program called on territory 0 of backup policy information timing.Stand-by program can use C language to write, using the C function library that C language can be good at the virtual instrument of libvirt() function in storehouse calls, operation virtual machine is more convenient, stand-by program needs to realize following action: monitoring virtual machine state, backup virtual machine, recovery virtual machine, automatically copy virtual machine image etc.Its concrete steps are described as follows:
1) as shown in Figure 2, when backing up virtual machine application, it operates according to the backup policy of definition, in the middle of this backup policy, the opening time of definition stand-by program, and the number of times of backup every day, which virtual machine needs to back up, after having formulated backup policy, the information of backup policy be saved on the tactful backup file in territory 0, this file can be common file, also can be the file of XML type, use XML file conversation strategy information to compare specification, program reads more convenient.Operation reserve executive routine, strategy execution program can information on fetch policy backup file, thus calculate stand-by program and need the opening time, and by timing mechanism, program starts the stand-by program on territory 0 automatically at opening time point.
2) after opening the stand-by program on the virtual machine of territory 0 by step 1, in order to ensure the integrality of virtual machine state, first stand-by program can call the C function library of the virtual instrument of libvirt() virDomainSuspend(control domain in storehouse) function carries out pending operation to the virtual machine run in systems in which.
3), after in step 2, pending operation completes, the stand-by program on the virtual machine of territory 0 can by SSH(safety shell protocol) image file of this virtual machine is copied on backup storage device by mode.
4) after virtual machine image having been copied in step 3, the stand-by program on territory 0 can call virDomainResume function in libvirt storehouse and recover virtual machine, and virtual machine normally runs.
5) judge whether that all virtual machines complete backup all by the stand-by program on the virtual machine of territory 0, if all complete, then exit, otherwise select next virtual machine, repeat 2-4 step.
Wherein, in the middle of step 1, user can make oneself backup policy applicable according to the demand of self and the hardware condition had, and opens stand-by program once a day or repeatedly and backs up virtual machine.
Wherein, in the middle of step 2, the interface that stand-by program can be provided by the virtual storehouse of libvirt carries out pending operation to virtual machine, in addition, user also can carry out pending operation by call instruction mode to virtual machine, and the order line using virsh order line or use Xen to carry operates.
Wherein, step 3 copies virtual machine image file on backup storage device, backup storage device is External memory equipment, as shown in Figure 1, break down to prevent the memory disk of computer system itself, backup storage device will be separated with former virtual machine image memory device, and both can not store together.
As shown in Figure 3, describe in linux operating system, to install duplex computer system structural representation after Xen virtual machine, computer system 1, 2 all comprise a territory 0(Domain 0), territory 0 is a Linux kernel revised, uniquely operate in the virtual machine on Xen Hypervisor, it has the authority of access physical I/O resource, simultaneously and other virtual machines that system is run carry out alternately, it has special administration authority, it can build multiple virtual machine, and managing virtual equipment, can carry out the management role such as hanging up to virtual machine.Wherein computer system 2 is the disaster recovery node of computer system 1, computer system 2 has similar running environment to computer system 1, in time breaking down in the virtual machine territory 1 in computer system 1, the application in the virtual machine territory 1 operated in computer system 1 can be taken in virtual machine territory 1 in computer system 2, thus application can continually be run.Installation period sexual state trace routine in the middle of territory 0 in computer system 1, mirror-image copies program.In computer system 2, virtual machine disaster recovery procedure is run in territory 0.In the middle of practical application is disposed, computer system 2 is as disaster recovery node, disaster recovery can be carried out to the system node that multiple computer system 1 is such, but for the purpose of simplifying the description, in the middle of this paper, computer system 2 only carries out disaster recovery to computer system 1, and its concrete steps are as follows:
1) as shown in Figure 4; first open system disaster recovery procedure; select and need the virtual machine carrying out disaster recovery protection; as shown in Figure 3: the virtual machine that needs carry out protecting is the virtual machine territory 1 in computer system 1; after opening disaster protection, in computer system 2, newly-built virtual machine territory 1 is as virtual machine disaster recovery node.Operate in the automatic program of file copy of mirror image on computer system 1 territory 0 can by SSH mode by the mirror-image copies in virtual machine territory 1 that operates in computer system 1 on the memory device in computer system 2.Computer system 2 starts virtual machine territory 1, if its state is halted state.
2) after step 1 completes, in computer system 1 on territory 0, start to send and detect bag program, at first time process of transmitting, need the good working condition (comprising cpu instruction, disk buffering request, internal memory event, network packet etc.) copying computer system 1 territory 1, be copied in computer system 2 co-domain 1, be loaded in computer system domain 1 internal memory.
3), after step 2 completes, computer system 1 territory 0 is detected bag transmission program and can periodically copy the page that computer system domain 1 was revised, be loaded in the middle of state-detection bag, and state-detection bag is sent on computer system 2 virtual machine territory 1.
4) the periodic accepting state in computer system 2 virtual machine territory 1 detects bag, stress state detects the page information in bag, according to state-detection bag, can judge whether computer system 1 territory 1 breaks down, when state bag stops sending, then activate the virtual machine on disaster recovery node.
Wherein, virtual machine image copies on the memory device in computer system 2 by step 1, and what copy the mirror image in computer system 2 to deposits that path must to deposit path consistent with computer system 1.
Along with the development of Xen virtual machine, the aspect of performance of Xen virtual machine is also in continuous lifting, on Xen virtual machine, operational system and application are with operational system on actual physics machine be applied in aspect of performance gap and constantly reduce, particularly start at Xen4.0 version, Xen virtual machine adds Remus module, provide hot standby correlation function, the disaster recovery for system provides a great help.Wherein, step 2,3 can use the Remus module of Xen to realize, and uses Remus can copy accurately the running status of virtual machine, and Remus is by being buffered in all-network Packet Generation in 200 ms intervals to destination.
Wherein, step 4 can use Xen to carry virtual machine to recover module and realize, and when not receiving the state-detection bag that computer system 1 sends within the appointed time, now system can judge that computer system 1 breaks down.Computer system 2 Automatically invoked virtual machine recovery module can carry out activating virtual machine, thus realizes the disaster recovery of system.
The implementation of above-described example to various piece of the present invention is described in detail; but specific implementation form of the present invention is not limited thereto; for the those skilled in the art of the art, the various apparent change carried out it when not deviating from spirit and the right of the method for the invention is all within protection scope of the present invention.
Claims (5)
1. use virtual machine to a method for the backup and disaster recovery that realize system, it is characterized in that: linux operating system is provided with Xen virtual machine, operating system has carried out backup operation, and Disaster Recovery Method comprises step:
(21) virtual machine is monitored, catch the state that virtual machine is current;
(22) copy needs the virtual machine image of carrying out disaster recovery to disaster recovery node;
Before carrying out disaster recovery, need in advance by the mirror-image copies of virtual machine on disaster recovery node, when disaster recovery starts to carry out time, disaster recovery node can create a new virtual machine by this mirror image, when former virtual machine breaks down time, new virtual machine can take over the running status of former virtual machine, thus the continual operation of application program that guarantee operates on former virtual machine;
(23) current virtual machine state is periodically copied to disaster recovery node;
(24) virtual machine breaks down, and disaster recovery node recovers virtual machine state;
Wherein, backup-step is:
(11) virtual machine is monitored, catch the state that virtual machine is current;
(12) pending operation is carried out to virtual machine;
(13) virtual machine image is copied;
(14) virtual machine running status is recovered;
Wherein, in step (12), by Xen virtual machine territory 0, each virtual machine is managed, when virtual machine state is backed up, call control domain function in the C function library of virtual instrument and pending operation is carried out to virtual machine;
Described operating system comprises a territory 0, territory 0 is a linux kernel revised, uniquely operate in the virtual machine on Xen supervisory routine, it has the authority of access physical I/O resource, simultaneously and other virtual machines that system is run carry out alternately, build multiple virtual machine, and managing virtual equipment, to the management role that virtual machine is hung up; In the middle of native system, user needed the computer system used to be installed on virtual machine territory 1, multiple application program is run in territory 1, stand-by program and strategy execution program are installed in the middle of the virtual machine in territory 0; Strategy execution program primary responsibility performs user-defined backup policy, is periodically called the stand-by program on territory 0 by reading backup policy information.
2. the method for claim 1, is characterized in that: in step (14), after (13) step completes, is called control domain function in the C function library of virtual instrument recover virtual machine running status by Xen virtual machine territory 0.
3. the method for claim 1, it is characterized in that: in step (23), new virtual machine on disaster recovery node will be consistent with former virtual machine state, therefore the running status of former virtual machine is needed to copy on new virtual machine, periodically former virtual machine state is copied on new virtual machine by state-detection bag, can also judge whether former virtual machine breaks down by state-detection bag.
4. the method for claim 1, it is characterized in that: in step (24), have no progeny when periodically detecting in bag in step (23), system can judge former virtual machine and break down, the new virtual machine of system meeting automatic activation takes over the running status of former virtual machine, thus guarantee system is normally run.
5. the method for claim 1, is characterized in that: in step (13), and the stand-by program on the virtual machine of described territory 0 can be copied on backup storage device by the image file of safety shell protocol mode by this virtual machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110387202.2A CN102541686B (en) | 2011-11-29 | 2011-11-29 | Method for achieving backup and disaster recovery of system by utilizing virtual machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110387202.2A CN102541686B (en) | 2011-11-29 | 2011-11-29 | Method for achieving backup and disaster recovery of system by utilizing virtual machine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102541686A CN102541686A (en) | 2012-07-04 |
CN102541686B true CN102541686B (en) | 2015-07-01 |
Family
ID=46348637
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110387202.2A Active CN102541686B (en) | 2011-11-29 | 2011-11-29 | Method for achieving backup and disaster recovery of system by utilizing virtual machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102541686B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102752404B (en) * | 2012-07-25 | 2015-02-18 | 高旭磊 | Novel backup method and system for disaster recovery |
CN103885863B (en) * | 2012-12-24 | 2018-12-11 | 腾讯科技(深圳)有限公司 | The processing method and virtual machine of the system failure |
CN104216793B (en) * | 2013-05-31 | 2017-10-17 | 国际商业机器公司 | Application Backup, the method and apparatus recovered |
CN104182271A (en) * | 2014-09-02 | 2014-12-03 | 山东超越数控电子有限公司 | Virtualization implementation method based on SW processor |
CN104461775A (en) * | 2014-11-26 | 2015-03-25 | 英业达科技有限公司 | Remote backup system and backup method |
CN108268302B (en) * | 2016-12-30 | 2020-12-04 | 华为技术有限公司 | Method and device for realizing equipment starting |
CN108182128A (en) * | 2017-12-29 | 2018-06-19 | 广州鼎甲计算机科技有限公司 | Based on XEN without Agent virtual back-up restoring method |
JP6762452B1 (en) * | 2019-02-01 | 2020-09-30 | 三菱電機株式会社 | Information processing equipment, backup method, restore method and program |
CN111078485B (en) * | 2019-12-03 | 2023-06-13 | 广州西麦科技股份有限公司 | Intelligent training result detection method |
CN112363671B (en) * | 2020-10-23 | 2022-07-05 | 中国电子科技网络信息安全有限公司 | Virtual machine template mirror image storage method based on fusion framework cloud platform |
CN112506714B (en) * | 2021-01-12 | 2022-04-01 | 博智安全科技股份有限公司 | Hot backup method for Windows system and corresponding hot recovery method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101183324A (en) * | 2007-12-10 | 2008-05-21 | 上海北大方正科技电脑系统有限公司 | Recovery method of computer system |
CN101408856A (en) * | 2008-11-21 | 2009-04-15 | 清华大学 | System and method for tolerance disaster backup(disaster-tolerant backup) |
CN101609419A (en) * | 2009-06-29 | 2009-12-23 | 北京航空航天大学 | The data back up method and the device of the migration of virtual machine consistently online |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8868858B2 (en) * | 2006-05-19 | 2014-10-21 | Inmage Systems, Inc. | Method and apparatus of continuous data backup and access using virtual machines |
-
2011
- 2011-11-29 CN CN201110387202.2A patent/CN102541686B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101183324A (en) * | 2007-12-10 | 2008-05-21 | 上海北大方正科技电脑系统有限公司 | Recovery method of computer system |
CN101408856A (en) * | 2008-11-21 | 2009-04-15 | 清华大学 | System and method for tolerance disaster backup(disaster-tolerant backup) |
CN101609419A (en) * | 2009-06-29 | 2009-12-23 | 北京航空航天大学 | The data back up method and the device of the migration of virtual machine consistently online |
Non-Patent Citations (1)
Title |
---|
"一种面向客户端的双机热备机制的研究与实现";蒋涛;《中国优秀硕士学位论文全文数据库信息科技辑》;20110930;正文第12页~38页 * |
Also Published As
Publication number | Publication date |
---|---|
CN102541686A (en) | 2012-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102541686B (en) | Method for achieving backup and disaster recovery of system by utilizing virtual machine | |
US10114834B2 (en) | Exogenous virtual machine synchronization and replication | |
JP4882845B2 (en) | Virtual computer system | |
CN105354113B (en) | A kind of system and method for server, management server | |
CN100517246C (en) | Computer remote control method and system | |
JP6291248B2 (en) | Firmware upgrade error detection and automatic rollback | |
CN102214128B (en) | Repurposable recovery environment | |
CN100492305C (en) | Fast restoration method of computer system and apparatus | |
CN101390336A (en) | Disaster recovery architecture | |
CN102141947A (en) | Method and system for processing abnormal task in computer application system adopting embedded operating system | |
CN104391777B (en) | Cloud platform and its operation and monitoring method and device based on (SuSE) Linux OS | |
CN101873223A (en) | N+M service backup mechanism based on IP switching | |
CN102708027B (en) | A kind of method and system avoiding outage of communication device | |
US20170039118A1 (en) | Cluster system, server device, cluster system management method, and computer-readable recording medium | |
CN109324549B (en) | Dual-master control equipment configuration method and dual-master control equipment | |
CN102708023B (en) | Back-up system counter, group system, the method that service is provided and recording medium | |
CN201047943Y (en) | Fast recovery equipment of computer system | |
CN110677288A (en) | Edge computing system and method generally used for multi-scene deployment | |
CN112822039B (en) | Main and standby mode switching method for dual-machine hot standby system | |
CN110618951A (en) | System high-availability storage control method and device, communication equipment and storage medium | |
JP2015106226A (en) | Dual system | |
Masetti et al. | Increasing Availability by Implementing Software Redundancy in the CMS Detector Control System | |
CN109995560A (en) | Cloud resource pond management system and method | |
JP2007206946A (en) | Multiplex system | |
Coleşa et al. | An adaptive virtual machine replication algorithm for highly-available services |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |