CN105446828B - A kind of DB Backup, restoration methods, apparatus and system - Google Patents

A kind of DB Backup, restoration methods, apparatus and system Download PDF

Info

Publication number
CN105446828B
CN105446828B CN201410523108.9A CN201410523108A CN105446828B CN 105446828 B CN105446828 B CN 105446828B CN 201410523108 A CN201410523108 A CN 201410523108A CN 105446828 B CN105446828 B CN 105446828B
Authority
CN
China
Prior art keywords
database
backup
full backup
time
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.)
Active
Application number
CN201410523108.9A
Other languages
Chinese (zh)
Other versions
CN105446828A (en
Inventor
符玲亭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology 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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201410523108.9A priority Critical patent/CN105446828B/en
Publication of CN105446828A publication Critical patent/CN105446828A/en
Application granted granted Critical
Publication of CN105446828B publication Critical patent/CN105446828B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of DB Backup, restoration methods, apparatus and systems, when restoring to database to be restored, using the full backup data of full backup time database the last time to be restored and full backup time database the last time to be restored to the record data restored between object time point, data recovery is carried out to database to be restored.Using the embodiment of the present invention, it avoids in database recovery, the last database full-volume Backup Data before only using database recovery object time point restores database, the loss of data between the last database full-volume BACKUP TIME point before database recovery object time point to database recovery object time point.

Description

A kind of DB Backup, restoration methods, apparatus and system
Technical field
The present invention relates to computer information safety technique field, in particular to a kind of DB Backup, restoration methods, device And system.
Background technique
With the development of computer technology and Internet technology, the importance of information security becomes clear day by day.Database conduct One important content of information security is also increasingly paid attention to.Database refer to be stored for a long time in computer it is organized, can be total to The data acquisition system enjoyed.If do not backed up to database, database occur mistake when, cannot to database into Row restore, so as to cause the loss of database data, at this time caused by lose and can not make up.
A kind of DB Backup commonly used in the prior art and restoration methods are to preset database full-volume BACKUP TIME Point carries out full backup to database, generates database when the time reaching pre-set database full-volume BACKUP TIME point Full backup data, so-called full backup, which refers to, completely backs up entire database.When database when something goes wrong, Using the last database full-volume Backup Data before database recovery object time point, database is restored.
But database go wrong need to restore database when, using above-mentioned DB Backup and extensive Compound method, the last database full-volume before the state of database can only being restored to database recovery object time point are standby The state at part time point, full backup are taken time longer, and resource consumption is larger, therefore between the time of adjacent full backup twice Every long, and when occurring database recovery demand during full backup, the last time complete database that can obtain Full backup data after for a long time, often lead to database recovery object time point to database recovery object time point it The mass data of preceding the last database full-volume BACKUP TIME point can not be restored, therefore the mode of full backup has more lack It falls into and unsafe factor exists.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of DB Backup, restoration methods, apparatus and system, to prevent The last data when database is restored, before database recovery object time point to database recovery object time point The loss of data between library full backup time point.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of database backup methods, comprising:
It is standby in its full dose to each database respectively according to the full backup time point of each database in database group Part time point carries out full backup;
Between the time of full backup twice adjacent to any database, the modification to the database is recorded, generates record Data.
Preferably, the database group, comprising:
Under multi-tenant environment, a collection independently of database existing for other tenants of respectively every tenant configuration It closes.
Preferably, the full backup time point of each database in the database group is pre-set;
Or the full backup time point, it is to be determined by policy management element.
Preferably, the policy management element determines the full backup time point, comprising:
The policy management element according to the full backup time interval of each database in preset database group, or According to the database number in database the group perhaps storage size of each database or the modification frequency of database, Determine the full backup time point of each database in database group.
Preferably, the policy management element determines the full backup time point, comprising:
The policy management element calculates each backup according to the BACKUP TIME interval of the database in the database group The number of the database of time point quasi- starting full backup, if database number is greater than preset threshold value, by data inventory The full backup time started at time point of the storage maximum database in space is moved forward or rearward to the second start time.
Preferably, the method also includes:
Incremental backup is carried out to the record data.
Preferably, described carry out incremental backup to the record data, comprising:
To the record data real-time perfoming incremental backup;
Or
At pre-set incremental backup time point, incremental backup is carried out to the record data.
Preferably, the method also includes:
Incremental backup data before current last time full backup is deleted.
Preferably, the incremental backup data by before current last time full backup is deleted, comprising:
After completing n-th full backup, by the incremental backup number between n-th full backup and (n-1)th full backup According to deletion, wherein n=2,3,4 ....
In order to achieve the above objectives, the embodiment of the invention discloses a kind of database restoring methods, comprising:
Database recovery instruction is received, determines the recovery object time point T0 of database to be restored, the database recovery It include the mark of database to be restored in instruction;
It is before obtaining the recovery object time point T0, full backup database the last time, T1 time to be restored complete Measure Backup Data;
According to the full backup data and T0 to the record data between T1, it is extensive that data are carried out to database to be restored It is multiple.
Preferably, it is described according to the full backup data and T0 to the record data between T1, to data to be restored Library carries out data recovery, comprising:
It is using the full backup data of full backup database the last time, T1 time to be restored, database to be restored is extensive T1 moment state is arrived again;
Using T0 to the record data between T1, by database recovery to be restored to T0 moment state.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of DB Backup devices, comprising: full backup mould Block, record data generation module, wherein
The full backup module, for the full backup time point according to each database in database group, respectively Full backup is carried out at its full backup time point to each database;
The record data generation module records between the time of full backup twice adjacent to any database to this The modification of database generates record data.
Preferably, the database group, comprising:
Under multi-tenant environment, a collection independently of database existing for other tenants of respectively every tenant configuration It closes.
Preferably, the full backup time point of each database in the database group is pre-set;
Or the full backup time point, it is to be determined by policy management element.
Preferably, the policy management element determines the full backup time point, comprising:
The policy management element according to the full backup time interval of each database in preset database group, or According to the database number in database the group perhaps storage size of each database or the modification frequency of database, Determine the full backup time point of each database in database group.
Preferably, the policy management element, determines the full backup time point, comprising:
The policy management element calculates each backup according to the BACKUP TIME interval of the database in the database group The number of the database of time point quasi- starting full backup, if database number is greater than preset threshold value, by data inventory The full backup time started at time point of the storage maximum database in space is moved forward or rearward to the second start time.
Preferably, described device further include: incremental backup module, wherein
The incremental backup module, for carrying out incremental backup to the record data.
Preferably, the incremental backup module, is specifically used for:
To the record data real-time perfoming incremental backup;
Or
At pre-set incremental backup time point, incremental backup is carried out to the record data.
Preferably, described device further include: removing module, wherein
The removing module, for deleting the incremental backup data before current last time full backup.
Preferably, the removing module, is specifically used for:
After completing n-th full backup, by the incremental backup number between n-th full backup and (n-1)th full backup According to deletion, wherein n=2,3,4 ....
In order to achieve the above objectives, the embodiment of the invention discloses a kind of database recovery devices, comprising: determining module, complete Amount backup obtains module and recovery module, wherein
The determining module, instruction is restored in library for receiving data, determines the recovery object time point of database to be restored T0 includes the mark of database to be restored in database recovery instruction;
The full backup obtains module, for obtaining before the recovery object time point T0, database to be restored The full backup data of the last full backup time T1;
The recovery module, for, to the record data between T1, being treated extensive according to the full backup data and T0 Complex data library carries out data recovery.
Preferably, the recovery module, is specifically used for:
It is using the full backup data of full backup database the last time, T1 time to be restored, database to be restored is extensive T1 moment state is arrived again;
Using T0 to the record data between T1, by database recovery to be restored to T0 moment state.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of data base backup recovery systems, comprising: above-mentioned data Any one of any one and above-mentioned database recovery device of library backup device.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of data base backup recovery systems, comprising: full backup Module, record data generation module, determining module, full backup obtain module and recovery module,
The full backup module, for the full backup time point according to database, to database in each of which full dose BACKUP TIME point carries out full backup;
The record data generation module, between the time of full backup twice adjacent to database, Huo Zhequan Modification of the Cheng Jilu to the database generates record data;
The determining module, instruction is restored in library for receiving data, determines the recovery object time point of database to be restored;
The full backup obtains module, for obtaining before the recovery object time point, database to be restored most The full backup data of nearly full backup time;
The recovery module, for obtaining the full backup data and restoring object time point to the recovery target Record data between the time of database the last time full backup before time point, to be restored, according to the record data Data recovery is carried out to database to be restored.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of data base backup recovery systems, comprising: full backup Module, record data generation module, determining module, full backup obtain module and recovery module,
The full backup module, for the full backup time point according to each database in database group, respectively Full backup is carried out at its full backup time point to each database;
The record data generation module, for remembering between the time of full backup twice adjacent to any database The modification to the database is recorded, record data are generated;
The determining module, instruction is restored in library for receiving data, determines the recovery object time point of database to be restored T0 includes the mark of database to be restored in database recovery instruction;
The full backup obtains module, for obtaining before the recovery object time point T0, database to be restored The full backup data of the last full backup time T1;
The recovery module, for, to the record data between T1, being treated extensive according to the full backup data and T0 Complex data library carries out data recovery.
As seen from the above technical solutions, the embodiment of the invention provides a kind of DB Backup, restoration methods, device and System, according to the full backup time point of each database in database group, respectively to each database in its full backup Time point carries out full backup;Between the time of full backup twice adjacent to any database, record repairs the database Change, generates record data.Database when something goes wrong, database is used nearest before database recovery object time point Database full-volume Backup Data and the secondary database full backup to database recovery object time point record data pair Database is restored, and is avoided in database recovery, and the last time before database recovery object time point is only used Database full-volume Backup Data restores database, database recovery object time point to database recovery object time point The loss of data between the last database full-volume BACKUP TIME point before.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of database backup method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another database backup method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of another database backup method provided in an embodiment of the present invention;
Fig. 4 is a kind of flow diagram of database restoring method provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of DB Backup device provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of another DB Backup device provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram of another DB Backup device provided in an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of database recovery device provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of data base backup recovery system, which includes: full backup module, record Data generation module, determining module, full backup obtain module and recovery module, wherein
Full backup module, for the full backup time point according to database, to database in each of which full backup Time point carries out full backup;
Data generation module is recorded, between the time point of full backup twice adjacent to database, or it is whole The modification to the database is recorded, record data are generated;
Determining module, instruction is restored in library for receiving data, determines the recovery object time point of database to be restored;
Full backup obtain module, for obtain it is described recovery object time point before, database nearest one to be restored The full backup data of secondary full backup time;
Recovery module, for obtaining the full backup data and restoring object time point to the recovery object time Record data before point, between the time of database the last time full backup to be restored, are treated according to the record data Restore database and carries out data recovery.
The embodiment of the invention provides a kind of data base backup recovery system, which includes: full backup module, record Data generation module, determining module, full backup obtain module and recovery module, wherein
Full backup module, for the full backup time point according to each database in database group, respectively to every A database carries out full backup at its full backup time point;
Data generation module is recorded, between the time of full backup twice adjacent to any database, record pair The modification of the database generates record data;
Determining module, instruction is restored in library for receiving data, determines the recovery object time point T0 of database to be restored, institute State the mark including database to be restored in database recovery instruction;
Full backup obtains module, for before obtaining the recovery object time point T0, database to be restored to be nearest The full backup data of full backup time T1;
Recovery module, for according to the full backup data and T0 to the record data between T1, to number to be restored Data recovery is carried out according to library.
The embodiment of the invention provides a kind of DB Backup, restoration methods, apparatus and systems, wherein
Database backup method includes: the full backup time point according to database, standby in each of which full dose to database Part time point carries out full backup;Between the time point of full backup twice adjacent to database, or whole record is to this The modification of database generates record data.
Database restoring method includes: to receive database recovery instruction, determines the recovery object time of database to be restored Point;Obtain before the recovery object time point, the full backup number of full backup time database the last time to be restored According to;Obtain the full backup data and restore object time point to it is described recovery object time point before, number to be restored According to the record data between the time of library the last time full backup, data are carried out to database to be restored according to the record data Restore.
The embodiment of the invention provides a kind of DB Backup, restoration methods, apparatus and systems, wherein
Database backup method include: according to the full backup time point of each database in database group, it is right respectively Each database carries out full backup at its full backup time point;In the time to the adjacent full backup twice of any database Between, the modification to the database is recorded, record data are generated.
Database restoring method includes: to receive database recovery instruction, determines the recovery object time of database to be restored Point T0 includes the mark of database to be restored in the database recovery instruction;Before obtaining the recovery object time point T0 , the full backup data of full backup database the last time, T1 time to be restored;According to the full backup data and T0 carries out data recovery to database to be restored to the record data between T1.
Wherein, full backup refers to completely is backed up to some database in database group.Recording data can To be transaction journal.In practical applications, to the modification of database, the transaction journal of database, institute can be used by carrying out record The transaction journal of meaning is the file that one and database file separate, it is the file of the update status for database of record, It can recorde any operation for database, and the result of record is saved in independent file.
Database when something goes wrong, the last data before database recovery object time point are used to database Library full backup data and the secondary database full backup to database recovery object time point record data to database into Row restores, and avoids in database recovery, the last database before only using database recovery object time point is complete Amount Backup Data restores database, before database recovery object time point to database recovery object time point most The loss of data between nearly database full-volume BACKUP TIME point.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Below by specific embodiment, the present invention is described in detail.
Fig. 1 is a kind of flow diagram of database backup method provided in an embodiment of the present invention, may include:
S101: according to the full backup time point of each database in database group, respectively to each database at it Full backup time point carries out full backup;
Wherein, the full backup time point of each database in database group can be pre-set.
Specifically, database group is in the environment of multi-tenant, and one of respectively every tenant configuration is independently of other The set of database existing for tenant;
Illustratively, in embodiments of the present invention, it is assumed that database group includes: the number of entitled Management System of Plot Estate According to library, the human resource management database of the database of entitled X supermarket commodity and entitled Y company.
It is illustrated by taking the entitled Management System of Plot Estate of database as an example below,
Assuming that Management System of Plot Estate database pre-set full backup time point are as follows: daily 0:00,6: 00,12:00 and 18:00, i.e., full backup database Management System of Plot Estate, each full backup interval 6 are small 4 times a day When.
There are 7 tables in the Management System of Plot Estate database, be respectively as follows: table 1A, table 1B, table 1C, table 1D, table 1E, Table 1F and table 1G.
Wherein, infrastructure management company's ID number, title, address, telephone number are recorded in table 1A and are set up the time;
Owner's ID number, name are recorded in table 1B, move in time, room number, building number and cell ID number;
Infrastructure management company employee ID number is recorded in table 1C, name, responsible project, is responsible for cell ID number, home address and connection It is phone;
Recording cell ID number, cell name, responsible person, creation data and subdistrict position in table 1D;
ID users, name, password, user name and permission are recorded in table 1E;
Building number, cell ID number, the number of plies and the built time are recorded in table 1F;
Room number is recorded in table 1G, Lou Hao, cell ID number, whether is moved in and User ID.
Assuming that the state of certain day 6:00 Management System of Plot Estate database is as follows:
Table 1A
Cid Cname Cads Cnum Ctime
1 Safety property Beijing southern exposure 85510000 2003-10-3
2 For your property Beijing Haidian 88520101 2005-12-5
Table 1B
Yid Yname Ytime Room Louyu Xid
1 Zhang San 2006-10-3 101 1 1
2 Li Si 2006-5-6 201 2 2
Table 1C
Wid Wname Xiangmu Xid Wads Wnum
1 King five Maintenance 1 Hebei Handan 15910101223
2 Zhao six Security 2 Shandong Zibo 13652365986
Table 1D
Xid Xname Wname Xdate Weizhi
1 Mingguang City's cell Qian great 2003-8-8 Beijing southern exposure
2 Build cell Sun great 2004-5-7 Beijing Haidian
Table 1E
Tid Tname Tpas Tnum Quanxian
1 Admin Admin Admin Admin
2 User User User Guest
Table 1F
Louyu Xid Lnum Date
1 1 3 2005-5-4
2 1 3 2005-5-6
1 2 3 2004-6-5
2 2 3 2005-8-4
Table 1G
Room Louyu Xid YN Tid
101 1 1 Y 1
201 1 1 N
301 1 1 N
101 2 1 N
201 2 1 N
301 2 1 N
101 1 2 N
201 1 2 N
301 1 2 N
101 2 2 N
201 2 2 Y 2
301 2 2 N
Management System of Plot Estate database under the state is subjected to a full backup, generates the 6:00 residential property The full backup data in Management System Data library.
The full backup time point of each database in database group is also possible to: by presetting a tactical management What unit determined.
Specifically, presetting a policy management element, policy management element is according to each in preset database group The full backup time interval of a database, or the storage according to database number or each database in database group The modification frequency of space size or database determines the full backup time point of each database in database group.Strategy Administrative unit can also calculate each BACKUP TIME point and intend opening according to the BACKUP TIME interval of the database in the database group The number of the database of dynamic full backup, if database number is greater than preset threshold value, by storage space of database maximum Full backup time started at time point of database be moved forward or rearward to the second start time.
Specifically, under multi-tenant environment, for one of every tenant configuration independently of database existing for other tenants. When being backed up at least one or multiple databases, the full backup time interval of different databases is opened as far as possible Come, rather than is being backed up simultaneously at the same time.
Specifically, we can be set as every a fixed period from the time of creation database to the number Full backup is carried out according to library.Since under multi-tenant environment, it is unfixed that the time of database is created for each tenant, thus it is each It at the full backup time point of a database, is typically spaced apart.But also it will appear, the data of some time point full backup The case where pressure is excessively brought to backup server in library appearance, therefore a policy management element is set, it is entire backup services The full backup time point of the database cluster of device is managed, so that the BACKUP TIME point of each tenant is different, full backup Time point is able to equilibrium assignment.
Specifically, policy management element determines the full backup time point of each database are as follows: according to preset each number According to the full backup time interval in library, according to the number of database, the modification frequency of database, the size of storage space of database Etc. factors determine.
Specifically, the full backup time interval of each database, be can have user or this system carry out it is artificial or Automatic calculating and setting.
Specifically, policy management element has according to each BACKUP TIME point of BACKUP TIME interval calculation of all databases How many a databases will start full backup, if database number is greater than preset threshold value, by storage space of database The full backup time started at time point of maximum database is moved forward or rearward to the second start time.For example, multi-tenant Under environment, creation has 3 databases altogether, and the full backup time interval of database 1 is 3 hours, and memory space is 5G;Data The full backup time interval in library 2 is 2 hours, and memory space is 6G;The full backup time interval of database 3 is 1 hour, is deposited Storing up space is 7G.Assuming that the first time starting point of 3 databases is intended carrying out full dose when being separately positioned on, 3 o'clock at 1 point at 2 points Backup, policy management element are calculated, and will have 3 databases to start simultaneously at full backup when 4 o'clock, if in advance If threshold value be 2,3 to be greater than preset threshold value 2, then policy management element is by the of the maximum data library 3 that memory space is 7G One start time postpones half an hour backward.
S102: between the time of full backup twice adjacent to any database, the modification to the database is recorded, is generated Record data.
Illustratively, the modification carried out to above-mentioned Management System of Plot Estate database, can be using based on before and after data The mode of variation is recorded, as shown in table 2:
Table 2
Time Table name Column name Line number Before variation After variation
8:10 Table 1B Room 1 101 301
8:10 Table 1G YN 1 Y N
8:10 Table 1G Tid 1 1
8:10 Table 1G YN 3 N Y
8:10 Table 1G Tid 3 1
9:20 Table 1A Cid 3 3
9:20 Table 1A Cname 3 Permanent sincere property
9:20 Table 1A Cads 3 Beijing southern exposure
9:20 Table 1A Cnum 3 85514520
9:20 Table 1A Ctime 3 2004-5-6
12:25 Table 1C Wid 1 1
12:25 Table 1C Wname 1 King five
12:25 Table 1C Xiangmu 1 Maintenance
12:25 Table 1C Xid 1 1
12:25 Table 1C Wads 1 Hebei Handan
12:25 Table 1C Wnum 1 15910101223
To the modification that Management System of Plot Estate database carries out, can also be recorded by the way of based on sentence,
8:10, update ' table 1B ' set Room=' 301 ' where Yname=' Zhang San ';
101 ' AND Louyu=' 1 ' of update ' table 1G ' set YN=' N ' and Tid=" where Room=';
1 ' where Room=' of update ' table 1G ' set YN=' Y ' and Tid=', 301 ' AND Louyu=' 1 ';
The permanent sincere property of 9:20, insert into ' table 1A ' values (' 3 ', ' ', ' Beijing southern exposure ', ' 85514520 ', ' 2004-5-6');
12:25, delete from ' table 1C ' where Wname=' king five ';
In practical applications, to the modification of database, the transaction journal of database, so-called thing can be used by carrying out record Business log is file that one and database file separate, it is the file of the update status for database of record, it can be with Any operation of the recording needle to database, and the result of record is saved in independent file.
It should be noted that the mode recorded limits not to the modification of database in the application, any possibility Implementation can be applied to the application in.
It should be noted that above-mentioned be illustrated by taking the entitled Management System of Plot Estate of database as an example, only one Specific example, and the restriction of not pairs of enough the application.
Divided using embodiment illustrated in fig. 1 of the present invention according to the full backup time point of each database in database group It is other that full backup is carried out at its full backup time point to each database;In full backup twice adjacent to any database Between between, record modification to the database, generate record data.Database when something goes wrong, to database use data Restore the last database full-volume Backup Data and the secondary database full backup to database before object time point in library The record data for restoring object time point restore database, avoid in database recovery, it is extensive to only use database The last database full-volume Backup Data before complicated target time point restores database, when database recovery target Between point to data between the last database full-volume BACKUP TIME point before database recovery object time point loss.
Fig. 2 is the flow diagram of another database backup method provided in an embodiment of the present invention, shown in Fig. 2 of the present invention On the basis of embodiment embodiment shown in Fig. 1, increase S103: incremental backup is carried out to the record data.
Wherein, incremental backup refers to the data for only backing up modified after last backup every time, can be to the record number According to real-time perfoming incremental backup.
In view of in practical applications, to record data real-time perfoming incremental backup, occupying system resources are to save The occupancy for resource of uniting, can preset incremental backup time point, to record data at pre-set incremental backup time point Carry out incremental backup.
Assuming that pre-set incremental backup time point are as follows: daily 2:00,4:00,8:00,9:00,10:00,14:00, 16:00,20:00 and 22:00,
The modification that then above-mentioned Management System of Plot Estate database is carried out, the incremental backup difference that record data carry out Are as follows:
First time incremental backup is carried out in 8:00, the modification to Management System of Plot Estate database 6:00-8:00 generates Record data carry out incremental backup,
Second of incremental backup is carried out in 9:00, the modification to Management System of Plot Estate database 8:00-9:00 generates Record data carry out incremental backup,
Third time incremental backup is carried out in 10:00, the modification to Management System of Plot Estate database 9:00-10:00 is raw At record data carry out incremental backup,
The 4th incremental backup is carried out in 14:00, the modification to Management System of Plot Estate database 12:00-14:00, The record data of generation carry out incremental backup.
It should be noted that above-mentioned be illustrated by taking the entitled Management System of Plot Estate of database as an example, only one Specific example, and the restriction of not pairs of enough the application.
Using embodiment illustrated in fig. 2 of the present invention, database when something goes wrong, database recovery target is used to database When the last database full-volume Backup Data before time point and secondary database full backup to the database recovery target Between the record data put database is restored, avoid in database recovery, only use the database recovery object time The last database full-volume Backup Data before point restores database, database recovery object time point to data The loss of data between the last database full-volume BACKUP TIME point before library recovery object time point.And to generation Record data are backed up, it is therefore prevented that due to the generation for the case where recording the loss of data, causing database that cannot repair.
In view of in practical applications, the number for carrying out incremental backup is more, the incremental backup data of generation more occupies magnetic Disk space, in order to reduce the occupancy of disk space, the embodiment of the present invention also provides another database backup method, referring to Fig. 3 It is shown, on the basis of embodiment illustrated in fig. 3 embodiment shown in Fig. 2 of the present invention, increase S104: will current last time full backup Incremental backup data before is deleted.
Specifically, confirming the secondary full backup success and this time in database administrator after completing a full backup In the case that the database at full backup time point is errorless, incremental backup data before the secondary full backup time point can be by It deletes.It in practical applications, can be after completing n-th full backup, by n-th full backup and (n-1)th full backup Between incremental backup data and/or differential backup data delete, wherein n=2,3,4 ....
Using embodiment illustrated in fig. 3 of the present invention, reduce since multiple incremental backs up, so that the incremental backup data generated To the occupancy of disk space.
Fig. 4 is a kind of flow diagram of database restoring method provided in an embodiment of the present invention, may include:
S201: database recovery instruction is received, determines the recovery object time point T0 of database to be restored;
It wherein, include the mark of database to be restored in database recovery instruction, the mark can be number in practical applications According to the title in library.
Illustratively, it is illustrated by taking the entitled Management System of Plot Estate of database as an example below.
In embodiments of the present invention, it is generally the case that can be by database recovery to current time, i.e. recovery object time point T0 refers to current time, such as when encountering power failure, computer down machine, needs to be restored to the database of current time.
In some cases, it is also desirable to by sometime, the application is also suitable before database recovery to current time In specified the case where restoring object time point T0.Such as: current time 13:00, database administrator is to Property Management of residence System carries out data inspection and finds that mistake occurs for its data, the analysis found that, occur from the data of the 10:20 points of databases wrong Accidentally, it is therefore desirable to which the data of the database are restored to 10:20.
Further for example, Database Systems find that error in data occurs in some full backup data when carrying out self-test, then counting When preparing to repair this mistake according to library recovery system, it will be determined according to the BACKUP TIME of database to be restored and restore the object time Point T0.
Further for example, user oneself after database read-write operation to going back on one's word, it is desirable to by database recovery to mistake desired by oneself When going the state at some time point, when present in database recovery system obtains the recovery target for the database to be restored that a user informs Between point T0.
S202: before the acquisition recovery object time point T0, full backup time database the last time to be restored The full backup data of T1;
The last data according to the database recovery time point 10:20 that S201 is determined, before first looking for 10:20 Library full backup is the full backup that 6:00 is carried out.
S203: according to the full backup data and T0 to the record data between T1, database to be restored is carried out Data are restored.
Wherein, documented information in data is recorded, is the full backup database deadline T1 of the last time, To the data modified to database received between the data recovery instruction time.
Specifically, using the full backup data of full backup database the last time, T1 time to be restored, it will be to be restored Database recovery is to T1 moment state;
Using T0 to the record data between T1, by database recovery to be restored to T0 moment state.
Firstly, using the full backup data of 6:00 by the state of Management System of Plot Estate database recovery to 6:00 such as Under:
Table 1A
Cid Cname Cads Cnum Ctime
1 Safety property Beijing southern exposure 85510000 2003-10-3
2 For your property Beijing Haidian 88520101 2005-12-5
Table 1B
Yid Yname Ytime Room Louyu Xid
1 Zhang San 2006-10-3 101 1 1
2 Li Si 2006-5-6 201 2 2
Table 1C
Wid Wname Xiangmu Xid Wads Wnum
1 King five Maintenance 1 Hebei Handan 15910101223
2 Zhao six Security 2 Shandong Zibo 13652365986
Table 1D
Xid Xname Wname Xdate Weizhi
1 Mingguang City's cell Qian great 2003-8-8 Beijing southern exposure
2 Build cell Sun great 2004-5-7 Beijing Haidian
Table 1E
Tid Tname Tpas Tnum Quanxian
1 Admin Admin Admin Admin
2 User User User Guest
Table 1F
Louyu Xid Lnum Date
1 1 3 2005-5-4
2 1 3 2005-5-6
1 2 3 2004-6-5
2 2 3 2005-8-4
Table 1G
Room Louyu Xid YN Tid
101 1 1 Y 1
201 1 1 N
301 1 1 N
101 2 1 N
201 2 1 N
301 2 1 N
101 1 2 N
201 1 2 N
301 1 2 N
101 2 2 N
201 2 2 Y 2
301 2 2 N
Recycle 6:00 to the record data between 10:20, it may be assumed that 8:10 record to Management System of Plot Estate database Data, the data to Management System of Plot Estate database update of 9:20 record of modification.
Data recovery is carried out to Management System of Plot Estate database.
The state of Management System of Plot Estate database recovery to 9:20 is as follows:
Table 1A
Cid Cname Cads Cnum Ctime
1 Safety property Beijing southern exposure 85510000 2003-10-3
2 For your property Beijing Haidian 88520101 2005-12-5
3 Permanent sincere property Beijing southern exposure 85514520 2004-5-6
Table 1B
Yid Yname Ytime Room Louyu Xid
1 Zhang San 2006-10-3 301 1 1
2 Li Si 2006-5-6 201 2 2
Table 1C
Wid Wname Xiangmu Xid Wads Wnum
1 King five Maintenance 1 Hebei Handan 15910101223
2 Zhao six Security 2 Shandong Zibo 13652365986
Table 1D
Xid Xname Wname Xdate Weizhi
1 Mingguang City's cell Qian great 2003-8-8 Beijing southern exposure
2 Build cell Sun great 2004-5-7 Beijing Haidian
Table 1E
Tid Tname Tpas Tnum Quanxian
1 Admin Admin Admin Admin
2 User User User Guest
Table 1F
Louyu Xid Lnum Date
1 1 3 2005-5-4
2 1 3 2005-5-6
1 2 3 2004-6-5
2 2 3 2005-8-4
Table 1G
Room Louyu Xid YN Tid
101 1 1 N
201 1 1 N
301 1 1 Y 1
101 2 1 N
201 2 1 N
301 2 1 N
101 1 2 N
201 1 2 N
301 1 2 N
101 2 2 N
201 2 2 Y 2
301 2 2 N
Due to not modifying to Management System of Plot Estate database in 9:20 to 10:20, therefore 10:20 cell The state of Property Management System database is identical with the state of 9:20 Management System of Plot Estate database.So far, residential property The data in Management System Data library are restored to complete.
By database recovery to current time, ideally, when T3 immediate with current time T2 Between database data can be identical as the database data of current time T2, it is likely that transaction log backup not in time, is led The database for being finally restored to the T3 time is caused, it is variant with the database of T2 time earlier than the database data of T2 time.
Citing 1:
Assuming that there is first full backup to be completed in the T0 time, second full backup time starts from the T1 time, will be in The T4 time terminates, and when second full backup database not yet backs up completion, user is extensive by database in T2 time requirement The T2 time is arrived again, however the transaction journal of T2 time has a not yet record to enter, to meet the needs of users, skill of the invention The database that art scheme may be implemented to be restored to the T3 time earlier than the T2 time is to user.The database that the T2 time receives user is extensive After multiple request, the full backup database of the last time, the i.e. database of T0 time are searched, searches the last record Transaction journal finds the transaction journal of no T2 time, and the last is the transaction journal at T3 time point.It is arrived according to the T0 time The database of T0 time is gradually restored to the T3 time by the data operation information of database documented by the transaction journal of T3 time The database of point, i.e. reduction obtain and T2 time immediate T3 temporal database.In citing 1, time T0 < T1 < T3 < T2 < T4.
Citing 2:
Assuming that there is first full backup to be completed in the T0 time, second full backup time starts from the T1 time, and in The T4 time terminates, and when T2 time after the T4 time not yet starts third time full backup, and user is in T2 time requirement by data Library is restored to the T2 time, however the transaction journal of T2 time has a not yet record to enter, and the last transaction journal is T3 The transaction journal of time, to meet the needs of users, technical solution of the present invention may be implemented to be restored to the T3 earlier than the T2 time The database of time is to user.After the T2 time receives the database recovery request of user, the full dose for searching the last time is standby Part database, the i.e. database of T4 time search the transaction journal of the last record, find the affairs day of no T2 time Will, the last is the transaction journal at T3 time point.According to database documented by transaction journal of the T4 time to the T3 time Data operation information, the database of T4 time is gradually restored to the database at T3 time point, i.e., reduction obtain with the T2 time Immediate T3 temporal database.In citing 2, time T0 < T1 < T4 < T3 < T2.
It should be noted that above-mentioned be illustrated by taking the entitled Management System of Plot Estate of database as an example, only one Specific example, and the restriction of not pairs of enough the application.
Using embodiment illustrated in fig. 4 of the present invention, database when something goes wrong, database recovery target is used to database When the last database full-volume Backup Data before time point and secondary database full backup to the database recovery target Between the record data put database is restored, avoid in database recovery, only use the database recovery object time The last database full-volume Backup Data before point restores database, database recovery object time point to data The loss of data between the last database full-volume BACKUP TIME point before library recovery object time point.
Corresponding with above-mentioned embodiment of the method, the embodiment of the present invention also provides data backup device and data restore dress It sets.
Fig. 5 is a kind of structural schematic diagram of DB Backup device provided in an embodiment of the present invention, may include: that full dose is standby Part module 301 and record data generation module 302,
Wherein, full backup module 301, for the full backup time point according to each database in database group, Full backup is carried out at its full backup time point to each database respectively;Wherein,
Database group are as follows: under multi-tenant environment, one of respectively every tenant configuration exists independently of other tenants Database set.
It at the full backup time point of each database in database group, can be pre-set, be also possible to pass through What a pre-set policy management element determined, policy management element can be according to each number in preset database group It is big according to the full backup time interval in library, or according to the memory space of database number and each database in database group Small determination.
Specifically, policy management element, when can be according to the full backup of each database in preset database group Between be spaced, or according to the database number in database the group perhaps storage size of each database or database Frequency is modified, determines the full backup time point of each database in database group.
Specifically, policy management element can also be counted according to the BACKUP TIME interval of the database in the database group The number for calculating the database of the quasi- starting full backup of each BACKUP TIME point, if database number is greater than preset threshold value, The full backup time started at time point of the maximum database of storage space of database was moved forward or rearward to the second time Starting point.
Data generation module 302 is recorded, is used between the time of full backup twice adjacent to any database, record pair The modification of the database generates record data.
Using embodiment illustrated in fig. 5 of the present invention, at the full backup time point according to each database in database group, Full backup is carried out at its full backup time point to each database respectively;To the adjacent full backup twice of any database Between, the modification to the database is recorded, record data are generated.Database when something goes wrong, to database use database The last database full-volume Backup Data and the secondary database full backup before restoring object time point is extensive to database The record data at complicated target time point restore database, avoid in database recovery, only use database recovery The last database full-volume Backup Data before object time point restores database, the database recovery object time It puts to the loss of data between the last database full-volume BACKUP TIME point before database recovery object time point.
Fig. 6 is the structural schematic diagram of another DB Backup device provided in an embodiment of the present invention, shown in Fig. 6 of the present invention On the basis of embodiment embodiment shown in Fig. 5, increase incremental backup module 303, wherein
Incremental backup module 303, for carrying out incremental backup to the record data.
The incremental backup module 303 of the embodiment of the present invention, specifically can be used for:
To the record data real-time perfoming incremental backup;
Or
At pre-set incremental backup time point, incremental backup is carried out to the record data.
Using embodiment illustrated in fig. 6 of the present invention, database when something goes wrong, database recovery target is used to database When the last database full-volume Backup Data before time point and secondary database full backup to the database recovery target Between the record data put database is restored, avoid in database recovery, only use the database recovery object time The last database full-volume Backup Data before point restores database, database recovery object time point to data The loss of data between the last database full-volume BACKUP TIME point before library recovery object time point.And to generation Record data are backed up, it is therefore prevented that due to the generation for the case where recording the loss of data, causing database that cannot repair.
Fig. 7 is the structural schematic diagram of another DB Backup device provided in an embodiment of the present invention, shown in Fig. 7 of the present invention On the basis of embodiment embodiment shown in Fig. 6, increase removing module 304, wherein
Removing module 304, for deleting the incremental backup data before current last time full backup.
The removing module 304 of the embodiment of the present invention, specifically can be used for:
After completing n-th full backup, by the incremental backup number between n-th full backup and (n-1)th full backup According to deletion, wherein n=2,3,4 ....
Using embodiment illustrated in fig. 7 of the present invention, reduce since multiple incremental backs up, so that the incremental backup data generated To the occupancy of disk space.
Fig. 8 is a kind of structural schematic diagram of database recovery device provided in an embodiment of the present invention, may include: determining mould Block 401, full backup obtain module 402 and recovery module 403, wherein
Determining module 401, instruction is restored in library for receiving data, determines the recovery object time point of database to be restored T0 includes the mark of database to be restored in database recovery instruction;
Full backup obtain module 402, for obtain it is described recovery object time point T0 before, database to be restored most The full backup data of nearly full backup time T1;
Recovery module 403, for according to the full backup data and T0 to the record data between T1, to be restored Database carries out data recovery.
The recovery module 403 of the embodiment of the present invention, specifically can be used for:
It is using the full backup data of full backup database the last time, T1 time to be restored, database to be restored is extensive T1 moment state is arrived again;
Using T0 to the record data between T1, by database recovery to be restored to T0 moment state.
Using embodiment illustrated in fig. 8 of the present invention, database when something goes wrong, database recovery target is used to database When the last database full-volume Backup Data before time point and secondary database full backup to the database recovery target Between the record data put database is restored, avoid in database recovery, only use the database recovery object time The last database full-volume Backup Data before point restores database, database recovery object time point to data The loss of data between the last database full-volume BACKUP TIME point before library recovery object time point.
The embodiment of the present invention also provides a kind of data base backup recovery system, including any of above-mentioned DB Backup device Any one of a kind of and above-mentioned database recovery device.
The embodiment of the present invention also provides a kind of data base backup recovery system, comprising: full backup module, record data are raw Module and recovery module are obtained at module, determining module, full backup, wherein
The full backup module, for the full backup time point according to database, to database in each of which full dose BACKUP TIME point carries out full backup;
The record data generation module, between the time of full backup twice adjacent to database, Huo Zhequan Modification of the Cheng Jilu to the database generates record data;
The determining module, instruction is restored in library for receiving data, determines the recovery object time point of database to be restored;
The full backup obtains module, for obtaining before the recovery object time point, database to be restored most The full backup data of nearly full backup time;
The recovery module, for obtaining the full backup data and restoring object time point to the recovery target Record data between the time of database the last time full backup before time point, to be restored, according to the record data Data recovery is carried out to database to be restored.
The embodiment of the present invention also provides a kind of data base backup recovery system, comprising: full backup module, record data are raw Module and recovery module are obtained at module, determining module, full backup, wherein
The full backup module, for the full backup time point according to each database in database group, respectively Full backup is carried out at its full backup time point to each database;
The record data generation module, for remembering between the time of full backup twice adjacent to any database The modification to the database is recorded, record data are generated;
The determining module, instruction is restored in library for receiving data, determines the recovery object time point of database to be restored T0 includes the mark of database to be restored in database recovery instruction;
The full backup obtains module, for obtaining before the recovery object time point T0, database to be restored The full backup data of the last full backup time T1;
The recovery module, for, to the record data between T1, being treated extensive according to the full backup data and T0 Complex data library carries out data recovery.
Using data base backup recovery system provided in an embodiment of the present invention, avoids in database recovery, only use The last database full-volume Backup Data before database recovery object time point restores database, and database is extensive Data between the last database full-volume BACKUP TIME point before complicated target time point to database recovery object time point Loss.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
Those of ordinary skill in the art will appreciate that all or part of the steps in realization above method embodiment is can It is completed with instructing relevant hardware by program, the program can store in computer-readable storage medium, The storage medium designated herein obtained, such as: ROM/RAM, magnetic disk, CD.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (19)

1. a kind of database backup method, which is characterized in that the described method includes:
According to the full backup time point of each database in database group, respectively to each database in its full backup Between point carry out full backup;
Between the time of full backup twice adjacent to any database, the modification to the database is recorded, generates record data;
Incremental backup is carried out to the record data, the incremental backup refers to the number for only backing up modified after last backup every time According to;
Wherein, the full backup time point, is determined by policy management element;
The policy management element determines the full backup time point, comprising:
The policy management element calculates each BACKUP TIME according to the BACKUP TIME interval of the database in the database group The number of the database of the quasi- starting full backup of point, if database number is greater than preset threshold value, by database purchase sky Between full backup time started at time point of maximum database be moved forward or rearward to the second start time.
2. the method according to claim 1, wherein the database group, comprising:
Under multi-tenant environment, a set independently of database existing for other tenants of respectively every tenant configuration.
3. the method according to claim 1, wherein the policy management element determines the full backup time Point, comprising:
The policy management element according to the full backup time interval of each database in preset database group, or according to Database number in database the group perhaps storage size of each database or the modification frequency of database, determine The full backup time point of each database in database group.
4. the method according to claim 1, wherein described carry out incremental backup to the record data, comprising:
To the record data real-time perfoming incremental backup;Or
At pre-set incremental backup time point, incremental backup is carried out to the record data.
5. the method according to claim 1, wherein the method also includes:
Incremental backup data before current last time full backup is deleted.
6. according to the method described in claim 5, it is characterized in that, the increment by before current last time full backup Backup Data is deleted, comprising:
After completing n-th full backup, the incremental backup data between n-th full backup and (n-1)th full backup is deleted It removes, wherein n=2,3,4 ....
7. a kind of database restoring method, which is characterized in that the described method includes:
Database recovery instruction is received, determines the recovery object time point T0 of database to be restored, the database recovery instruction In include database to be restored mark;
Obtain it is described recovery object time point T0 before, the full dose of full backup database the last time, T1 time to be restored it is standby Part data;
According to the full backup data and T0 to the record data between T1, data recovery is carried out to database to be restored; The record data are in T0 between T1, the modification to the database to be restored of record;
Incremental backup is carried out to the record data, the incremental backup refers to the number for only backing up modified after last backup every time According to;
Wherein, the full backup time point, is determined by policy management element;
The policy management element determines the full backup time point, comprising:
It is quasi- to calculate each BACKUP TIME point according to the BACKUP TIME interval of the database in database group for the policy management element Start the number of the database of full backup, if database number is greater than preset threshold value, most by storage space of database The full backup time started at time point of big database is moved forward or rearward to the second start time.
8. the method according to the description of claim 7 is characterized in that it is described according to the full backup data and T0 to T1 it Between record data, to database to be restored carry out data recovery, comprising:
Using the full backup data of full backup database the last time, T1 time to be restored, database recovery to be restored is arrived T1 moment state;
Using T0 to the record data between T1, by database recovery to be restored to T0 moment state.
9. a kind of DB Backup device, which is characterized in that described device includes: full backup module, record data generation mould Block, incremental backup module, wherein
The full backup module, for the full backup time point according to each database in database group, respectively to every A database carries out full backup at its full backup time point;
The record data generation module, for recording to this between the time of full backup twice adjacent to any database The modification of database generates record data;
The incremental backup module, for carrying out incremental backup to the record data, the incremental backup refers to only to be backed up every time The data modified after last time backup;
Wherein, the full backup time point, is determined by policy management element;
The policy management element determines the full backup time point, comprising:
The policy management element calculates each BACKUP TIME according to the BACKUP TIME interval of the database in the database group The number of the database of the quasi- starting full backup of point, if database number is greater than preset threshold value, by database purchase sky Between full backup time started at time point of maximum database be moved forward or rearward to the second start time.
10. device according to claim 9, which is characterized in that the database group, comprising:
Under multi-tenant environment, a set independently of database existing for other tenants of respectively every tenant configuration.
11. device according to claim 9, which is characterized in that when the policy management element determines the full backup Between point, comprising:
The policy management element according to the full backup time interval of each database in preset database group, or according to Database number in database the group perhaps storage size of each database or the modification frequency of database, determine The full backup time point of each database in database group.
12. device according to claim 9, which is characterized in that the incremental backup module is specifically used for:
To the record data real-time perfoming incremental backup;
Or
At pre-set incremental backup time point, incremental backup is carried out to the record data.
13. device according to claim 9, which is characterized in that described device further include: removing module, wherein
The removing module, for deleting the incremental backup data before current last time full backup.
14. device according to claim 13, which is characterized in that the removing module is specifically used for:
After completing n-th full backup, the incremental backup data between n-th full backup and (n-1)th full backup is deleted It removes, wherein n=2,3,4 ....
15. a kind of database recovery device, which is characterized in that described device comprise determining that module, full backup obtain module and Recovery module, wherein
The determining module, instruction is restored in library for receiving data, determines the recovery object time point T0 of database to be restored, institute State the mark including database to be restored in database recovery instruction;
The full backup obtains module, for before obtaining the recovery object time point T0, database to be restored to be nearest The full backup data of full backup time T1;
The recovery module, for according to the full backup data and T0 to the record data between T1, to number to be restored Data recovery is carried out according to library;The record data are in T0 between T1, the modification to the database to be restored of record;
Incremental backup is carried out to the record data, the incremental backup refers to the number for only backing up modified after last backup every time According to;
Wherein, the full backup time point, is determined by policy management element;
The policy management element determines the full backup time point, comprising:
It is quasi- to calculate each BACKUP TIME point according to the BACKUP TIME interval of the database in database group for the policy management element Start the number of the database of full backup, if database number is greater than preset threshold value, most by storage space of database The full backup time started at time point of big database is moved forward or rearward to the second start time.
16. device according to claim 15, which is characterized in that the recovery module is specifically used for:
Using the full backup data of full backup database the last time, T1 time to be restored, database recovery to be restored is arrived T1 moment state;
Using T0 to the record data between T1, by database recovery to be restored to T0 moment state.
17. a kind of data base backup recovery system, any one DB Backup device and power including claim 9 to 14 Benefit requires 15 and 16 any one database recovery device.
18. a kind of data base backup recovery system, which is characterized in that the system comprises: full backup module, record data are raw Module, recovery module and incremental backup module are obtained at module, determining module, full backup, wherein
The full backup module, for the full backup time point according to database, to database in each of which full backup Time point carries out full backup;
The record data generation module, between the time of full backup twice adjacent to database, or whole note The modification to the database is recorded, record data are generated;
The determining module, instruction is restored in library for receiving data, determines the recovery object time point of database to be restored;
The full backup obtains module, for obtaining before the recovery object time point, database nearest one to be restored The full backup data of secondary full backup time;
The recovery module, for obtaining the full backup data and restoring object time point to the recovery object time Record data before point, between the time of database the last time full backup to be restored, are treated according to the record data Restore database and carries out data recovery;
The incremental backup module, for carrying out incremental backup to the record data, the incremental backup refers to only to be backed up every time The data modified after last time backup;
Wherein, the full backup time point, is determined by policy management element;Wherein, the policy management element is used for It is quasi- to calculate each BACKUP TIME point for the BACKUP TIME interval of each database in database group where the database Start the number of the database of full backup, if database number is greater than preset threshold value, most by storage space of database The full backup time started at time point of big database is moved forward or rearward to the second start time.
19. a kind of data base backup recovery system, which is characterized in that the system comprises: full backup module, record data are raw Module, recovery module and incremental backup module are obtained at module, determining module, full backup, wherein
The full backup module, for the full backup time point according to each database in database group, respectively to every A database carries out full backup at its full backup time point;
The record data generation module, between the time of full backup twice adjacent to any database, record pair The modification of the database generates record data;
The determining module, instruction is restored in library for receiving data, determines the recovery object time point T0 of database to be restored, institute State the mark including database to be restored in database recovery instruction;
The full backup obtains module, for before obtaining the recovery object time point T0, database to be restored to be nearest The full backup data of full backup time T1;
The recovery module, for according to the full backup data and T0 to the record data between T1, to number to be restored Data recovery is carried out according to library;
The incremental backup module, for carrying out incremental backup to the record data, the incremental backup refers to only to be backed up every time The data modified after last time backup;
Wherein, the full backup time point, is determined by policy management element;
The policy management element determines the full backup time point, comprising:
The policy management element calculates each BACKUP TIME according to the BACKUP TIME interval of the database in the database group The number of the database of the quasi- starting full backup of point, if database number is greater than preset threshold value, by database purchase sky Between full backup time started at time point of maximum database be moved forward or rearward to the second start time.
CN201410523108.9A 2014-09-30 2014-09-30 A kind of DB Backup, restoration methods, apparatus and system Active CN105446828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410523108.9A CN105446828B (en) 2014-09-30 2014-09-30 A kind of DB Backup, restoration methods, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410523108.9A CN105446828B (en) 2014-09-30 2014-09-30 A kind of DB Backup, restoration methods, apparatus and system

Publications (2)

Publication Number Publication Date
CN105446828A CN105446828A (en) 2016-03-30
CN105446828B true CN105446828B (en) 2019-05-31

Family

ID=55557061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410523108.9A Active CN105446828B (en) 2014-09-30 2014-09-30 A kind of DB Backup, restoration methods, apparatus and system

Country Status (1)

Country Link
CN (1) CN105446828B (en)

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955845A (en) * 2016-04-26 2016-09-21 浪潮电子信息产业股份有限公司 Data recovery method and device
CN106126371A (en) 2016-06-15 2016-11-16 腾讯科技(深圳)有限公司 Data return a grade method, Apparatus and system
CN106201780A (en) * 2016-07-08 2016-12-07 浪潮通用软件有限公司 A kind of historical data method of reducing
CN106776120A (en) * 2016-11-24 2017-05-31 珠海市魅族科技有限公司 The method and device of data recovery
CN106648980A (en) * 2016-12-12 2017-05-10 北京雷石天地电子技术有限公司 Backup and recovery method and backup and recovery device for high-availability server databases in offline places
CN108241555B (en) * 2016-12-26 2022-03-01 阿里巴巴集团控股有限公司 Backup and recovery method and device of distributed database and server
CN108511035A (en) * 2017-02-23 2018-09-07 仁智(苏州)医学研究有限公司 A kind of data managing method and device of hospital information system
CN107229540A (en) * 2017-06-06 2017-10-03 贵州易鲸捷信息技术有限公司 A kind of database restoring method and system based on time point
CN107515801A (en) * 2017-09-13 2017-12-26 绿金在线电子商务有限公司 A kind of data self-repairing method based on relevant database
CN108156264B (en) * 2018-03-06 2021-01-26 爱普(福建)科技有限公司 Data synchronization method oriented to dual-computer redundancy
CN110784499B (en) * 2018-07-30 2021-08-20 华为技术有限公司 Data backup method and terminal equipment
CN109101369A (en) * 2018-08-21 2018-12-28 郑州云海信息技术有限公司 A kind of sustainable protection method, system and device of business host data
CN109408283A (en) * 2018-09-04 2019-03-01 深圳市宝德计算机系统有限公司 A kind of method of server data protection, equipment and storage medium
USD886143S1 (en) 2018-12-14 2020-06-02 Nutanix, Inc. Display screen or portion thereof with a user interface for database time-machine
US10817157B2 (en) 2018-12-20 2020-10-27 Nutanix, Inc. User interface for database management services
US11010336B2 (en) 2018-12-27 2021-05-18 Nutanix, Inc. System and method for provisioning databases in a hyperconverged infrastructure system
US11816066B2 (en) 2018-12-27 2023-11-14 Nutanix, Inc. System and method for protecting databases in a hyperconverged infrastructure system
CN110263095B (en) * 2019-05-31 2021-10-01 众安在线财产保险股份有限公司 Data backup and recovery method and device, computer equipment and storage medium
CN110673985B (en) * 2019-09-20 2023-12-26 深圳创维-Rgb电子有限公司 Method for automatically backing up version library, storage medium and server
CN110941509A (en) * 2019-11-08 2020-03-31 北京浪潮数据技术有限公司 Database backup method, device, equipment and storage medium of cloud platform
CN111176889A (en) * 2019-12-11 2020-05-19 天翼电子商务有限公司 Automatic backup recovery device and method
CN111209267B (en) * 2019-12-23 2024-01-30 中国建设银行股份有限公司 Information providing method, system, device and storage medium
CN111611108A (en) * 2020-05-21 2020-09-01 云和恩墨(北京)信息技术有限公司 Method and device for restoring virtual database
US11604705B2 (en) 2020-08-14 2023-03-14 Nutanix, Inc. System and method for cloning as SQL server AG databases in a hyperconverged system
US11907167B2 (en) 2020-08-28 2024-02-20 Nutanix, Inc. Multi-cluster database management services
US11640340B2 (en) 2020-10-20 2023-05-02 Nutanix, Inc. System and method for backing up highly available source databases in a hyperconverged system
US11604806B2 (en) 2020-12-28 2023-03-14 Nutanix, Inc. System and method for highly available database service
US11892918B2 (en) 2021-03-22 2024-02-06 Nutanix, Inc. System and method for availability group database patching
US11803368B2 (en) 2021-10-01 2023-10-31 Nutanix, Inc. Network learning to control delivery of updates
CN115421969A (en) * 2022-07-30 2022-12-02 超聚变数字技术有限公司 Backup data recovery method and computing device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1659522A (en) * 2002-04-19 2005-08-24 电脑联合想象公司 Method and system for disaster recovery
CN101067818A (en) * 2007-06-06 2007-11-07 中国工商银行股份有限公司 Data incremental backup and recovery method applied to data bank
US8260750B1 (en) * 2009-03-16 2012-09-04 Quest Software, Inc. Intelligent backup escalation system
CN103118011A (en) * 2013-01-12 2013-05-22 合肥华云通信技术有限公司 Method for protecting customer data in multi-tenant environment
CN103885855A (en) * 2012-12-20 2014-06-25 航天信息股份有限公司 Data backup and recovery method and data backup and recovery device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1659522A (en) * 2002-04-19 2005-08-24 电脑联合想象公司 Method and system for disaster recovery
CN101067818A (en) * 2007-06-06 2007-11-07 中国工商银行股份有限公司 Data incremental backup and recovery method applied to data bank
US8260750B1 (en) * 2009-03-16 2012-09-04 Quest Software, Inc. Intelligent backup escalation system
CN103885855A (en) * 2012-12-20 2014-06-25 航天信息股份有限公司 Data backup and recovery method and data backup and recovery device
CN103118011A (en) * 2013-01-12 2013-05-22 合肥华云通信技术有限公司 Method for protecting customer data in multi-tenant environment

Also Published As

Publication number Publication date
CN105446828A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN105446828B (en) A kind of DB Backup, restoration methods, apparatus and system
CN105843702B (en) A kind of method and device for data backup
US9183268B2 (en) Partition level backup and restore of a massively parallel processing database
CN103927238B (en) Technique For Timeline Compression In Data Store
US7805439B2 (en) Method and apparatus for selecting data records from versioned data
CN102187316B (en) Backing up and restoring security information for selected database objects
CN105824572B (en) A kind of disk storage space management method, device and storage equipment
US20080243878A1 (en) Removal
CN106663103A (en) Scalable eventual consistency system using logical document journaling
CN101017453A (en) Method and system for managing deletions in backup sets
CN107528872A (en) A kind of data reconstruction method, device and cloud storage system
CN104750755B (en) A kind of data covering method and system after database active-standby switch
US20170235643A1 (en) Data recovery from multiple data backup technologies
CN103631967B (en) A kind of processing method and processing device of the tables of data with independent increment identification field
US9996599B2 (en) Using access count of the remote site to optimize file transfer order for asynchronous replication
CN105955843A (en) Method and device used for database recovery
CN104182302A (en) Database backup method and device
CN108762982B (en) A kind of database restoring method, apparatus and system
CN107742187A (en) ERP sells objective insurance system
CN115617571A (en) Data backup method, device, system, equipment and storage medium
US7725439B2 (en) Handling column renaming as part of schema evolution in a data archiving tool
CN106294013B (en) A kind of different data disaster tolerance method and systems backed up between domain
CN109445989A (en) A kind of file system data backup method and device
US20120011099A1 (en) File backup apparatus and method
CN114442944B (en) Data replication method, system and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant