CN108153614A - A kind of backup of database and restoration methods - Google Patents
A kind of backup of database and restoration methods Download PDFInfo
- Publication number
- CN108153614A CN108153614A CN201611109683.XA CN201611109683A CN108153614A CN 108153614 A CN108153614 A CN 108153614A CN 201611109683 A CN201611109683 A CN 201611109683A CN 108153614 A CN108153614 A CN 108153614A
- Authority
- CN
- China
- Prior art keywords
- database
- backup
- server
- data
- distribution server
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/80—Database-specific techniques
Abstract
Backup and restoration methods the present invention relates to a kind of database, this method include:The database is stored, and provide database service jointly using more distribution servers;Each subdata base of the database is backed up in t platform distribution servers simultaneously, the t is the standby redundancy degree of pre-set database;If a distribution server therein loses data, if storing E word bank in the distribution server, then the other E distribution server for storing the E word bank respectively is found, restore data for it.
Description
【Technical field】
The invention belongs to computer and field of database management more particularly to the spare parts and restoration methods of a kind of database.
【Background technology】
In recent years, with the arrival in big data epoch, the usage amount of data is being doubled and redoubled, and for data backup and
Recovery has increasingly higher demands.For database backup there are two types of, one kind is to back up in realtime, i.e. backup database and source
Database is synchronous, and another kind is that backup is primary at regular intervals, break down in source database and after losing data, just
It can restore data from backup server.
However, in the prior art, backup server is typically just usually inoperative, this waste is standby for backing up
The ability of part server in itself, on the other hand, when failure needs to restore data, source database can only be out of service, etc.
The recovery of pending data, this leverages the service ability of database.
For the disadvantages mentioned above of the prior art, there are no a kind of perfect solutions.
【Invention content】
In order to solve the above problem of the prior art, the present invention proposes backup and the restoration methods of a kind of database.
The technical solution adopted by the present invention is as follows:
A kind of backup of database and restoration methods, this method include the following steps:
Step 1:The database is stored, and provide database service jointly using more distribution servers;
Step 2:Each subdata base of the database is backed up in t platform distribution servers simultaneously, the t is advance
The standby redundancy degree of the database of setting.
Step 3:If a distribution server therein loses data, if storing E word bank in the distribution server,
The other E distribution server for storing the E word bank respectively is then found, restores data for it.
Further, a subdata base is formed by multiple tables of data in the database.
Further, the storage data quantity of each subdata base is essentially identical.
Further, which is characterized in that the more distribution servers can transmit mutually data.
Further, same subdata base is synchronous on the different distributions server that it is stored.
Beneficial effects of the present invention include:Backup server as the server for providing database service, improves simultaneously
The resource utilization of backup server, and the process of backup and recovery does not all interfere with database and is provided out database clothes
Business.
【Description of the drawings】
Attached drawing described herein is to be used to provide further understanding of the present invention, and forms the part of the application, but
It does not constitute improper limitations of the present invention, in the accompanying drawings:
Fig. 1 is the system construction drawing that the method for the present invention is applied.
Fig. 2 is the basic step figure of the method for the present invention.
【Specific embodiment】
Come that the present invention will be described in detail below in conjunction with attached drawing and specific embodiment, illustrative examples therein and say
It is bright to be only used for explaining the present invention, but not as a limitation of the invention.
Referring to the system structure that attached drawing 1, backup and restoration methods it illustrates database of the present invention are applicable in, the system
Including more distribution servers, for one database of distributed storage.All distribution servers are all mutually connected by network
It connects, data can be transmitted mutually between each other, while each distribution server receives the management and scheduling of management server, and passes through
Management server provides database service to outside.The network can be the LAN of an inside, use the excellent of LAN
Point is that mutual transmission data are fast;But, it is contemplated that long-distance disaster, the network can also be wide area network, internet.
Referring to Fig. 2, based on above system structure, the backup of database of the present invention and the basic step of restoration methods are as follows:
Step 1:The database is stored, and provide database service jointly using more distribution servers;
Step 2:Each subdata base of the database is backed up in t platform distribution servers simultaneously, the t is advance
The standby redundancy degree of the database of setting.
Step 3:If a distribution server therein loses data, if storing E word bank in the distribution server,
The other E distribution server for storing the E word bank respectively is then found, restores data for it.
Based on above-mentioned basic step, backup and restoration methods the following detailed description of the database of the present invention:
(1) entire database is cut into multiple subdata bases.
Specific slit mode depends on the organizational form of the data and database stored in database.It for example, can
Cutting is carried out to be based on tables of data, i.e., multiple tables of data are formed into a subdata base;Can also according to the data volume of storage into
Go cutting so that the data volume that each subdata base is stored is essentially identical.In view of distributed storage, the quantity of subdata base
It can determine as the case may be, but generally no less than 3.
(2) the redundancy t of DB Backup is set.
The redundancy refers to storing the quantity of the distribution server of same subdata base, it is assumed that shared n platforms distribution
Server, then each subdata base simultaneously be stored in t platforms distribution server therein, it means that even if wherein there is t-
1 distribution server failure, by remaining 1 distribution server, which can also be restored.It is superfluous in order to ensure
Remaining generally requires t >=3.Additionally, it is preferred that, in order to enable the advantage of distributed storage preferably plays, data distribution is put down
, n >=mt/2 should be met, wherein m is the quantity of subdata base.
(3) appoint in n platform distribution servers and take t platforms, form a server group, by permutation and combination, can obtain altogether
It arrivesA server group, it is S to remember these server groups1, S2... ..., SK,It can so obtain by these server groups
Set S={ the S formedi, 1≤i≤K }.
If for example, t=3, one shares 5 distribution servers, then by permutation and combination, server group one shares
It is a, i.e., | S |=10.The step for actually give same subdata base t distribution server all possible combination.
(4) the current backup degree of each distribution server is calculated, specific computational methods are explained below.
The backup degree is actually the distribution server storage data subdata base cost to be expended, and has reacted this
Distribution server stores the efficiency of data.
(5) for each server group in set S, the backup degree of calculation server group, the backup of the server group
Degree is the sum of backup degree of all distribution servers in the server group.
The sum of described backup degree, which reflects a subdata base, will store the server total backup degree to be spent,
The quality of different server group and, can be weighed by the backup degree.
(6) it to the server group in set S, is ranked up according to the backup degree of server group, by the clothes of backup degree minimum
Device group of being engaged in is deleted as a backup group from set S.
(7) step 4-6 is repeated, until obtaining m backup group.
By step 4-6, an opposite optimal solution is had selected, i.e., m subdata base is stored in n platforms under redundancy t
The opposite optimal solution of distribution server, by this with respect to optimal solution, the distributed storage efficiency of entire database is protected
Card.
(8) each backup group stores a subdata base respectively, i.e., all deposits each distribution server in backup group
Store up a duplication of corresponding subdata base.
M backup group is corresponded with m subdata base, therefore above-mentioned steps substantially deposit m subdata base respectively
Storage is in the server group of m backup degree minimum, and each subdata base has t redundancy, even if t-1 platforms service therein
Device failure also can continue to offer service, and be provided after fault restoration and restore data.On the one hand distributed storage has been reached
On the other hand purpose has also achieved the purpose that redundancy backup.
(9) for the distribution server not in any one backup group, all sons are stored using the distribution server
Database.
It may be spent greatly or since certain distribution servers back up since distribution server quantity is very big, lead to have one
A little distribution servers without in front the step of in be chosen storage subdata base, in order not to waste its storage capacity, the present invention
Using all subdata bases of these server storages, the backup as further distributed storage.
(10) if a distribution server therein loses data, if storing E word bank in the distribution server, then
The other E distribution server for storing the E word bank respectively is found, restores data for it.
By above step, entire database is also to back up in a distributed manner by distributed storage, each distribution clothes
Business device is both the server of database, also serves as backup server, by the management and scheduling of management server, each distribution clothes
Business device is provided out database service jointly, even if wherein there is a small number of server failures, service will not stop, and pass through step
10 mode can be that failed server restores data.
In abovementioned steps (4), need to calculate current backup degree for each distribution server, backup degree can have more
Kind calculation, here is the calculation of one embodiment according to the present invention, but those skilled in the art may be used
Any one other feasible calculation, the invention is not limited in this regard.
(4.1) n platforms distribution server is set as A1, A2... ..., An;A is calculated firstiThe data cost D of (1≤i≤n)i, i.e.,
Di=W1Ti+W2/Li.Wherein, TiIt is distribution server AiTo the propagation delay time (unit is the second) of management server, LiIt is point
Cloth server AiThe data throughput of itself (unit is MB/ seconds).W1And W2It is pre-defined weight coefficient.
If each distribution server in same LAN, the propagation delay time should be it is identical, this
It can be omitted the calculating of the time in the case of kind, directly replaced with a fixed numbers.
(4.2) distribution server A is calculatediBackup degree Ci=FiDi。
Wherein, FiIt is AiThe number occurred in the backup group obtained.For example, the backup group obtained is S1=
{A1, A2, A3And S2={ A1, A3, A4, then current F1=2, i.e. A1Occur 2 times in two backup groups obtained, together
Reason has F2=1, F3=2.
The FiReflect distribution server AiIn existing subdata base quantity, each subdata base can occupy storage
Space and data transfer bandwidth cause distribution server load to increase, thus result in the increase of backup degree.
Based on the restoration methods of above-mentioned database, in the management of database, same subdata base takes in different distributions
All it is synchronous on business device, so if having one to be lost data in n platform distribution servers, other distributions can be used to take
Device be engaged in as its recovery data, if for example, lose on the server of data had k subdata base originally, then can be simultaneously
Restore data for it using the other k platforms distribution server corresponding to k subdata base.
The above is only the better embodiment of the present invention, therefore all constructions according to described in present patent application range,
The equivalent change or modification that feature and principle are done, is included in the range of present patent application.
Claims (5)
1. backup and the restoration methods of a kind of database, which is characterized in that this method includes the following steps:
Step 1:The database is stored, and provide database service jointly using more distribution servers;
Step 2:Each subdata base of the database is backed up in t platform distribution servers simultaneously, the t is to pre-set
Database standby redundancy degree.
Step 3:If a distribution server therein loses data, if storing E word bank in the distribution server, then seek
The other E distribution server for storing the E word bank respectively is looked for, restores data for it.
2. backup and the restoration methods of database according to claim 1, which is characterized in that by more in the database
A tables of data forms a subdata base.
3. backup and the restoration methods of database according to claim 1, which is characterized in that the storage of each subdata base
Data volume is essentially identical.
4. backup and the restoration methods of the database according to claim 1-3 any one, which is characterized in that described more
Distribution server can transmit mutually data.
5. the backup of database and restoration methods according to any one of claims 1-4, which is characterized in that same height
Database is synchronous on the different distributions server that it is stored.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611109683.XA CN108153614B (en) | 2016-12-02 | 2016-12-02 | Database backup and recovery method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611109683.XA CN108153614B (en) | 2016-12-02 | 2016-12-02 | Database backup and recovery method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108153614A true CN108153614A (en) | 2018-06-12 |
CN108153614B CN108153614B (en) | 2021-08-20 |
Family
ID=62467890
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611109683.XA Active CN108153614B (en) | 2016-12-02 | 2016-12-02 | Database backup and recovery method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108153614B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101918927A (en) * | 2008-01-18 | 2010-12-15 | Tivo有限公司 | Distributed backup and retrieval system |
CN102033889A (en) * | 2009-09-29 | 2011-04-27 | 熊凡凡 | Distributed database parallel processing system |
CN102053982A (en) * | 2009-11-02 | 2011-05-11 | 阿里巴巴集团控股有限公司 | Method and equipment for managing database information |
CN102158540A (en) * | 2011-02-18 | 2011-08-17 | 广州从兴电子开发有限公司 | System and method for realizing distributed database |
CN102467508A (en) * | 2010-11-04 | 2012-05-23 | 中兴通讯股份有限公司 | Method for providing database service and database system |
US20120185447A1 (en) * | 2011-01-14 | 2012-07-19 | Symantec Corporation | Systems and Methods for Providing Increased Scalability in Deduplication Storage Systems |
CN102880531A (en) * | 2012-09-27 | 2013-01-16 | 新浪网技术(中国)有限公司 | Database backup system and backup method and slave database server of database backup system |
US8370594B2 (en) * | 2003-01-22 | 2013-02-05 | Falconstor, Inc. | System and method for backing up data |
US20140025704A1 (en) * | 2012-07-19 | 2014-01-23 | International Business Machines Corporation | Query method for a distributed database system and query apparatus |
CN104516794A (en) * | 2014-12-12 | 2015-04-15 | 国家电网公司 | Database document backup method, device and system |
US20150261454A1 (en) * | 2013-03-04 | 2015-09-17 | Kabushiki Kaisha Toshiba | Database device, computer program product and data processing method |
US20150378830A1 (en) * | 2014-06-30 | 2015-12-31 | International Business Machines Corporation | Use of replicated copies to improve database backup performance |
CN105517644A (en) * | 2014-03-05 | 2016-04-20 | 华为技术有限公司 | Data partition method and device |
-
2016
- 2016-12-02 CN CN201611109683.XA patent/CN108153614B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8370594B2 (en) * | 2003-01-22 | 2013-02-05 | Falconstor, Inc. | System and method for backing up data |
CN101918927A (en) * | 2008-01-18 | 2010-12-15 | Tivo有限公司 | Distributed backup and retrieval system |
CN102033889A (en) * | 2009-09-29 | 2011-04-27 | 熊凡凡 | Distributed database parallel processing system |
CN102053982A (en) * | 2009-11-02 | 2011-05-11 | 阿里巴巴集团控股有限公司 | Method and equipment for managing database information |
CN102467508A (en) * | 2010-11-04 | 2012-05-23 | 中兴通讯股份有限公司 | Method for providing database service and database system |
US20120185447A1 (en) * | 2011-01-14 | 2012-07-19 | Symantec Corporation | Systems and Methods for Providing Increased Scalability in Deduplication Storage Systems |
CN102158540A (en) * | 2011-02-18 | 2011-08-17 | 广州从兴电子开发有限公司 | System and method for realizing distributed database |
US20140025704A1 (en) * | 2012-07-19 | 2014-01-23 | International Business Machines Corporation | Query method for a distributed database system and query apparatus |
CN102880531A (en) * | 2012-09-27 | 2013-01-16 | 新浪网技术(中国)有限公司 | Database backup system and backup method and slave database server of database backup system |
US20150261454A1 (en) * | 2013-03-04 | 2015-09-17 | Kabushiki Kaisha Toshiba | Database device, computer program product and data processing method |
CN105517644A (en) * | 2014-03-05 | 2016-04-20 | 华为技术有限公司 | Data partition method and device |
US20150378830A1 (en) * | 2014-06-30 | 2015-12-31 | International Business Machines Corporation | Use of replicated copies to improve database backup performance |
CN104516794A (en) * | 2014-12-12 | 2015-04-15 | 国家电网公司 | Database document backup method, device and system |
Non-Patent Citations (3)
Title |
---|
LIU WEI等: "Research on High Availability Mechanism in Distributed Data Stream Management System", 《2013 10TH WEB INFORMATION SYSTEM AND APPLICATION CONFERENCE》 * |
ZHANGSAI: "分布式系统基础-副本与数据分布", 《HTTP://WWW.CNBLOGS.COM/ZS-NOTE/ARTICLES/5050773.HTML》 * |
梁永利: "分布式异构数据库备份恢复机制研究", 《信息通信》 * |
Also Published As
Publication number | Publication date |
---|---|
CN108153614B (en) | 2021-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8886796B2 (en) | Load balancing when replicating account data | |
US7315958B1 (en) | Method and system for restoring data redundancy in a storage system without a hot standby disk | |
CN106662983B (en) | The methods, devices and systems of data reconstruction in distributed memory system | |
CN107544862B (en) | Stored data reconstruction method and device based on erasure codes and storage node | |
CN100492307C (en) | System and method for solving failure | |
US7188125B1 (en) | Replication using a special off-host network device | |
CN106776130B (en) | Log recovery method, storage device and storage node | |
CN103186554B (en) | Distributed data mirror method and storage back end | |
US20110010338A1 (en) | Distributed Database System | |
US20100161897A1 (en) | Metadata server and disk volume selecting method thereof | |
CN107241430A (en) | A kind of enterprise-level disaster tolerance system and disaster tolerant control method based on distributed storage | |
CN101136728A (en) | Cluster system and method for backing up a replica in a cluster system | |
CN104468651B (en) | Distributed more copy data storage methods and device | |
US20100217857A1 (en) | Consolidating session information for a cluster of sessions in a coupled session environment | |
CN103942112A (en) | Magnetic disk fault-tolerance method, device and system | |
CN105554121A (en) | Method and system for realizing load equalization of distributed cache system | |
CN103209210A (en) | Method for improving erasure code based storage cluster recovery performance | |
CN105988894A (en) | Disaster tolerance technique of active-active mode | |
CN108023939A (en) | The processing method and its system of server failure are locked in distributed system | |
US20080046644A1 (en) | Method and System to Provide a Redundant Buffer Cache for Block Based Storage Servers | |
CN105069152A (en) | Data processing method and apparatus | |
US20230004465A1 (en) | Distributed database system and data disaster backup drilling method | |
CN107168642B (en) | Data storage method and system | |
US20080250421A1 (en) | Data Processing System And Method | |
CN109672544A (en) | A kind of data processing method, device and distributed memory system |
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 | ||
CB02 | Change of applicant information |
Address after: 101399 No. 2 East Airport Road, Shunyi Airport Economic Core Area, Beijing (1st, 5th and 7th floors of Industrial Park 1A-4) Applicant after: Zhongke Star Map Co., Ltd. Address before: 101399 Building 1A-4, National Geographic Information Technology Industrial Park, Guomen Business District, Shunyi District, Beijing Applicant before: Space Star Technology (Beijing) Co., Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |