CN109766220A - Back-up restoring method, device and the computer readable storage medium of application system - Google Patents

Back-up restoring method, device and the computer readable storage medium of application system Download PDF

Info

Publication number
CN109766220A
CN109766220A CN201910007368.3A CN201910007368A CN109766220A CN 109766220 A CN109766220 A CN 109766220A CN 201910007368 A CN201910007368 A CN 201910007368A CN 109766220 A CN109766220 A CN 109766220A
Authority
CN
China
Prior art keywords
application system
block device
block
group
data
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
CN201910007368.3A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910007368.3A priority Critical patent/CN109766220A/en
Publication of CN109766220A publication Critical patent/CN109766220A/en
Priority to PCT/CN2019/117346 priority patent/WO2020140615A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

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

Abstract

The present invention relates to a kind of big data technologies, disclose a kind of back-up restoring method of application system, it include: that the distributed memory system of application system is marked off into multiple block devices, and the block device is shared to the applied host machine where the subsystem or database of the application system, it controls the applied host machine and the block device is mapped as local block device, and the subsystems of the application system and database are deployed in the distributed block equipment of corresponding applied host machine;Consistency snapshot is executed to the block device group in the management end of the distributed memory system, forms consistency snapshot group;And according to the application system whether delay machine the case where, the data of the consistency snapshot group are restored in the applied host machine of the application system using clone or rollback method.The present invention also proposes the device and a kind of computer readable storage medium of a kind of Backup and Restore of application system.The present invention realizes the fast accurate backup of database and restores data.

Description

Back-up restoring method, device and the computer readable storage medium of application system
Technical field
The present invention relates to big data technical field more particularly to a kind of monolithic backup restoration methods of application system, device And computer readable storage medium.
Background technique
With the development of internet, present application system becomes greatly, becomes increasingly complex, in order to which High Availabitity height responds speed Degree, many large scale systems have all been divided into several or even tens a subsystems up to a hundred or micro services, each subsystem/micro services It is owned by one or more same type or different types of database.Between these subsystems it is more or less there is Incidence relation.Either to each association subsystem still to the database below some subsystem, in the process of Backup and Restore In, user is intended to be able to maintain the consistency of data between all relevant subsystems and database.
Since subsystems or database may be deployed on multiple and different hosts, conventional backup scheme is to each A host backups respectively in the same time, since each host time cannot be guaranteed absolutely unification, along with factors such as cachings It influences, data consistency cannot be guaranteed, and in recovery process, to make recovery operation respectively to subsystems, answer in large size In, a system may relate to several hundred thousands of hosts, this workload is very big, and inefficiency is also easy to malfunction.
Summary of the invention
The present invention provides the back-up restoring method, device and computer readable storage medium of a kind of application system, main Purpose is to solve the consistency of large-scale application system Backup Data, and improves the efficiency of whole system Backup and Restore energetically.
To achieve the above object, the back-up restoring method of a kind of application system provided by the invention, comprising:
Back end storage system of one distributed memory system as a default application system is set;
The distributed memory system is marked off into multiple block devices, and the block device is shared into the application system One or more subsystem or database where applied host machine, control the applied host machine and be mapped as the block device Local block device, and the subsystems of the application system and database are deployed in the local block device of corresponding applied host machine On;
Block device group is created in the management end of the distributed memory system, and by the institute in the distributed memory system There is block device to be added in the block device group;
When executing data backup, disposable snapshot is executed to the block device group, forms consistency snapshot group;And
Execute data restore when, according to the application system whether delay machine the case where, using clone or rollback method The data of the consistency snapshot group are restored in the applied host machine of the application system.
Optionally, described one or more subsystem or database that the block device is shared to the application system The applied host machine at place includes:
The block device is shared to the number of the subsystems of the distributed storage by iSCSI rbd technology According to the applied host machine where library.
Optionally, the management end in the distributed memory system executes consistency snapshot to the block device group, Form consistency snapshot group, comprising:
Freeze the i/o operation of all block devices in block device group;
By the data cached write-in disk of all block devices, to discharge caching;
Snapshot is done to all block devices;And
The i/o of block device is freezed in cancellation.
Optionally, it is described execute data restore when, according to the application system whether delay machine the case where, using clone or The data of the consistency snapshot group are restored in the applied host machine of the application system by person's rollback method, comprising:
In the case where the application system does not have delay machine, clone operations are executed to consistency snapshot group to be restored, are obtained It is mapped on new host to the one-to-one copy of the local block device with the application system, and by all copies, by institute The database for stating one or more subsystem of application system is deployed on the block device copy of the new host;
In the case where the application system delay machine, cancel the institute used in the application system in all applied host machines There is the mapping of block device, rolling back action is executed to the consistency snapshot group that will restore in the distributed memory system, is made The data of all block devices are restored to the state at same time point, and regenerate on each applied host machine to these block devices Mapping, and start the application system.
Optionally, one or more subsystem or database of the application system include: product systems, client system System, ordering system, price system and evaluation system.
In addition, to achieve the above object, the present invention also provides a kind of Backup and Restore device of application system, which includes Memory and processor are stored with the Backup and Restore journey for the application system that can be run on the processor in the memory Sequence, the Backup and Restore program of the application system realize following steps when being executed by the processor:
Back end storage system of one distributed memory system as a default application system is set;
The distributed memory system is marked off into multiple block devices, and the block device is shared into the application system One or more subsystem or database where applied host machine, control the applied host machine and be mapped as the block device Local block device, and the subsystems of the application system and database are deployed in the local block device of corresponding applied host machine On;
Block device group is created in the management end of the distributed memory system, and by the institute in the distributed memory system There is block device to be added in the block device group;
When executing data backup, disposable snapshot is executed to the block device group, forms consistency snapshot group;And
Execute data restore when, according to the application system whether delay machine the case where, using clone or rollback method The data of the consistency snapshot group are restored in the applied host machine of the application system.
Optionally, described one or more subsystem or database that the block device is shared to the application system The applied host machine at place includes:
The block device is shared to the number of the subsystems of the distributed storage by iSCSI rbd technology According to the applied host machine where library.
Optionally, the management end in the distributed memory system executes consistency snapshot to the block device group, Form consistency snapshot group, comprising:
Freeze the i/o operation of all block devices in block device group;
By the data cached write-in disk of all block devices, to discharge caching;
Snapshot is done to all block devices;And
The i/o of block device is freezed in cancellation.
Optionally, it is described execute data restore when, according to the application system whether delay machine the case where, using clone or The data of the consistency snapshot group are restored in the applied host machine of the application system by person's rollback method, comprising:
In the case where the application system does not have delay machine, clone operations are executed to consistency snapshot group to be restored, are obtained It is mapped on new host to the one-to-one copy of the local block device with the application system, and by all copies, by institute The database for stating one or more subsystem of application system is deployed on the block device copy of the new host;
In the case where the application system delay machine, cancel the institute used in the application system in all applied host machines There is the mapping of block device, rolling back action is executed to the consistency snapshot group that will restore in the distributed memory system, is made The data of all block devices are restored to the state at same time point, and regenerate on each applied host machine to these block devices Mapping, and start the application system.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium Be stored with the Backup and Restore program of application system on storage medium, the Backup and Restore program of the application system can by one or The step of multiple processors execute, back-up restoring method to realize application system as described above.
Back-up restoring method, device and the computer readable storage medium of application system proposed by the present invention are by application system Distributed memory system mark off multiple block devices, and the block device is shared to one of the application system or more Applied host machine where a subsystem or database controls the applied host machine for the block device and is mapped as local block device; In data backup, consistency snapshot, Yi Ji are executed to the block device group in the management end of the distributed memory system Data restore when, according to the application system whether delay machine, to the consistency snapshot group execute clone or rolling back action, because This, solves the consistency of large-scale application system Backup Data, and improves the efficiency of whole system Backup and Restore energetically.
Detailed description of the invention
Fig. 1 is the flow diagram of the back-up restoring method for the application system that one embodiment of the invention provides;
Fig. 2 is the schematic diagram of internal structure of the Backup and Restore device for the application system that one embodiment of the invention provides;
Fig. 3 is the Backup and Restore journey of application system in the Backup and Restore device for the application system that one embodiment of the invention provides The module diagram of sequence.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of back-up restoring method of application system.Shown in referring to Fig.1, provided for one embodiment of the invention Application system back-up restoring method flow diagram.This method can be executed by a device, which can be by soft Part and/or hardware realization.
In the present embodiment, the back-up restoring method of application system includes:
The back end storage system of one S1, setting distributed memory system as a default application system.
Distributed memory system described in this case is a kind of data storage technology, and the enterprise of the network is connected by Web vector graphic Storage resource in the disk space of every computer of industry or individual, and the storage resource of these dispersions is constituted one virtually Storage equipment.In the distributed memory system, data are each corners for being stored in system of dispersion.
Distributed memory system described in this case can be Ceph system etc..
Multiple servers can be formed a super large cluster by the Ceph, and the disk resource in these machines is integrated into Together, formed a big resource pool (PB rank), then distribution according to need to using.The bottom layer realization of Ceph is RADOS, RADOS are to be write by C++, but it outwardly exposes calling interface, i.e. LibRADOS, and application program only needs to adjust With the interface of LibRADOS, so that it may manipulate Ceph.Among these, RADOS GW is stored for object, and RBD is stored for block, They belong to LibRADOS.CephFS is kernel state program, outwardly provides POSIX interface, and user can pass through client Direct carry is held to use.Every server has several pieces of disks (sda, sdb, sdc etc.), and disk again can further subregion (sda1, sda2 etc.).Most basic process is exactly OSD (object storage device) in Ceph, the corresponding OSD of each disk.Such as Fruit user will store a file by client wants, then it is big that this document can actually be divided into 4M block one by one in RADOS Small object.One file ID of each file (such as A, then, the ID of these objects is exactly A0, A1, A2 etc.).However In Ceph distributed storage system, there are thousands of a objects, light traversal will take a long time, so object can first pass through Hash- modulo operation is stored in a PG (Place Group), and (quantity of PG is solid to the index that PG is equivalent in database Fixed, will not change with the increase or deletion of OSD), so, it is only necessary to navigate to the position of PG first, then The query object in PG substantially increases the efficiency of inquiry.Later, the object in PG again can be according to the copy amount of setting It is replicated, and according in the storage to OSD node of Crush algorithm.Monitor (at least 3) in Ceph for safeguarding and The state of entire cluster is monitored, each Monitor has a Cluster Map, as long as there is this Map, it will be able to clearly know The each object in road be stored in where.Client meeting elder generation tcp is connected to Monitor, therefrom obtains Cluster Map, and It is calculated in client, after knowing the position of object, then directly communicates (thought of decentralization) with OSD.OSD node is flat Chang Huixiang Monitor node sends simple heartbeat and can just report automatically only when addition, when deleting or unusual condition occur Information is to Monitor.In Ceph, metadata is also to be stored in OSD, and MDS is only equivalent to the cache server of metadata.
In Ceph, if to write data, it can only write, then synchronously be write from main OSD to from OSD again, only to main OSD After returning result to main OSD from OSD, just the message completed can be written to clients report in main OSD.If reading data, no It will use read and write abruption, but be also required to first send out to main OSD and request, to guarantee the strong consistency of data.
Preset application system described in this programme can be a large-scale enterprise application system, such as an electric business system System.The application system can be divided into several or even tens a subsystems or database up to a hundred, such as: product systems, client, Ordering system, price system, evaluation system etc..The data of these subsystems are stored in the distributed memory system.
S2, the distributed memory system is marked off to multiple block devices, and the block device is shared into the application Applied host machine where one or more subsystem or database of system controls the applied host machine and reflects the block device It penetrates as local block device.
Block device described in this case is one kind in i/o equipment, is to store information in the block of a fixed size, each Block has the address of oneself, can also read the data of certain length in any position of equipment.The i/o equipment can be, Such as hard disk, USB flash disk, SD card etc..
The distributed storage is marked off multiple block devices by present pre-ferred embodiments, and these block devices are passed through The Techno-sharings such as iSCSI, rbd are to the applied host machine where the database of the subsystems of the distributed storage.
(Internet Small Computer System Interface, minicomputer system connect the iSCSI Mouthful) technology is a kind of memory technology that scsi interface can be combined with ethernet technology, realize physical hard disk equipment and The TCP/TP network transmission protocol be combined with each other, and user is allowed easily to get remote equipment room offer by internet Shared storage resource.ISCSI can overcome the limitation of Direct Attached Storage, realize and share storage resource across different server, Therefore can under not shutdown status extended storage capacity.
The rbd (RADOS Block Device, block device) is periodically backed up data to by way of residual quantity file Disaster Preparation Center restores nearest Backup Data from Disaster Preparation Center and restarts corresponding virtual when primary data center breaks down Machine utmostly reduces data recovery time when disaster.The block device that applied host machine shares out distributed memory system It is mapped as local block device, this block device can equally be used as local device in this way: such as, creating file system portion Affix one's name to database etc..
S3, the local block device that the subsystems of the application system and database are deployed in corresponding applied host machine On.
Therefore, entire application system has used a unified rear end storage in this case.
S4, the management end creation block device group in the distributed memory system, and will be in the distributed memory system All block devices be added in the block device group.
The present invention is before data backup, in distributed memory system, a block device group (group) is created, by institute All block devices that subsystems and database in application system are used are stated to be added in the block device group.
When S5, execution data backup, disposable snapshot is executed to the block device group, forms consistency snapshot group.
In present pre-ferred embodiments, the step of consistency snapshot, is as follows:
1. freezing the i/o operation of all block devices in block device group;
2. by the data cached write-in disk of all block devices, to discharge caching;;
3. pair all block devices do snapshot;The snapshot refers to a completely available copy for determining data acquisition system, the copy The image for (copying the time point started) at some time point including corresponding data.Snapshot can be one of the data represented by it A copy is also possible to a duplicate of data;And
4. the i/o of block device is freezed in cancellation.
Since snapshot only plays a label to metadata (metadata), not additional i/o is operated, therefore, this case In data backup, speed is quite fast, and whole process only needs Millisecond, noninductive to upper layer application.Further, since being in distribution The snapshot operation done to the block devices used all in entire application system is completed in one atomic operation of storage system, so It can guarantee the data consistency of subsystems and database.The atomic operation refers to the inseparable operation cut open, the operation It is to be completed in the same cpu timeslice.
S6, execute data restore when, judge the application system whether delay machine.
If the application system does not have delay machine, following S7 is executed.Otherwise, if the application system delay machine, Execute S8.
S7, in the case where the application system does not have delay machine, clone behaviour is executed to the consistency snapshot group that will restore Make, obtains the one-to-one copy to all block devices of the application system, and all copies are mapped on new host, it will The database of the subsystems of the application system is deployed on the block device copy of these new hosts.
With the new host of a batch, all devices copy is mapped on corresponding host, then by subsystems sum number It is deployed on the block device copy of these hosts according to library;Large-scale application system entire in this way can behave, true by verifying Recognize the system that system is switched to again after application system normal operation and has just been restored.
S8, in the case where the application system delay machine, cancel in all applied host machines and being used in the application system All block devices mapping, rolling back action is done to the consistency snapshot group that will restore in distributed memory system, makes institute There are the data of block device to be restored to the state at same time point, and these block devices are done again on each applied host machine and are mapped And start the application system.
The rolling back action refers to: due to program or data processing mistake, and program or data being restored to the last time just The behavior of true state.On each applied host machine mapping is done to these block devices again and starts application, application system entire in this way The state of system just recovers.Moreover, entire operation process can write a script execution, guarantees the reliability executed and subtract Lack maloperation and improves efficiency.
Invention also provides a kind of Backup and Restore device of application system.Referring to shown in Fig. 2, provided for one embodiment of the invention Application system Backup and Restore device schematic diagram of internal structure.
In the present embodiment, a kind of Backup and Restore device 1 of application system can be a server or service Device cluster etc..The Backup and Restore device 1 of the application system includes at least memory 11, processor 12, communication bus 13 and net Network interface 14.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory, Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 It can be the internal storage unit of the Backup and Restore device 1 of application system in some embodiments, such as the application system is standby The hard disk of part recovery device 1.Memory 11 is also possible to the outer of the Backup and Restore device 1 of application system in further embodiments The plug-in type hard disk being equipped in portion's storage equipment, such as the Backup and Restore device 1 of application system, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, Memory 11 can also both including application system Backup and Restore device 1 internal storage unit and also including External memory equipment. Memory 11 can be not only used for the application software and Various types of data that storage is installed on the Backup and Restore device 1 of application system, example The code of the Backup and Restore program 01 of such as application system, can be also used for temporarily storing and has exported or will export Data.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, such as execute the Backup and Restore program 01 etc. of application system.
Communication bus 13 is for realizing the connection communication between these components.
Network interface 14 optionally may include standard wireline interface and wireless interface (such as WI-FI interface), be commonly used in Communication connection is established between the device 1 and other electronic equipments.
Optionally, which can also include user interface, and user interface may include display (Display), input Unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It is optional Ground, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriate Referred to as display screen or display unit, for being shown in the information handled in the Backup and Restore device 1 of application system and for showing Show visual user interface.
Fig. 2 illustrates only the backup of the application system of the Backup and Restore program 01 with component 11-14 and application system Recovery device 1, it will be appreciated by persons skilled in the art that the backup that structure shown in fig. 1 is not constituted to application system is extensive The restriction of apparatus for coating 1 may include perhaps combining certain components or different portions than illustrating less perhaps more components Part arrangement.
In 1 embodiment of device shown in Fig. 2, the Backup and Restore program 01 of application system is stored in memory 11;Place Reason device 12 realizes following steps when executing the Backup and Restore program 01 of the application system stored in memory 11:
Step 1: back end storage system of one distributed memory system of setting as a default application system.
Distributed memory system described in this case is a kind of data storage technology, and the enterprise of the network is connected by Web vector graphic Storage resource in the disk space of every computer of industry or individual, and the storage resource of these dispersions is constituted one virtually Storage equipment.In the distributed memory system, data are each corners for being stored in system of dispersion.
Distributed memory system described in this case can be Ceph system etc..
Multiple servers can be formed a super large cluster by the Ceph, and the disk resource in these machines is integrated into Together, formed a big resource pool (PB rank), then distribution according to need to using.The bottom layer realization of Ceph is RADOS, RADOS are to be write by C++, but it outwardly exposes calling interface, i.e. LibRADOS, and application program only needs to adjust With the interface of LibRADOS, so that it may manipulate Ceph.Among these, RADOS GW is stored for object, and RBD is stored for block, They belong to LibRADOS.CephFS is kernel state program, outwardly provides POSIX interface, and user can pass through client Direct carry is held to use.Every server has several pieces of disks (sda, sdb, sdc etc.), and disk again can further subregion (sda1, sda2 etc.).Most basic process is exactly OSD (object storage device) in Ceph, the corresponding OSD of each disk.Such as Fruit user will store a file by client wants, then it is big that this document can actually be divided into 4M block one by one in RADOS Small object.One file ID of each file (such as A, then, the ID of these objects is exactly A0, A1, A2 etc.).However In Ceph distributed storage system, there are thousands of a objects, light traversal will take a long time, so object can first pass through Hash- modulo operation is stored in a PG (Place Group), and (quantity of PG is solid to the index that PG is equivalent in database Fixed, will not change with the increase or deletion of OSD), so, it is only necessary to navigate to the position of PG first, then The query object in PG substantially increases the efficiency of inquiry.Later, the object in PG again can be according to the copy amount of setting It is replicated, and according in the storage to OSD node of Crush algorithm.Monitor (at least 3) in Ceph for safeguarding and The state of entire cluster is monitored, each Monitor has a Cluster Map, as long as there is this Map, it will be able to clearly know The each object in road be stored in where.Client meeting elder generation tcp is connected to Monitor, therefrom obtains Cluster Map, and It is calculated in client, after knowing the position of object, then directly communicates (thought of decentralization) with OSD.OSD node is flat Chang Huixiang Monitor node sends simple heartbeat and can just report automatically only when addition, when deleting or unusual condition occur Information is to Monitor.In Ceph, metadata is also to be stored in OSD, and MDS is only equivalent to the cache server of metadata.
In Ceph, if to write data, it can only write, then synchronously be write from main OSD to from OSD again, only to main OSD After returning result to main OSD from OSD, just the message completed can be written to clients report in main OSD.If reading data, no It will use read and write abruption, but be also required to first send out to main OSD and request, to guarantee the strong consistency of data.
Preset application system described in this programme can be a large-scale enterprise application system, such as an electric business system System.The application system can be divided into several or even tens a subsystems or database up to a hundred, such as: product systems, client, Ordering system, price system, evaluation system etc..The data of these subsystems are stored in the distributed memory system.
Step 2: the distributed memory system is marked off multiple block devices, and the block device shared to described Applied host machine where one or more subsystem or database of application system controls the applied host machine and sets described piece It is standby to be mapped as local block device.
Block device described in this case is one kind in i/o equipment, is to store information in the block of a fixed size, each Block has the address of oneself, can also read the data of certain length in any position of equipment.The i/o equipment can be, Such as hard disk, USB flash disk, SD card etc..
The distributed storage is marked off multiple block devices by present pre-ferred embodiments, and these block devices are passed through The Techno-sharings such as iSCSI, rbd are to the applied host machine where the database of the subsystems of the distributed storage.
(Internet Small Computer System Interface, minicomputer system connect the iSCSI Mouthful) technology is a kind of memory technology that scsi interface can be combined with ethernet technology, realize physical hard disk equipment and The TCP/TP network transmission protocol be combined with each other, and user is allowed easily to get remote equipment room offer by internet Shared storage resource.ISCSI can overcome the limitation of Direct Attached Storage, realize and share storage resource across different server, Therefore can under not shutdown status extended storage capacity.
The rbd (RADOS Block Device, block device) is periodically backed up data to by way of residual quantity file Disaster Preparation Center restores nearest Backup Data from Disaster Preparation Center and restarts corresponding virtual when primary data center breaks down Machine utmostly reduces data recovery time when disaster.The block device that applied host machine shares out distributed memory system It is mapped as local block device, this block device can equally be used as local device in this way: such as, creating file system portion Affix one's name to database etc..
Step 3: this plot that the subsystems of the application system and database are deployed in corresponding applied host machine is set It is standby upper.
Therefore, entire application system has used a unified rear end storage in this case.
Step 4: the management end in the distributed memory system creates block device group, and by the distributed storage system All block devices in system are added in the block device group.
The present invention is before data backup, in distributed memory system, a block device group (group) is created, by institute All block devices that subsystems and database in application system are used are stated to be added in the block device group.
Step 5: executing disposable snapshot when executing data backup to the block device group, forming consistency snapshot group.
In present pre-ferred embodiments, the step of consistency snapshot, is as follows:
1. freezing the i/o operation of all block devices in block device group;
2. by the data cached write-in disk of all block devices, to discharge caching;;
3. pair all block devices do snapshot;The snapshot refers to a completely available copy for determining data acquisition system, the copy The image for (copying the time point started) at some time point including corresponding data.Snapshot can be one of the data represented by it A copy is also possible to a duplicate of data;And
4. the i/o of block device is freezed in cancellation.
Since snapshot only plays a label to metadata (metadata), not additional i/o is operated, therefore, this case In data backup, speed is quite fast, and whole process only needs Millisecond, noninductive to upper layer application.Further, since being in distribution The snapshot operation done to the block devices used all in entire application system is completed in one atomic operation of storage system, so It can guarantee the data consistency of subsystems and database.The atomic operation refers to the inseparable operation cut open, the operation It is to be completed in the same cpu timeslice.
Step 6: execute data restore when, judge the application system whether delay machine.
In the case where the application system does not have delay machine, clone operations are executed to the consistency snapshot group that will restore, The one-to-one copy to all block devices of the application system is obtained, and all copies are mapped on new host, by institute The database for stating the subsystems of application system is deployed on the block device copy of these new hosts.
With the new host of a batch, all devices copy is mapped on corresponding host, then by subsystems sum number It is deployed on the block device copy of these hosts according to library;Large-scale application system entire in this way can behave, true by verifying Recognize the system that system is switched to again after application system normal operation and has just been restored.
In the case where the application system delay machine, cancel the institute used in the application system in all applied host machines There is the mapping of block device, rolling back action is done to the consistency snapshot group that will restore in distributed memory system, makes all pieces The data of equipment are restored to the state at same time point, and do on each applied host machine to these block devices again and map and open Move the application system.
The rolling back action refers to: due to program or data processing mistake, and program or data being restored to the last time just The behavior of true state.On each applied host machine mapping is done to these block devices again and starts application, application system entire in this way The state of system just recovers.Moreover, entire operation process can write a script execution, guarantees the reliability executed and subtract Lack maloperation and improves efficiency.
Optionally, in other embodiments, the Backup and Restore program of application system can also be divided into one or more A module, one or more module are stored in memory 11, and (the present embodiment is processing by one or more processors Device 12) it is performed to complete the present invention, the so-called module of the present invention is the series of computation machine journey for referring to complete specific function Sequence instruction segment, for describing implementation procedure of the Backup and Restore program of application system in the Backup and Restore device of application system.
It is the application system in one embodiment of Backup and Restore device of application system of the present invention for example, referring to shown in Fig. 3 The program module schematic diagram of Backup and Restore program, in the embodiment, the Backup and Restore program of the application system can be divided To store setup module 10, data backup module 20 and data recovery module 30, illustratively:
The storage setup module 10 is used for: rear end of one distributed memory system of setting as a default application system The distributed memory system is marked off multiple block devices, and the block device is shared to the application system by storage system Applied host machine where one or more subsystem or database of system, controls the applied host machine and maps the block device For local block device, and this plot that the subsystems of the application system and database are deployed in corresponding applied host machine is set It is standby upper, block device group is created in the management end of the distributed memory system, and will be all in the distributed memory system Block device is added in the block device group.
The data backup module 20 is used for: when executing data backup, executing disposable snapshot, shape to the block device group At consistency snapshot group.
The data recovery module 30 is used for: execute data restore when, according to the application system whether the feelings of delay machine The data of the consistency snapshot group are restored to the applied host machine of the application system using clone or rollback method by condition In.
The program modules such as above-mentioned storage setup module 10, data backup module 20, data recovery module 30 are performed institute Functions or operations step and above-described embodiment of realization are substantially the same, and details are not described herein.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with the Backup and Restore program of application system, the Backup and Restore program of the application system can be by one or more processors It executes, to realize following operation:
Back end storage system of one distributed memory system as a default application system is set;
The distributed memory system is marked off into multiple block devices, and the block device is shared into the application system One or more subsystem or database where applied host machine, control the applied host machine and be mapped as the block device Local block device, and the subsystems of the application system and database are deployed in the local block device of corresponding applied host machine On;
Block device group is created in the management end of the distributed memory system, and by the institute in the distributed memory system There is block device to be added in the block device group;
When executing data backup, disposable snapshot is executed to the block device group, forms consistency snapshot group;And
Execute data restore when, according to the application system whether delay machine the case where, using clone or rollback method The data of the consistency snapshot group are restored in the applied host machine of the application system.
The Backup and Restore device and side of computer readable storage medium specific embodiment of the present invention and above-mentioned application system Each embodiment of method is essentially identical, does not make tired state herein.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element Or there is also other identical elements in method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of back-up restoring method of application system, which is characterized in that the described method includes:
Back end storage system of one distributed memory system as a default application system is set;
The distributed memory system is marked off into multiple block devices, and the block device is shared to the one of the application system Applied host machine where a or multiple subsystems or database controls the applied host machine for the block device and is mapped as local Block device, and the subsystems of the application system and database are deployed on the local block device of corresponding applied host machine;
Block device group is created in the management end of the distributed memory system, and by all pieces in the distributed memory system Equipment is added in the block device group;
When executing data backup, disposable snapshot is executed to the block device group, forms consistency snapshot group;And
When executing data and restoring, according to the application system whether delay machine the case where, using clone or rollback method by institute The data for stating consistency snapshot group are restored in the applied host machine of the application system.
2. a kind of back-up restoring method of application system as described in claim 1, which is characterized in that described by the block device One or more subsystem or the applied host machine where database for sharing to the application system include:
The block device is shared to the database of the subsystems of the distributed storage by iSCSI rbd technology The applied host machine at place.
3. a kind of back-up restoring method of application system as described in claim 1, which is characterized in that described in the distribution The management end of storage system executes consistency snapshot to the block device group, forms consistency snapshot group, comprising:
Freeze the i/o operation of all block devices in block device group;
By the data cached write-in disk of all block devices, to discharge caching;
Snapshot is done to all block devices;And
The i/o of block device is freezed in cancellation.
4. a kind of back-up restoring method of application system as claimed in claim 3, which is characterized in that described extensive in execution data When multiple, according to the application system whether delay machine the case where, using clone or rollback method by the consistency snapshot group Data are restored in the applied host machine of the application system, comprising:
In the case where the application system does not have delay machine, clone operations are executed to consistency snapshot group to be restored, obtain with The one-to-one copy of the local block device of the application system, and all copies are mapped on new host, it is answered by described in It is deployed to the database of one or more subsystem of system on the block device copy of the new host;
In the case where the application system delay machine, cancel all pieces used in the application system in all applied host machines The mapping of equipment executes rolling back action to the consistency snapshot group that will restore in the distributed memory system, makes to own The data of block device are restored to the state at same time point, and regenerate and reflect to these block devices on each applied host machine It penetrates, and starts the application system.
5. a kind of back-up restoring method of application system as described in claim 1, which is characterized in that the one of the application system A or multiple subsystems or database include: product systems, client, ordering system, price system and evaluation system.
6. a kind of Backup and Restore device of application system, which is characterized in that described device includes memory and processor, described to deposit The Backup and Restore program for the application system that can be run on the processor is stored on reservoir, the backup of the application system is extensive Multiple program realizes following steps when being executed by the processor:
Back end storage system of one distributed memory system as a default application system is set;
The distributed memory system is marked off into multiple block devices, and the block device is shared to the one of the application system Applied host machine where a or multiple subsystems or database controls the applied host machine for the block device and is mapped as local Block device, and the subsystems of the application system and database are deployed on the local block device of corresponding applied host machine;
Block device group is created in the management end of the distributed memory system, and by all pieces in the distributed memory system Equipment is added in the block device group;
When executing data backup, disposable snapshot is executed to the block device group, forms consistency snapshot group;And
When executing data and restoring, according to the application system whether delay machine the case where, using clone or rollback method by institute The data for stating consistency snapshot group are restored in the applied host machine of the application system.
7. the Backup and Restore device of application system as claimed in claim 6, which is characterized in that described to share the block device Include: to the applied host machine where one or more subsystem or database of the application system
The block device is shared to the database of the subsystems of the distributed storage by iSCSI rbd technology The applied host machine at place.
8. the whole recovery device of application system as claimed in claim 6, which is characterized in that described in the distributed storage The management end of system executes consistency snapshot to the block device group, forms consistency snapshot group, comprising:
Freeze the i/o operation of all block devices in block device group;
By the data cached write-in disk of all block devices, to discharge caching;
Snapshot is done to all block devices;And
The i/o of block device is freezed in cancellation.
9. the Backup and Restore device of application system as claimed in claim 8, which is characterized in that described to execute data recovery When, according to the application system whether delay machine the case where, using clone or rollback method by the number of the consistency snapshot group According to being restored in the applied host machine of the application system, comprising:
In the case where the application system does not have delay machine, clone operations are executed to consistency snapshot group to be restored, obtain with The one-to-one copy of the local block device of the application system, and all copies are mapped on new host, it is answered by described in It is deployed to the database of one or more subsystem of system on the block device copy of the new host;
In the case where the application system delay machine, cancel all pieces used in the application system in all applied host machines The mapping of equipment executes rolling back action to the consistency snapshot group that will restore in the distributed memory system, makes to own The data of block device are restored to the state at same time point, and regenerate and reflect to these block devices on each applied host machine It penetrates, and starts the application system.
10. a kind of computer readable storage medium, which is characterized in that be stored on the computer readable storage medium using system The Backup and Restore program of the Backup and Restore program of system, the application system can be executed by one or more processor, to realize The step of back-up restoring method of application system as described in any one of claims 1 to 5.
CN201910007368.3A 2019-01-04 2019-01-04 Back-up restoring method, device and the computer readable storage medium of application system Pending CN109766220A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910007368.3A CN109766220A (en) 2019-01-04 2019-01-04 Back-up restoring method, device and the computer readable storage medium of application system
PCT/CN2019/117346 WO2020140615A1 (en) 2019-01-04 2019-11-12 Backup and recovery method for application system, device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910007368.3A CN109766220A (en) 2019-01-04 2019-01-04 Back-up restoring method, device and the computer readable storage medium of application system

Publications (1)

Publication Number Publication Date
CN109766220A true CN109766220A (en) 2019-05-17

Family

ID=66452538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910007368.3A Pending CN109766220A (en) 2019-01-04 2019-01-04 Back-up restoring method, device and the computer readable storage medium of application system

Country Status (2)

Country Link
CN (1) CN109766220A (en)
WO (1) WO2020140615A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110286856A (en) * 2019-06-17 2019-09-27 杭州宏杉科技股份有限公司 Roll up cloning process, device, electronic equipment and machine readable storage medium
WO2020140615A1 (en) * 2019-01-04 2020-07-09 平安科技(深圳)有限公司 Backup and recovery method for application system, device and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050216788A1 (en) * 2002-11-20 2005-09-29 Filesx Ltd. Fast backup storage and fast recovery of data (FBSRD)
CN105843704A (en) * 2016-03-15 2016-08-10 上海爱数信息技术股份有限公司 Data protection method and system capable of combining with snapshot function based on distributed block storage
CN106055388A (en) * 2016-06-25 2016-10-26 国云科技股份有限公司 Cloud platform application automatic deployment framework
CN106445741A (en) * 2016-09-28 2017-02-22 郑州云海信息技术有限公司 Method for achieving oracle database disaster tolerance backup on basis of ceph

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9830240B2 (en) * 2015-05-14 2017-11-28 Cisco Technology, Inc. Smart storage recovery in a distributed storage system
CN109766220A (en) * 2019-01-04 2019-05-17 平安科技(深圳)有限公司 Back-up restoring method, device and the computer readable storage medium of application system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050216788A1 (en) * 2002-11-20 2005-09-29 Filesx Ltd. Fast backup storage and fast recovery of data (FBSRD)
CN105843704A (en) * 2016-03-15 2016-08-10 上海爱数信息技术股份有限公司 Data protection method and system capable of combining with snapshot function based on distributed block storage
CN106055388A (en) * 2016-06-25 2016-10-26 国云科技股份有限公司 Cloud platform application automatic deployment framework
CN106445741A (en) * 2016-09-28 2017-02-22 郑州云海信息技术有限公司 Method for achieving oracle database disaster tolerance backup on basis of ceph

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020140615A1 (en) * 2019-01-04 2020-07-09 平安科技(深圳)有限公司 Backup and recovery method for application system, device and computer-readable storage medium
CN110286856A (en) * 2019-06-17 2019-09-27 杭州宏杉科技股份有限公司 Roll up cloning process, device, electronic equipment and machine readable storage medium
CN110286856B (en) * 2019-06-17 2022-11-25 杭州宏杉科技股份有限公司 Volume cloning method, volume cloning device, electronic equipment and machine-readable storage medium

Also Published As

Publication number Publication date
WO2020140615A1 (en) 2020-07-09

Similar Documents

Publication Publication Date Title
US11132264B2 (en) Point-in-time copy restore
CN111488241B (en) Method and system for realizing agent-free backup and recovery operation in container arrangement platform
US11397648B2 (en) Virtual machine recovery method and virtual machine management device
EP3008600B1 (en) Virtual machine backup from storage snapshot
US9727430B2 (en) Failure recovery method in information processing system and information processing system
EP3519969B1 (en) Physical media aware spacially coupled journaling and replay
US9514004B2 (en) Restore in cascaded copy environment
US10852996B2 (en) System and method for provisioning slave storage including copying a master reference to slave storage and updating a slave reference
US11645237B2 (en) Replicating data utilizing a virtual file system and cloud storage
US10489289B1 (en) Physical media aware spacially coupled journaling and trim
CN103268252A (en) Virtualization platform system based on distributed storage and achieving method thereof
JP2007241486A (en) Memory system
US10452680B1 (en) Catch-up replication with log peer
CN104040525A (en) Accessing overlay media over a network connection
US10817325B2 (en) Moving storage volumes for improved performance
US11144233B1 (en) Efficiently managing point-in-time copies of data within a primary storage system
CN109766220A (en) Back-up restoring method, device and the computer readable storage medium of application system
US9760450B2 (en) Restoring a clone point-in-time copy
US20190050455A1 (en) Adaptive page rendering for a data management system
CN109766313A (en) Geological project data processing method, device and computer equipment
CN109508255B (en) Data processing method and device
CN118377657B (en) Data recovery method and device, storage medium and electronic equipment
CN116719604A (en) Container migration method and device, storage medium and electronic equipment
CN118377657A (en) Data recovery method and device, storage medium and electronic equipment
CN110688195A (en) HYPER-V VM instant recovery and access and applications running inside VM using data field boost tfs

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