A kind of client-based database multi-point backup system and its backup method
Technical field
The present invention relates to database technical field, specially a kind of client-based database multi-point backup system and its
Backup method.
Background technology
In database application field, database purchase relational data is the important infrastructure that data are preserved and utilized.
Significant data needs multiple spot to preserve, to reduce the risk that Single Point of Faliure causes loss of data.
On the IT infrastructure that many enterprises provide information system deployment in different cloud computing service quotient, by information
The data that system generates, while be stored on the server of different IT service providers, it backups each other, reduces information system and stop fortune
Capable risk.The database environment that different IT service providers provide is not quite similar, and needs the database multiple spot for being suitble to such case
Standby system and mechanism.
The features such as specification, technical specification, the interface of same database product are identical, and provide corresponding data backup work
Tool and method, it is more guaranteed in terms of data backup.Characteristic is different between disparate databases product, especially the hair of cloud computing
, there are many databases based on cloud, information system is disposed in different cloud platforms, then need blanket data in exhibition
Multi-point backup mechanism and method and corresponding system deployment design.
Invention content
To solve the above-mentioned problems, the present invention provides a kind of client-based database multi-point backup systems and its standby
Part method, being capable of multi-point backup data, realization backup storage on heterogeneous database.
Its technical solution is such:A kind of client-based database multi-point backup method, which is characterized in that in institute
It states and provides access address and data base read-write account for the client at database server, in the client installation data
Library multi-point backup software, the database multi-point backup software access the database server simultaneously using data base read-write account
Data are write to the database server, write data include the following steps:
(1)It is ready to need newer data;
(2)It is updated the data into database server, obtains update result;
(3)If the data update success on database server, this update terminate;If update is unsuccessful,
By data buffer storage in persistent storage device, it is data cached including database preserve Status Flag and data record group into;
(4)If there is updating the unsuccessful data being cached in persistent storage device, read from persistent storage device
It is data cached, it is updated the data according to database flag to corresponding database server, and obtain update result;
(5)After update operation, if update data cached in check and inspection persistent storage device is as a result, all numbers
The data have all been stored according to library server, then have deleted the data cached in persistent storage device;If update is unsuccessful, to holding
Data cached preservation mark is configured in storage long, to reflect latest update situation, for being used during next update.
It is further characterized by the step of, write data(1)In, it is ready to deposit persistently after needing newer data
It is cached in storage equipment, step(3)In if on database server data update success after delete persistent storage device
Upper corresponding data cached, this update terminates.
A kind of client-based database multi-point backup system, which is characterized in that it includes database server and visitor
Family end, the database server can run different database products, installation database access interface in the client,
The client is communicated by network with the database server.
It is further characterized by the database server is database server or the deployment for being deployed in enterprises
In the database server on cloud computing platform;
Server of the database server for the database product of multiple operation different structures;
The data stored in the database server are consistent to the logical view model of user.
After scheme using the present invention, without disposing synchronizing software in database side, installation database is more at client
Point backup software, can provide a kind of convenient means for the database multi-point backup between heterogeneous database, applied widely.
Description of the drawings
Fig. 1 is present system deployment architecture schematic diagram;
Fig. 2 updates the data step schematic diagram for client software into 3 database servers;
Fig. 3 is database information and data cached logical recording format schematic diagram;
Fig. 4 backs up schematic diagram again for client software with the data that persistent storage caches.
Specific embodiment
As shown in Figure 1, a kind of client-based database multi-point backup system, can including 3 database servers
To run different database products, installation database access interface in client, client passes through network and database service
It can be the equipment such as PC, notebook, tablet, smart mobile phone that device, which carries out communication customer end, possess the ability for accessing network, Neng Gouan
Database access interface is filled, to obtain the ability for accessing database server, client installs windows by taking notebook as an example
Operating system, and installation database access interface environment, database multi-point backup software access number using database access interface
According to library server;Database server is the number for being deployed in the database server of enterprises or being deployed on cloud computing platform
According to library server;Database server can run disparate databases product, the data pair stored in two database servers
The logical view model of user is consistent.
As shown in Figure 2, a kind of client-based database multi-point backup method is client at database server
Access address and data base read-write account are provided, in client installation database multi-point backup software, database multi-point backup is soft
Part accesses database server using data base read-write account and writes data to database server, and data packets include following step
Suddenly:
(1)Database address and account information are obtained, is ready to need newer data;
(2)It is updated the data into 3 database servers, obtains update result;
(3)It is data cached including database flag by data buffer storage in persistent storage device if update is unsuccessful
With data record group into;
(4)If the data update success on database server, this update terminate.
As shown in Figure 3, database information and data cached logical recording format schematic diagram.Client software needs to preserve number
According to library information, the information such as database IP address, account can be stored in local, and database is current according to such structure
State recorded, the use of database positioning field can be defined flexibly, to facilitate the Function Extension of client software.
For example whether the data in database of record are last states, can also record whether current database can be used.
In Fig. 3, data cached logical recording format defines a data structure, and provide for client temporal data
The Status of Backups of one record.In data structure in addition to comprising the data record in database to be saved in, this is further comprised
The database of item record preserves status information, and the preservation state of this record in the database is recorded, facilitates client
Software backs up data record again.The present invention only provides the logical format of data definition, and data specifically store realization
Mode does not limit, and can realize there are many method, for example puts in the local database, with XML tissue storages etc., specific implementation
When, suitable method can be selected.
As shown in Figure 4, client software can back up the data being not backed up in persistent storage again, and client is soft
Part is data cached in proper moment, scanning persistent storage device, carries out backup operation.The newer strategy of proper moment is by reality
Apply personnel's decision, the present invention does not limit concrete measure, can periodically update or network is unobstructed, database is normal
It can be updated in the case of.Again the step of backing up is as follows:
(1)For client software from persistent storage, data cached interrecord structure as shown in Figure 3 reads data;
(2)Check that database corresponding with data record preserves Status Flag, into the database for also not preserving the data
Back up the data;
(3)Check backup operation as a result, seeing in all databases whether all save data;
(4)If it is not, then the database preservation Status Flag that update persistent storage is data cached;If it is, it deletes
Have backed up the data record of completion;
(5)Wait for next backup.