CN109408280A - Data back up method, apparatus and system - Google Patents
Data back up method, apparatus and system Download PDFInfo
- Publication number
- CN109408280A CN109408280A CN201710706787.7A CN201710706787A CN109408280A CN 109408280 A CN109408280 A CN 109408280A CN 201710706787 A CN201710706787 A CN 201710706787A CN 109408280 A CN109408280 A CN 109408280A
- Authority
- CN
- China
- Prior art keywords
- data
- equipment
- backed
- copy
- cluster
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
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/1448—Management of the data involved in backup or backup restore
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The embodiment of the invention provides a kind of data back up method, device, system, electronic equipment and computer readable storage mediums, applied to the first equipment in the main cluster of data backup system, wherein, the data backup system includes: main cluster, data buffering device, backup cluster, the method includes the steps: determine the data to be backed up of locally stored first;Described first data to be backed up are sent to the data buffering device, so that the data buffering device caches the described first data to be backed up and the described first data to be backed up are sent to the equipment in the backup cluster when meeting preset cache data and sending condition.Using scheme provided in an embodiment of the present invention, it can be realized data and backed up from main cluster to the automation of backup cluster, and improve the real-time property of backup cluster and main cluster.
Description
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of data back up method, device, system, electronics
Equipment and computer readable storage medium.
Background technique
Data backup refers to that operation error or the system failure occur for anti-locking system or machine leads to loss of data, and incites somebody to action
All or part of data acquisition system is from a machine or system copies to another machine or the process of system.The storage of data original
System perhaps machine can machine where the data based on after cluster backup or system can be to be referred to as backup set
Group.Using data backup, being stored in a certain machine or system in data set can be prevented, because of the machine that is stored or
Loss of data caused by person's system breaks down, or be not available temporarily.
In the prior art, the scheme of data backup is carried out are as follows: data to be backed up are directly respectively stored into main cluster and standby
In part cluster, the data of usual main cluster-based storage are continuous changed, such as storage Webpage log etc. carries out more at any time
New data, in face of such situation, can only by movable storage device, periodically or non-periodically will be to be backed up in main cluster
In data copy to backup cluster, this process generally requires personnel and manually performs, and is easy to produce maloperation;And backup cluster and
The real-time property of main cluster is poor.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of data back up method, device, system, electronic equipment and computer
Readable storage medium storing program for executing improves backup cluster and main cluster to realize that data are backed up from main cluster to the automation of backup cluster
Real-time property.Specific technical solution is as follows:
In a first aspect, the main collection the embodiment of the invention provides a kind of data back up method, applied to data backup system
The first equipment in group, wherein the data backup system includes: main cluster, data buffering device, backup cluster, the above method
Comprising steps of
Determine the data to be backed up of locally stored first;
First data to be backed up are sent to data buffering device, so that data buffering device caches the first number to be backed up
First data to be backed up are sent to equipment in backup cluster according to and meeting when preset cache data send condition.
Optionally, in the case where at least two copy of the first data to be backed up is stored in the equipment of main cluster,
Above-mentioned the step of first data to be backed up are sent to data buffering device, comprising:
The selection target copy from the copy for the first data to be backed up being locally stored;
Target copy is sent to data buffering device;
Correspondingly, the above method further include:
The transmission progress of target copy is obtained, and judges whether mistake occur in target copy transmission process;
If so, being selected from the copy of the first data to be backed up other than the target copy stored in the equipment of main cluster
Selected copy is sent to data buffering device by the second equipment, wherein the second equipment are as follows: selected by one copy
Copy where main cluster in equipment.
Optionally, the above method further include:
During target copy is sent to data buffering device, transmission progress is sent to target device, wherein
Target device are as follows: in main cluster in addition to the first equipment, the equipment that is stored with the copy of the first data to be backed up.
Optionally, above-mentioned data buffering device caches the step of the first data to be backed up, comprising:
Data buffering device caches the first data to be backed up in the form of fragment.
Optionally, the above method further include:
Receive and store the second data to be backed up that equipment is sent in backup cluster.
Second aspect, the embodiment of the invention provides a kind of data backup devices, the main collection applied to data backup system
The first equipment in group, wherein data backup system includes: main cluster, data buffering device, backup cluster, above-mentioned apparatus packet
It includes:
Determining module, for determining the data to be backed up of locally stored first;
Cache module, for the first data to be backed up to be sent to data buffering device, so that data buffering device is slow
It deposits the first data to be backed up and the first data to be backed up is sent to backup cluster when meeting preset cache data and sending condition
In equipment.
Optionally, above-mentioned cache module, is specifically used for:
In the case where being stored at least two copy of the first data to be backed up in the equipment of main cluster, from being locally stored
The first data to be backed up copy in selection target copy;Target copy is sent to data buffering device;
Correspondingly, above-mentioned apparatus further include: judgment module, the first sending module;Wherein,
Judgment module for obtaining the transmission progress of target copy, and judges whether occur in target copy transmission process
Mistake;
First sending module, for being deposited from the equipment of main cluster in the case where the judging result of judgment module, which is, is
A copy is selected in the copy of the first data to be backed up other than the target copy of storage, by the second equipment by selected pair
Originally it is sent to data buffering device, wherein the second equipment are as follows: the equipment in main cluster where selected copy.
Optionally, above-mentioned apparatus further include:
Second sending module, for during target copy is sent to data buffering device, the progress of transmission to be sent out
It send to target device, wherein target device are as follows: in main cluster in addition to the first equipment, be stored with the copy of the first data to be backed up
Equipment.
Optionally, above-mentioned cache module, is specifically used for:
First data to be backed up are sent to data buffering device, so that data buffering device is cached in the form of fragment
First data to be backed up are simultaneously sent in backup cluster when meeting preset cache data and sending condition by the first data to be backed up
Equipment.
Optionally, above-mentioned apparatus further include:
Receiving module, for receiving and storing the second data to be backed up that equipment is sent in backup cluster.
The third aspect, the embodiment of the invention provides a kind of data backup systems, comprising: main cluster, data buffering device,
Backup cluster;Wherein,
The first equipment in main cluster, for determining the data to be backed up of locally stored first, by the first number to be backed up
According to being sent to data buffering device;
Data buffering device, for receiving and caching the first data to be backed up of the first equipment transmission, and it is default meeting
The equipment being sent to the first data to be backed up when data cached transmission condition in backup cluster;
Equipment in backup cluster, for receiving and storing the first data to be backed up of data buffering device transmission.
Optionally, in the case where at least two copy of the first data to be backed up is stored in the equipment of main cluster,
Above-mentioned first equipment, specifically for the selection target copy from the copy for the first data to be backed up being locally stored;
Target copy is sent to data buffering device;
Above-mentioned first equipment, is also used to obtain the transmission progress of target copy, and judge be in target copy transmission process
It is no mistake occur;If so, from the copy of the first data to be backed up other than the target copy stored in the equipment of main cluster
A copy is selected, selected copy is sent to by data buffering device by the second equipment, wherein above-mentioned second equipment
Are as follows: the equipment in main cluster where selected copy;
Above-mentioned second equipment, for selected copy to be sent to data buffering device;
Above-mentioned data buffering device is also used to receive and cache the first data to be backed up of the second equipment transmission.
Optionally, above-mentioned first equipment is also used to send out during target copy is sent to data buffering device
Feeding degree is sent to target device, wherein target device are as follows: in main cluster in addition to the first equipment, is stored with the first number to be backed up
According to copy equipment.
Optionally, above-mentioned second equipment is also used to according to transmission progress and the first data to be backed up being locally stored
Copy restores the data in target copy.
Optionally, above-mentioned data buffering device, specifically for caching the first data to be backed up in the form of fragment.
Optionally, above-mentioned first equipment is also used to receive and store the second number to be backed up that equipment is sent in backup cluster
According to.
Fourth aspect, the embodiment of the invention provides a kind of electronic equipment, including processor, communication interface, memory and
Communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes the step of above-mentioned any data backup method
Suddenly.
5th aspect, the embodiment of the invention provides a kind of computer readable storage medium, computer readable storage mediums
The step of being inside stored with computer program, above-mentioned any data backup method realized when computer program is executed by processor.
6th aspect, the embodiment of the invention provides a kind of computer program products comprising instruction, when it is in computer
When upper operation, so that computer executes the method and step of any of the above-described data back up method.
7th aspect, the embodiment of the invention provides a kind of computer programs, when run on a computer, make to succeed in one's scheme
Calculation machine executes the method and step of any of the above-described data back up method.
Data back up method, device, system, electronic equipment and computer-readable storage medium provided in an embodiment of the present invention
Matter, can be after the first equipment in the main cluster of data backup system determines the stored first data to be backed up, by first
Data to be backed up are sent to data buffering device, and the first data to be backed up are then sent to backup set by data buffering device
Equipment in group.This process is that the personnel's manual operation that do not need executed automatically can be by the first data backup to be backed up to standby
In the equipment of part cluster, solve the problems, such as that needing personnel to manually perform data backup in the prior art is easy to produce maloperation,
And the process of automated back-up saves the time difference caused by personnel's manual operation, the data for solving backup cluster and main cluster are real
The problem of when property difference.It is thereby achieved that data are backed up from main cluster to the automation of backup cluster, and it can be improved backup cluster
With the real-time property of main cluster.
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 the first flow diagram of data back up method provided in an embodiment of the present invention;
Fig. 2 is second of flow diagram of data back up method provided in an embodiment of the present invention;
Fig. 3 is the third flow diagram of data back up method provided in an embodiment of the present invention;
Fig. 4 is the 4th kind of flow diagram of data back up method provided in an embodiment of the present invention;
Fig. 5 is one embodiment of data-storage applications provided in an embodiment of the present invention;
Fig. 6 is the first structural schematic diagram of data backup device provided in an embodiment of the present invention;
Fig. 7 is second of structural schematic diagram of data backup device provided in an embodiment of the present invention;
Fig. 8 is the third structural schematic diagram of data backup device provided in an embodiment of the present invention;
Fig. 9 is the 4th kind of structural schematic diagram of data backup device provided in an embodiment of the present invention;
Figure 10 is the structural schematic diagram of data backup system provided in an embodiment of the present invention;
Figure 11 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention;
Figure 12 is the data backup flow chart in a specific embodiment provided in an embodiment of the present invention.
Specific embodiment
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.
To solve prior art problem, the embodiment of the invention provides a kind of data back up method, apparatus and system, below
It is described in detail.
It should be noted that a kind of executing subject of data back up method provided in an embodiment of the present invention can be standby for data
Part device, the first equipment being specifically as follows in the main cluster of data backup system, first equipment need to carry out data it is standby
Data back up method provided in an embodiment of the present invention is used when part, this is all reasonable.
Referring to Fig. 1, Fig. 1 is the first flow diagram of data back up method provided in an embodiment of the present invention, this method
Applied to the first equipment in the main cluster of data backup system, wherein data backup system includes: main cluster, data buffer storage
Equipment, backup cluster, the above method comprising steps of
S101 determines the data to be backed up of locally stored first.
It should be noted that including multiple equipment in main cluster, data friendship can be carried out between each equipment of main cluster
Mutually.
In the embodiment of the present invention, the first equipment in main cluster has determined first be locally stored data to be backed up, first
Data to be backed up are the data for needing to carry out data backup.Data to be backed up can be network log, network testing data, equipment
Installation system data etc., the type embodiment of the present invention of Backup Data is not specifically limited.Illustratively, first is to be backed up
Data are the data packet that network log is constituted.
First data to be backed up are sent to data buffering device by S102 so that data buffering device caching first to
First data to be backed up are simultaneously sent to the equipment in backup cluster when meeting preset cache data and sending condition by Backup Data.
It further include data buffering device in data backup system in the embodiment of the present invention, data buffering device is used to receive
And the first data to be backed up that the first equipment is sent are cached, and to be backed up by first when meeting preset cache data and sending condition
Data are sent to the equipment in backup cluster.
In practical application, above-mentioned data backup system can also only include main cluster and backup cluster, pass through main cluster
First data to be backed up are directly sent to the equipment in backup cluster by the first equipment, but for main cluster, one side
Face needs to transmit the first data to be backed up, on the other hand also to handle the business of itself, so if main cluster is in transmission first
Occurs data transmission error when data to be backed up, it will influence the first equipment in main cluster and the reception in backup cluster
The ability of equipment processing own service.In order to eliminate this influence, between the main cluster in the embodiment of the present invention and backup cluster
It is additionally provided with data buffering device, avoids to transmit because of data and break down, and leads to the first equipment and the backup in main cluster
The problem of equipment in cluster is affected.
Above-mentioned backup cluster can be HBase system, and HBase system is a distributed open source data towards column
Library is the NoSQL (database of non-relational) that one kind may operate in Hadoop (a kind of distributed system infrastructure)
Database, it is a distributed, expansible big data warehouse.HBase can utilize HDFS (Hadoop
Distributed File System, distributed file system) distributed treatment mode, itself be exactly very powerful
Database, can merge the ability of key/value (key/value) memory module bring real-time query, and pass through
MapReduce (a kind of programming model) carries out the ability of processed offline or batch processing, and HBase can allow user largely counting
It is recorded according to middle inquiry, and can therefrom obtain comprehensive analysis report.
In the embodiment of the present invention, data buffering device can be Kafka system, and Kafka system is a kind of high-throughput
Distributed post subscribes to message system, it can handle the everything flow data in the website of consumer's scale, the mesh of Kafka
Be on unified line and offline Message Processing, to be provided also for by cluster by the loaded in parallel mechanism of Hadoop
Consumption in real time.
Illustratively, Kafka system is delayed after the network log data packet that the first equipment for receiving main cluster is sent
It deposits, then judges whether that meeting preset cache data sends condition, if so, Kafka system sends the first data to be backed up
Equipment into backup cluster.It is understood that also including many equipment in backup cluster, Kafka system can be by first
Some equipment that data to be backed up are sent in backup cluster is also possible to multiple or even all devices, the embodiment of the present invention
It is not limited specifically herein.
It should be noted that data buffering device judges whether that meeting preset cache data sends condition, the preset cache
Data send condition and can be, and the data transmission capabilities between equipment in data buffering device and backup cluster, which reach default, to be wanted
It asks, is also possible to data buffering device self-condition and reaches another preset requirement, can also be receiving device in backup cluster
Reception ability reaches another preset requirement etc..
The data transmission capabilities between equipment in data buffering device and backup cluster are stronger, and data buffering device is to standby
During equipment in part cluster sends data, the data outage probability as caused by network problem will be smaller, data hair
Send successful probability higher.Data transmission capabilities in the embodiment of the present invention can be characterized with data transmission bauds, i.e., data are slow
When depositing the data transmission bauds between the equipment in equipment and backup cluster and reaching preset threshold, it just can be determined that satisfaction is default slow
Deposit data sends condition;For example, the preset threshold is 1M/s, that is, show only when data buffering device and setting in backup cluster
When data transmission bauds between standby is not less than 1M/s, data buffering device just can be determined that meeting preset cache data sends item
Part;Otherwise, it is determined that being unsatisfactory for preset cache data sends condition.
Data buffering device self-condition reaches another preset requirement, can be the current free memory of data buffering device
Reach preset threshold and/or cpu busy percentage not higher than another preset threshold, to avoid in data transmission procedure, since data are slow
There is the case where data send failure caused by situations such as delay machine or Caton in the load excessive for depositing equipment.Illustratively, have
Body, it can be set when the free memory of data buffering device is not less than 2GB and cpu busy percentage is not higher than 60%, determine full
Sufficient preset cache data send condition;For example, finding the free memory of data buffering device when data buffering device execution judges
For 3GB, and cpu busy percentage is 70%, since the cpu busy percentage of current data buffer memory device is higher than 60%, so data buffer storage
Equipment judgement is unsatisfactory for preset cache data and sends condition.
It is understood that sender and recipient as data, if a side goes wrong, this time data are passed
Contribute will fail, so data receiver can also be received to the ability of data before carrying out data transmission, send out as data
Whether the side of sending sends the judgment basis of data.In the embodiment of the present invention, the reception ability of the receiving device in backup cluster reaches
Another preset requirement can be in backup cluster for receiving the current free memory of the first data cached receiving device, bearing
Whether load, cpu busy percentage etc. reach preset requirement.
Illustratively, in backup cluster for receive the current free memory of the first data cached receiving device, load,
Whether cpu busy percentage reaches preset requirement, can be the current free memory of the receiving device not less than 2GB, load
No more than 60% and cpu busy percentage is not more than 70%.
It certainly, in practical applications, can be at least one of current free memory, load, cpu busy percentage come table
Levy the reception ability of the receiving device in backup cluster.Such as, when judging the current free memory of the receiving device not less than 3GB,
Directly determine that meeting preset cache data sends condition;For another example, when judging that the current free memory of the receiving device is not less than
When 3GB and current cpu busy percentage are not less than 65%, directly determine that meeting preset cache data sends condition.
In practical applications, data buffering device can only judge in above-mentioned three kinds of conditions any one whether reach pair
The requirement answered, if so, determining that meeting preset cache data sends condition;It is of course also possible to from above-mentioned three kinds of conditions with
Machine is arranged at least two conditions and is combined as decision condition, only meets respective requirement in selected condition all correspondences
In the case where, it just can determine that meeting preset cache data sends condition.
Illustratively, data buffering device only reaches in its data transmission capabilities between the equipment in backup cluster
Preset requirement, and in the case that its own condition reaches another preset requirement, just determine that meeting preset cache data sends condition.
Such as: data buffering device is only not less than 2M/s, and its in its data transmission bauds between the equipment in backup cluster
In the case that free memory is not less than 4GB, judgement meets preset cache data and sends condition, otherwise determines to be unsatisfactory for preset cache
Data send condition.
It should be noted that in embodiments of the present invention, data buffering device is the data relay in data backup system
It stands, if data buffering device breaks down, data buffering device can not receive the first equipment sends over first to standby
Part data, it is synchronous to be unable to complete data for data backup system at this time.In order to avoid herein the problem of, as the embodiment of the present invention
A kind of optional implementation is provided at least two data buffering devices, each data buffering device in data backup system
It is present in data backup system with master slave mode, and by data buffering device and main cluster, standby in main service state
Equipment in part cluster carries out data interaction.
When the data buffering device for being currently at main service state breaks down, in the data buffer storage from service state
Equipment is switched to the new data buffering device in main service state, and is counted with the equipment in main cluster and backup cluster
According to interaction.The new data buffering device in main service state is switched to from the data buffering device of service state for being in
Specific implementation, those skilled in the art are referred to the prior art, and the embodiment of the present invention is no longer discussed in detail herein.
Illustratively, be currently at main service state data buffering device A receive the first equipment transmission first to
After Backup Data, the first data to be backed up can be synchronized to the data buffering device B for being currently at main service state, then,
Before the data to be backed up of device forwards first of the data buffering device A into backup cluster, data buffering device A breaks down.This
When, the service state switching of data buffering device B is main service state, and the device forwards first into backup cluster are to be backed up
Data.
It, can be in the first equipment in the main cluster of data backup system really using present invention embodiment shown in FIG. 1
After fixed stored first data to be backed up, the first data to be backed up are sent to data buffering device, it is then slow by data
Deposit the equipment that the first data to be backed up are sent in backup cluster by equipment.This process be execute automatically do not need personnel's hand
Dynamic operation can solve by the equipment of the first data backup to be backed up to backup cluster and need personnel manual in the prior art
The problem of data backup is easy to produce maloperation is executed, and the process of automated back-up saves the time caused by personnel's manual operation
Difference solves the problems, such as that the real-time property of backup cluster and main cluster is poor.It is thereby achieved that data are from main cluster to backup
The automation of cluster is backed up, and can be improved the real-time property of backup cluster and main cluster.
It should be noted that data backup scenario provided in an embodiment of the present invention is a kind of hot reserve scheme, the present invention is implemented
The data that example is not only provided under unusual condition return fishing, also provide online service ability.Hot standby advantage: the reading on line can be provided
Write capability keeps redundancy to support business, the high availability of supporting business;The real-time of backup is high, and be able to maintain main cluster with
And the consistency of backup cluster.That is, theoretically data can with 100% carry out back fishing give for change.Existing business is on-line system, to be protected
The availability of 99.99% or more card.Loss of data for any situation, it is all unacceptable.
Existing hot reserve scheme can be divided into three kinds: weak consistency, such case be strongly to consistency, but
Do not guarantee;Final consistency, the situation are more demanding to data, it is necessary to assure data are complete, reliable, it is ensured that occur
Give data when abnormal for change, and the availability of main cluster is unaffected;It is final consistent, it is ensured that data are complete, and not
Data are lost, are occurred abnormal, it is ensured that give data, but principal and subordinate's cluster backup for change when occurring abnormal, will affect the write-in of cluster
Class availability.Data back up method provided in an embodiment of the present invention belongs to finally unanimously, and for business to loss of data zero
The considerations of tolerance, business support High Availabitity, select hot standby final consistency scheme.
It should be noted that main cluster can be KTS system, wherein KTS is a kind of NoSQL database clothes of complete trustship
Business, provides magnanimity structuring and the storage of semi-structured data and real time access, KTS organizes organization data in the form of a table, pass through number
Meet handling capacity and storage demand according to fragment and load-balancing technique, while keeping uniform high-performance.HBase with
KTS is different, HBase be erected at HDFS (Hadoop Distributed File System, distributed file system, referred to as:
HDFS on), its consistency problem hands HDFS completely, and the data of itself synchronize no difficulty and complexity.KTS is needed
It wants oneself to manage copy consistency problem, high more of complexity;KTS backed up in synchronization belongs to different Source backups to HBase, with
The backup of HBase to HBase is different.And this mode, the probability for availability issue theoretically occur are much greater.The present invention
The influence to availability can be solved perfectly in the scheme that embodiment provides.
Referring to fig. 2, Fig. 2 is second of flow diagram of data back up method provided in an embodiment of the present invention, in main collection
In the case where at least two copies for being stored with the first data to be backed up in the equipment of group, S102 can be S102A, deposit from local
Selection target copy in the copy of first data to be backed up of storage, is sent to data buffering device for target copy.
It should be noted that at least two copies of the first data to be backed up can also be stored in equipment in main cluster,
It is understood that the data of two copies are identical.Specifically, at least two copies can store on one device,
Also it can store on different devices.In the embodiment of the present invention, at least two copies are respectively stored in different equipment,
In this way when the one of equipment for being stored with the copy breaks down, the copy being stored in other equipment can also be normal
It uses, realizes High Availabitity.
In the embodiment of the present invention, the first equipment in main cluster selected from least two copies one as target pair
This, specific selection mode can be any selection, or presetting the copy in one of equipment is target pair
This, the embodiment of the present invention is not specifically limited herein.Then target copy is sent to data and delayed by the first equipment in main cluster
Deposit equipment.
Correspondingly, on the basis of embodiment shown in Fig. 1, the above method may include:
S103, obtains the transmission progress of target copy, and judges whether mistake occur in target copy transmission process.
It is understood that the first equipment in main cluster can get number in real time during data are sent
According to transmission progress, specifically, can by java using data return value obtain data transmission progress, obtain data send
The specific implementation of progress is the prior art, and the embodiment of the present invention does not repeat it herein.In the process of data transmission
In, the first equipment can be observed in real time whether data transmission procedure will appear mistake, it is to be understood that if data are transmitted out
Existing mistake, then this time data transmission will lose the meaning of backup, so executing following steps if there is data transmission fault
Rapid S104, otherwise continues to execute data transmission procedure.
It breaks down it is understood that the reason of data transmission fault can be transmission device itself, is also possible to connect
Debit is broken down or listener-in occurs in transmission channel, specifically, can according to the file sizes of data and cryptographic Hash into
Row judges whether data transmission fault occur, and illustratively, data transmission, which can be segmented, to be transmitted, for each section of data
One cryptographic Hash and file size are set, the cryptographic Hash of the segment data and file size are first sent to data receiver, in number
The cryptographic Hash that the segment data is judged after the segment data and file size and the segment data that receives have been received according to recipient
Whether cryptographic Hash and file size are identical, if identical, data transmission procedure does not occur mistake;Otherwise, it is considered as data transmission
Mistake, data can be transmitted whether Cuo Wu information feeds back to the first equipment by data receiver.Specifically, can also use
Other modes are judged that the embodiment of the present invention is not specifically limited.
If the judging result of above-mentioned steps S103 is yes, execution step S104, the mesh stored from the equipment of main cluster
It marks and selects a copy in the copy of the first data to be backed up other than copy, sent selected copy by the second equipment
To data buffering device, wherein the second equipment are as follows: the equipment in main cluster where selected copy.
It is understood that other copies other than target copy are also stored in other equipment in main cluster, that
A copy can be selected from other copies, and is the second equipment by device definition where the copy selected, then
Selected copy is sent to data buffering device by the second equipment.Illustratively, it is stored in the first equipment of main cluster
There are the copy A of network log data packet, the copy B for being stored in the second equipment network log data packet, deposit in third equipment
The copy C for containing network log data packet sends copy A when the error occurs in the first equipment, copy B is selected to send as data
Copy copy B is sent to data buffering device then by the second equipment where copy B.
Therefore, using present invention embodiment shown in Fig. 2, the case where target copy is sent to data buffering device failure
Under, other copies can also be sent by the second equipment in main cluster to data buffering device, it can with improve data backup
By property.
Referring to Fig. 3, Fig. 3 is the third flow diagram of data back up method provided in an embodiment of the present invention, in Fig. 2 institute
On the basis of showing embodiment, above-mentioned data back up method can with the following steps are included:
Transmission progress is sent to target device during target copy is sent to data buffering device by S105,
Wherein, target device are as follows: in main cluster in addition to the first equipment, the equipment that is stored with the copy of the first data to be backed up.
It, can when target copy is sent to data buffering device by the first equipment in main cluster in the embodiment of the present invention
The transmission progress of data is obtained in real time, and transmission progress is sent to the target device where other copies.
It is understood that in S104, when the first equipment sends the error in data of target copy, the second equipment is by institute
The copy of selection is sent to data buffering device, specifically, the second equipment can also receive the transmission progress of target copy, the
Two equipment send selected copy to data buffering device according to the progress of transmission.Illustratively, the first equipment sends target pair
This transmission progress is 60%, and the first equipment sends transmission progress 60% to second equipment.First stored in second equipment
The copy of data to be backed up is copy B, and in S104, when other copies selected are copy B, and copy B is stored in second and sets
It is standby upper, then the data that the second equipment can continue to send on copy B according to current 60% transmission progress are set to data buffer storage
It is standby.
Using present invention embodiment shown in Fig. 3, the copy place that is sent in addition to target copy by that will send progress
Equipment, be conducive to the first equipment transmission data failure in the case where, by the equipment where other copies according to send into
Degree continues data transmission, while ensureing data transmission credibility, additionally it is possible to the efficiency of improve data transfer.
In the embodiment of the present invention, data buffering device caches the first data to be backed up in the form of fragment.The data of user
Global storage can be stored at a table, the data of each table with one or more fragments.Data base in data buffering device
Our unit is a fragment, i.e. tablet, a fragment is using more copy redundancies guarantee reliability.A copy of Tablet,
It can be stored on some storage rear end, three copies specifically can be set, according to machine, rack, interchanger, computer room etc.
Strategy carries out safety and places on different devices, and three copies of specific fragment are primary copies two from copy (major-minor
Originally can be target copy, can be other copies from copy), and pass through the data consistency of raft agreement three copies of guarantee
Problem.
Referring to fig. 4, Fig. 4 is the 4th kind of flow diagram of data back up method provided in an embodiment of the present invention, in Fig. 1 institute
On the basis of showing embodiment, increase step S106.
S106 receives and stores the second data to be backed up that equipment is sent in backup cluster.
It should be noted that data backup is usually sometimes to break down in main cluster from main cluster to backup cluster
When, backup cluster becomes new main cluster, and new data can be stored in new main cluster in system, in original main cluster
After restoring failure, original main cluster is used as new main cluster again, then above-mentioned new data are stored in original backup set
In group, need for the new data to be synchronized in original main cluster from original backup cluster.Specifically, in backup cluster
Data be the second data to be backed up, the second data to be backed up can be sent to the in main cluster by the equipment in backup cluster
One equipment.
Illustratively, network log needs real-time storage, and when main cluster breaks down, network log is stored in
In the equipment of backup cluster, which can be sent to network log main cluster by receiving user's request or timing
First equipment can also be sent to master by data buffering device specifically, the first equipment in main cluster can be sent directly to
First equipment in cluster.
Using present invention embodiment shown in Fig. 4, can when the equipment in main cluster breaks down, in main cluster the
One equipment carries out mending fishing data from the equipment of backup cluster, to realize first equipment of the data in main cluster and backup cluster
Data in middle equipment are synchronous.
Data buffering device in the embodiment of the present invention stores the first data to be backed up in the form of fragment, then can be
First equipment of main cluster and the progress data storage in the form of fragment in the receiving device of backup cluster, and data are deposited
The region of storage is identical.Illustratively, as shown in figure 5, in the first equipment of main cluster, the storage region of the first data to be backed up
Be it is N number of, be respectively as follows: fragment region 1~fragment region N;First equipment by the first data to be backed up be sent in kafka system with
Afterwards, kafka distributes data cache region and carries out the corresponding data content of the data to be backed up of storage first, is specifically as follows fragment area
Domain 1 to fragment region a, it is to be understood that fragment region 1 and kafka system according to the rule of fragment data, in the first equipment
The data that fragment region 1 in system stores are identical, and the fragment region 2 in fragment region 2 and kafka system in the first equipment is deposited
The data of storage are identical, until the fragment region N in the first equipment is identical as the data of fragment region a storage in kafka system,
All data contents of first data to be backed up, which receive and store, to be finished.Equally, data to be backed up for first are from kafka system
Receiving device in the equipment being transmitted in backup cluster i.e. Hbase system is also the fragment region 1 in this way, in kafka system
It is identical as the data that the storage region 1 in HBase system receiving device stores, fragment region 2 and HBase in kafka system
The data that storage region 2 in system receiving device stores are identical, until fragment region a and HBase system in kafka system
The data of storage region n storage in receiving device are identical, and data backup finishes.
Corresponding to embodiment of the method shown in Fig. 1, the embodiment of the invention also provides a kind of data backup device, which is answered
For the first equipment in the main cluster of data backup system, wherein data backup system includes: that main cluster, data buffer storage are set
Standby, backup cluster, as shown in fig. 6, above-mentioned apparatus includes:
Determining module 601, for determining the data to be backed up of locally stored first;
Cache module 602, for the first data to be backed up to be sent to data buffering device, so that data buffering device
It caches the first data to be backed up and the first data to be backed up is sent to backup set when meeting preset cache data and sending condition
Equipment in group.
It, can be in the first equipment in the main cluster of data backup system really using present invention embodiment shown in fig. 6
After fixed stored first data to be backed up, the first data to be backed up are sent to data buffering device, it is then slow by data
Deposit the equipment that the first data to be backed up are sent in backup cluster by equipment.This process be execute automatically do not need personnel's hand
Dynamic operation can solve by the equipment of the first data backup to be backed up to backup cluster and need personnel manual in the prior art
The problem of data backup is easy to produce maloperation is executed, and the process of automated back-up saves the time caused by personnel's manual operation
Difference solves the problems, such as that the real-time property of backup cluster and main cluster is poor.It is thereby achieved that data are from main cluster to backup
The automation of cluster is backed up, and can be improved the real-time property of backup cluster and main cluster.
Corresponding to embodiment of the method shown in Fig. 1, referring to Fig. 7, on the basis of embodiment shown in Fig. 6, specifically, above-mentioned slow
Storing module 602 can be specifically used for: the selection target copy from the copy for the first data to be backed up being locally stored;By target
Copy is sent to data buffering device.
Correspondingly, above-mentioned apparatus can also include:
Judgment module 603 for obtaining the transmission progress of target copy, and judges whether go out in target copy transmission process
Existing mistake;
First sending module 604, for the judging result of judgment module be in the case where, from the equipment of main cluster
A copy is selected in the copy of the first data to be backed up other than the target copy of storage, it will be selected by the second equipment
Copy is sent to data buffering device, wherein the second equipment are as follows: the equipment in main cluster where selected copy.
Using present invention embodiment shown in Fig. 7, in the case where target copy is sent to data buffering device failure, also
Other copies can be sent by the second equipment in main cluster to data buffering device, to improve the reliability of data backup.
Corresponding to embodiment of the method shown in Fig. 3, on the basis of the embodiment shown in fig. 7, as shown in figure 8, above-mentioned apparatus is also
May include:
Second sending module 605, for progress will to be sent during target copy is sent to data buffering device
It is sent to target device, wherein target device are as follows: in main cluster in addition to the first equipment, be stored with the pair of the first data to be backed up
This equipment.
Specifically, above-mentioned cache module 602, can be specifically used for:
First data to be backed up are sent to data buffering device, so that data buffering device is cached in the form of fragment
First data to be backed up are simultaneously sent in backup cluster when meeting preset cache data and sending condition by the first data to be backed up
Equipment.
Using present invention embodiment shown in Fig. 8, the copy place that is sent in addition to target copy by that will send progress
Equipment, be conducive to the first equipment transmission data failure in the case where, by the equipment where other copies according to send into
Degree continues data transmission, while ensureing data transmission credibility, additionally it is possible to the efficiency of improve data transfer.
Corresponding to embodiment of the method shown in Fig. 4, on the basis of embodiment shown in Fig. 8, as shown in figure 9, above-mentioned apparatus is also
May include;
Receiving module 606, for receiving and storing the second data to be backed up that equipment is sent in backup cluster.
Using present invention embodiment shown in Fig. 9, can when the equipment in main cluster breaks down, in main cluster the
One equipment carries out mending fishing data from the equipment of backup cluster, to realize first equipment of the data in main cluster and backup cluster
Data in middle equipment are synchronous.
Corresponding to embodiment of the method shown in Fig. 1, the embodiment of the invention also provides a kind of data backup systems, such as Figure 10 institute
Show, which includes: main cluster 1001, data buffering device 1002, backup cluster 1003;
The first equipment in main cluster 1001, for determining the data to be backed up of locally stored first, by first to standby
Part data are sent to data buffering device 1002;
Data buffering device 1002 for receiving and caching the first data to be backed up of the first equipment transmission, and is meeting
First data to be backed up are sent to the equipment in backup cluster 1003 by preset cache data when sending condition;
Equipment in backup cluster 1003, for receiving and storing the first number to be backed up of the transmission of data buffering device 1002
According to.
Corresponding to embodiment of the method shown in Fig. 2, specifically, being stored with the first number to be backed up in the equipment of main cluster 1001
According at least two copies in the case where,
Above-mentioned first equipment can be specifically used for the selection target pair from the copy for the first data to be backed up being locally stored
This;Target copy is sent to data buffering device 1002;
Above-mentioned first equipment, is also used to obtain the transmission progress of target copy, and judge be in target copy transmission process
It is no mistake occur;If so, from the pair of the first data to be backed up other than the target copy stored in the equipment of main cluster 1001
A copy is selected in this, selected copy is sent to by data buffering device 1002 by the second equipment, wherein second sets
It is standby are as follows: 1001 equipment in the main cluster where selected copy;
Above-mentioned second equipment, for selected copy to be sent to data buffering device 1002;
Above-mentioned data buffering device 1002 is also used to receive and cache the first data to be backed up of the second equipment transmission.
Corresponding to embodiment of the method shown in Fig. 3, specifically, above-mentioned first equipment, can be also used for sending out by target copy
During sending to data buffering device 1002, transmission progress is sent to target device, wherein target device are as follows: main cluster
In 1001 in addition to the first equipment, the equipment that is stored with the copy of the first data to be backed up.
Specifically, above-mentioned second equipment, can be also used for according to transmission progress and the first number to be backed up being locally stored
According to copy, the data in target copy are restored.
Specifically, data buffering device 1002, can be specifically used for caching the first data to be backed up in the form of fragment.
Corresponding to embodiment of the method shown in Fig. 4, specifically, above-mentioned first equipment, can be also used for receiving and storing backup
The second data to be backed up that equipment is sent in cluster.
It, can be in the first equipment in the main cluster of data backup system really using present invention embodiment shown in Fig. 10
After fixed stored first data to be backed up, the first data to be backed up are sent to data buffering device, it is then slow by data
Deposit the equipment that the first data to be backed up are sent in backup cluster by equipment.This process be execute automatically do not need personnel's hand
Dynamic operation can solve by the equipment of the first data backup to be backed up to backup cluster and need personnel manual in the prior art
The problem of data backup is easy to produce maloperation is executed, and the process of automated back-up saves the time caused by personnel's manual operation
Difference solves the problems, such as that the real-time property of backup cluster and main cluster is poor.It is thereby achieved that data are from main cluster to backup
The automation of cluster is backed up, and can be improved the real-time property of backup cluster and main cluster.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 11, including processor 1110 and memory
1120, wherein
Memory 1120, for storing computer program;
Processor 1110 when for executing the program stored on memory 1120, realizes following steps:
Determine the data to be backed up of locally stored first;
First data to be backed up are sent to data buffering device, so that data buffering device caches the first number to be backed up
First data to be backed up are sent to equipment in backup cluster according to and meeting when preset cache data send condition.
Specific implementation and relevant explanation content about each step of this method may refer to shown in above-mentioned Fig. 1~4
Embodiment of the method, this will not be repeated here.
Above-mentioned electronic equipment can have the communication interface realized and communicated between above-mentioned electronic equipment and other equipment.
Above-mentioned processor 1110, communication interface, memory 1120 complete mutual communication by communication bus, herein
The communication bus being previously mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI)
Bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..It should
Communication bus can be divided into address bus, data/address bus, control bus etc..
Memory 1120 may include random access memory (Random Access Memory, RAM), also may include
Nonvolatile memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory
It can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor 1110 can be general processor, including central processing unit (Central Processing
Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital
Signal Processing, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components.
It, can be in the first equipment in the main cluster of data backup system really using embodiment shown in Figure 11 of the present invention
After fixed stored first data to be backed up, the first data to be backed up are sent to data buffering device, it is then slow by data
Deposit the equipment that the first data to be backed up are sent in backup cluster by equipment.This process be execute automatically do not need personnel's hand
Dynamic operation can solve by the equipment of the first data backup to be backed up to backup cluster and need personnel manual in the prior art
The problem of data backup is easy to produce maloperation is executed, and the process of automated back-up saves the time caused by personnel's manual operation
Difference solves the problems, such as that the real-time property of backup cluster and main cluster is poor.It is thereby achieved that data are from main cluster to backup
The automation of cluster is backed up, and can be improved the real-time property of backup cluster and main cluster.
The embodiment of the invention also provides a kind of computer readable storage medium, it is stored in computer readable storage medium
Computer program realizes any data backup method provided in an embodiment of the present invention when computer program is executed by processor.
Using scheme provided in this embodiment, can be determined in the first equipment in the main cluster of data backup system
After first data to be backed up of storage, the first data to be backed up are sent to data buffering device, are then set by data buffer storage
The standby equipment being sent to the first data to be backed up in backup cluster.This process is that the personnel that do not need executed automatically grasp manually
Make to solve by the equipment of the first data backup to be backed up to backup cluster and need personnel to manually perform in the prior art
Data backup is easy to produce the problem of maloperation, and the process of automated back-up saves the time difference caused by personnel's manual operation,
Solve the problems, such as that the real-time property of backup cluster and main cluster is poor.It is thereby achieved that data are from main cluster to backup set
The automation backup of group, and can be improved the real-time property of backup cluster and main cluster.
In an embodiment provided by the invention, additionally provide a kind of computer program product comprising instruction, when its
When being run on computer, so that computer executes the method and step of any of the above-described data back up method.
Using scheme provided in this embodiment, can be determined in the first equipment in the main cluster of data backup system
After first data to be backed up of storage, the first data to be backed up are sent to data buffering device, are then set by data buffer storage
The standby equipment being sent to the first data to be backed up in backup cluster.This process is that the personnel that do not need executed automatically grasp manually
Make to solve by the equipment of the first data backup to be backed up to backup cluster and need personnel to manually perform in the prior art
Data backup is easy to produce the problem of maloperation, and the process of automated back-up saves the time difference caused by personnel's manual operation,
Solve the problems, such as that the real-time property of backup cluster and main cluster is poor.It is thereby achieved that data are from main cluster to backup set
The automation backup of group, and can be improved the real-time property of backup cluster and main cluster.
In an embodiment provided by the invention, a kind of computer program is additionally provided, when run on a computer,
So that computer executes the method and step of any of the above-described data back up method.
Using scheme provided in this embodiment, can be determined in the first equipment in the main cluster of data backup system
After first data to be backed up of storage, the first data to be backed up are sent to data buffering device, are then set by data buffer storage
The standby equipment being sent to the first data to be backed up in backup cluster.This process is that the personnel that do not need executed automatically grasp manually
Make to solve by the equipment of the first data backup to be backed up to backup cluster and need personnel to manually perform in the prior art
Data backup is easy to produce the problem of maloperation, and the process of automated back-up saves the time difference caused by personnel's manual operation,
Solve the problems, such as that the real-time property of backup cluster and main cluster is poor.It is thereby achieved that data are from main cluster to backup set
The automation backup of group, and can be improved the real-time property of backup cluster and main cluster.
Data back up method provided in an embodiment of the present invention is illustrated with a specific embodiment below.
Data backup process as shown in figure 12, wherein fragment tablet1~tabletm is KTS system, and KTS system is
Main cluster, each tablet include one main two from three copy replica, and the consistency problem of three copies is by raft agreement
(a kind of consistency protocol) is come what is guaranteed.The basic ideas of this specific embodiment are: being extended to raft agreement, i.e., each
The primary copy of all tablet for the table for needing to synchronize opens the write-in downstream for being synchronized to backup cluster, the write-in downstream
For the transfer Kafka selected from Kafka Cluster (cluster), then disappeared by another consumption program consumer
Expense data are written to backup cluster Hbase Cluster (cluster).
Three systems, two programs involved in this specific embodiment and two tools, specifically: KTS system stores mould
The tablet server program of block, as in producer producer forwarding data to transfer Kafka Cluster;Kafka system
System, the distributed information publication of open source and ordering system, are the transfer scratch systems of data backup;Hbase system, apache are opened
Nosql (database of the non-relational) storage system in source, for the destination for consuming program consumer, i.e. backup cluster;Therefore
Data reparation when barrier returns fishing data from backup cluster and refills main cluster, from main cluster complement evidence to backup cluster.
The basic procedure of this specific embodiment is as shown in figure 12, specifically:
1, write-in class data flow reaches the primary copy of tablet, and primary copy is forwarded to two, and from copy, this is raft agreement,
It is not described in detail;
2, after being written successfully, after state machine of the primary copy data apply oneself, the kafka for being forwarded to configuration is executed
Cluster, this is extension of this programme to raft agreement;
3, the memory module of KTS system opens a thread pool with processing forward data, with a kind of librdkafka (open source
Kafka client) establish producer producer and write data to Kafka cluster;
4, on the Part that Producer forwards data to correspond to Topic into Kafka cluster, forwarding is updated after forwarding successfully
The progress of kafka;
5, subsequent AppendEntries request forwards kafka progress msg to all from copy, also so as to master-slave swap
When, it can continue to forward, do not lose data;
6, another independently consumes program consumer, is established with the kafka client of java, from
Data are read in kafka, are written to Hbase cluster with the client of Hbase.
In this process, need to specialize some main points: 1, successfully label is that kafka is written successfully for forwarding, this
After a little information updates, confirmation is written with kakfa;2, kafka progress msg is forwarded, it would theoretically be possible to have and a little lag, in this way
When master-slave swap, several datas that actual conditions may forward last sheet forward one time again, and there is no problem for this point, because
Each copy state machine is consistent, i.e. data write sequence is completely the same, and the write-in of same data is idempotent operation;3, increase
After adding forwarding kafka logic, the process original to KTS system makes some difference, such as: the recover operation of fragment is also wanted
This progress of recover, this is the slightly change of KTS recover process, and fission process will also consider what kafka was forwarded to
Wal (Write-Ahead Logging, write-ahead log system) progress;4, change is made when deleting wal log to need to delete min
(min is kafka progress, i.e. original raft thinks that successful serial number seqno is written).
It ensure that the real-time and reliability of data forwarding from system level by above scheme, while not influencing to have
The availability of cluster, can supporting business reach 99.99% or more availability, realize and the correctness of storing data verified
With the reparation of damage data.In practical applications, it can also be write in main cluster and the progress pair of backup cluster, record all updates
Generic operation can pass through CAS from all write-in key of record in this way when carrying out correctness verification and damaging the reparation of data
(check and swap is checked and exchanged) is compared and verifies, according to check results come polishing data.
This specific embodiment, under any situation, main cluster, backup company-data can guarantee final consistency, data
It is complete;The literacy on line is provided using backup cluster, the high availability of supporting business is changeable when failure, in master
When clustering fault, it can be switched to backup cluster in line service, the data of backup cluster are written during switching, it can be by asynchronous
Mode covers main cluster;When backup clustering fault, in backup cluster recovery, guarantee within the scope of certain time (such as 6 hours
It is interior) partial data that main cluster does not synchronize, backup cluster can be given by storage system itself automatic synchronization.If failure exceeds one
It fixes time range, guarantee can be given for change by asynchronous system, and data fill into backup cluster, while reducing the reading pressure of system,
Reduction business complexity and O&M difficulty additionally provide traffic failure prediction scheme and execute tool, improve working efficiency.
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,
For equipment, computer readable storage medium embodiment for embodiment, since it is substantially similar to the method embodiment, so retouching
That states is fairly simple, and the relevent part can refer to the partial explaination of embodiments of method.
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 (18)
1. a kind of data back up method, which is characterized in that applied to the first equipment in the main cluster of data backup system,
In, the data backup system includes: main cluster, data buffering device, backup cluster, the method includes the steps:
Determine the data to be backed up of locally stored first;
Described first data to be backed up are sent to the data buffering device, so that described in data buffering device caching
Described first data to be backed up are simultaneously sent to described standby by the first data to be backed up when meeting preset cache data and sending condition
Equipment in part cluster.
2. the method according to claim 1, wherein be stored in the equipment of the main cluster described first to
In the case where at least two copies of Backup Data,
It is described that described first data to be backed up are sent to the data buffering device, comprising:
The selection target copy from the copy for the described first data to be backed up being locally stored;
The target copy is sent to the data buffering device;
The method also includes:
The transmission progress of the target copy is obtained, and judges whether mistake occur in the target copy transmission process;
If so, from the pair of the described first data to be backed up other than the target copy stored in the equipment of the main cluster
A copy is selected in this, selected copy is sent to by the data buffering device by the second equipment, wherein described the
Two equipment are as follows: the equipment in the main cluster where selected copy.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
During the target copy is sent to the data buffering device, the transmission progress is sent to target and is set
It is standby, wherein the target device are as follows: in the main cluster in addition to first equipment, to be stored with the described first data to be backed up
Copy equipment.
4. method according to any one of claim 1-3, which is characterized in that data buffering device caching described the
One data to be backed up, comprising:
The data buffering device caches the described first data to be backed up in the form of fragment.
5. method according to any one of claim 1-3, which is characterized in that the method also includes:
Receive and store the second data to be backed up that equipment is sent in the backup cluster.
6. a kind of data backup device, which is characterized in that applied to the first equipment in the main cluster of data backup system,
In, the data backup system includes: main cluster, data buffering device, backup cluster, and described device includes:
Determining module, for determining the data to be backed up of locally stored first;
Cache module, for the described first data to be backed up to be sent to the data buffering device, so that the data are slow
It deposits equipment and caches first data to be backed up and when meeting preset cache data and sending condition by the described first number to be backed up
Equipment according to being sent in the backup cluster.
7. device according to claim 6, which is characterized in that the cache module is specifically used for:
In the case where being stored at least two copy of the described first data to be backed up in the equipment of the main cluster, from local
Selection target copy in the copy of described first data to be backed up of storage;The target copy is sent to the data buffer storage
Equipment;
Described device further include: judgment module, the first sending module;Wherein,
The judgment module for obtaining the transmission progress of the target copy, and judges in the target copy transmission process
Whether mistake is occurred;
First sending module, for the judging result of the judgment module be in the case where, from the main cluster
A copy is selected in the copy of the described first data to be backed up other than the target copy stored in equipment, passes through second
Selected copy is sent to the data buffering device by equipment, wherein second equipment are as follows: where selected copy
The main cluster in equipment.
8. device according to claim 7, which is characterized in that described device further include:
Second sending module, for during the target copy is sent to the data buffering device, by the hair
Feeding degree is sent to target device, wherein the target device are as follows: in the main cluster in addition to first equipment, is stored with
The equipment of the copy of first data to be backed up.
9. device a method according to any one of claims 6-8, which is characterized in that the cache module is specifically used for:
Described first data to be backed up are sent to the data buffering device, so that the data buffering device is with fragment
Form caches first data to be backed up and when meeting preset cache data and sending condition by the described first data to be backed up
The equipment being sent in the backup cluster.
10. device a method according to any one of claims 6-8, which is characterized in that described device further include:
Receiving module, for receiving and storing the second data to be backed up that equipment is sent in the backup cluster.
11. a kind of data backup system characterized by comprising main cluster, data buffering device, backup cluster;
The first equipment in the main cluster, for determining the data to be backed up of locally stored first, by described first to standby
Part data are sent to the data buffering device;
The data buffering device, the described first data to be backed up sent for receiving and caching first equipment, and
Meet the equipment the described first data to be backed up being sent to when preset cache data send condition in the backup cluster;
Equipment in the backup cluster, the described first number to be backed up sent for receiving and storing the data buffering device
According to.
12. system according to claim 11, which is characterized in that be stored with described first in the equipment of the main cluster
In the case where at least two copies of data to be backed up,
First equipment, specifically for the selection target copy from the copy for the described first data to be backed up being locally stored;
The target copy is sent to the data buffering device;
First equipment, is also used to obtain the transmission progress of the target copy, and judges the target copy transmission process
In whether there is mistake;If so, from described first other than the target copy stored in the equipment of the main cluster to
A copy is selected in the copy of Backup Data, and selected copy is sent to by the data buffer storage by the second equipment and is set
It is standby, wherein second equipment are as follows: the equipment in the main cluster where selected copy;
Second equipment, for selected copy to be sent to the data buffering device;
The data buffering device is also used to receive and cache the described first data to be backed up that second equipment is sent.
13. system according to claim 12, which is characterized in that
First equipment is also used to during the target copy is sent to the data buffering device, will be described
Transmission progress is sent to target device, wherein the target device are as follows: in the main cluster in addition to first equipment, storage
There is the equipment of the copy of the described first data to be backed up.
14. system according to claim 13, which is characterized in that
Second equipment is also used to the pair according to the transmission progress and the described first data to be backed up being locally stored
This, restores the data in the target copy.
15. system described in any one of 1-14 according to claim 1, which is characterized in that
The data buffering device, specifically for caching first data to be backed up in the form of fragment.
16. system described in any one of 1-14 according to claim 1, which is characterized in that
First equipment is also used to receive and store the second data to be backed up that equipment is sent in the backup cluster.
17. a kind of electronic equipment, which is characterized in that including processor and memory, wherein;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-5.
18. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-5 any method and step when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710706787.7A CN109408280A (en) | 2017-08-17 | 2017-08-17 | Data back up method, apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710706787.7A CN109408280A (en) | 2017-08-17 | 2017-08-17 | Data back up method, apparatus and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109408280A true CN109408280A (en) | 2019-03-01 |
Family
ID=65454917
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710706787.7A Pending CN109408280A (en) | 2017-08-17 | 2017-08-17 | Data back up method, apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109408280A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110515769A (en) * | 2019-08-15 | 2019-11-29 | 苏州浪潮智能科技有限公司 | A kind of backup processing method, device and electronic equipment and readable storage medium storing program for executing |
CN111130896A (en) * | 2019-12-29 | 2020-05-08 | 北京浪潮数据技术有限公司 | NFS fault switching method and system and dual-control storage system |
CN111708763A (en) * | 2020-06-18 | 2020-09-25 | 北京金山云网络技术有限公司 | Data migration method and device of fragment cluster and fragment cluster system |
CN111949637A (en) * | 2020-08-18 | 2020-11-17 | 上海七牛信息技术有限公司 | Log data processing method, device and system, electronic equipment and storage medium |
WO2021036330A1 (en) * | 2019-08-28 | 2021-03-04 | 华为技术有限公司 | Backup processing method and server |
CN112652087A (en) * | 2020-12-23 | 2021-04-13 | 深圳中集天达空港设备有限公司 | Processing method of boarding bridge use record and related equipment |
CN113722154A (en) * | 2021-09-03 | 2021-11-30 | 咪咕音乐有限公司 | Data management method and system, monitoring server and storage medium |
CN115202588A (en) * | 2022-09-14 | 2022-10-18 | 云和恩墨(北京)信息技术有限公司 | Data storage method and device and data recovery method and device |
WO2023019953A1 (en) * | 2021-08-16 | 2023-02-23 | 中兴通讯股份有限公司 | Data synchronization method and system, server, and storage medium |
CN117370078A (en) * | 2023-10-31 | 2024-01-09 | 广州鼎甲计算机科技有限公司 | Database backup management method, device, computer equipment and storage medium |
CN117370078B (en) * | 2023-10-31 | 2024-05-28 | 广州鼎甲计算机科技有限公司 | Database backup management method, device, computer equipment and storage medium |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100005124A1 (en) * | 2006-12-07 | 2010-01-07 | Robert Edward Wagner | Automated method for identifying and repairing logical data discrepancies between database replicas in a database cluster |
CN101834904A (en) * | 2010-05-14 | 2010-09-15 | 杭州华三通信技术有限公司 | Method and equipment for database backup |
CN102857577A (en) * | 2012-09-24 | 2013-01-02 | 北京联创信安科技有限公司 | System and method for automatic load balancing of cluster storage |
CN102867035A (en) * | 2012-08-28 | 2013-01-09 | 浪潮(北京)电子信息产业有限公司 | High-availability method and device of distributed document system cluster |
CN103647622A (en) * | 2013-12-05 | 2014-03-19 | 北京奇虎科技有限公司 | Method, apparatus and system for realizing computer room-spanning data transmission |
CN104219298A (en) * | 2014-08-27 | 2014-12-17 | 深圳市深信服电子科技有限公司 | Cluster system and data backup method thereof |
CN104219085A (en) * | 2014-08-07 | 2014-12-17 | 深圳市同洲电子股份有限公司 | Proxy server and data processing method and system of database |
CN104376087A (en) * | 2014-11-19 | 2015-02-25 | 天津南大通用数据技术股份有限公司 | Load balance calculation method for distributed database adopting cross backups |
CN104424283A (en) * | 2013-08-30 | 2015-03-18 | 阿里巴巴集团控股有限公司 | Data migration system and data migration method |
US20160085648A1 (en) * | 2014-09-19 | 2016-03-24 | International Business Machines Corporation | Automatic client side seamless failover |
CN105871987A (en) * | 2015-12-14 | 2016-08-17 | 乐视云计算有限公司 | High available system and method for data writing |
CN106156359A (en) * | 2016-07-28 | 2016-11-23 | 四川新环佳科技发展有限公司 | A kind of data synchronization updating method under cloud computing platform |
CN106372161A (en) * | 2016-08-31 | 2017-02-01 | 天津南大通用数据技术股份有限公司 | Distributive database data backup piece deployment method and device |
CN106534288A (en) * | 2016-11-02 | 2017-03-22 | 广东欧珀移动通信有限公司 | Data transmission method and mobile terminal |
CN106570007A (en) * | 2015-10-09 | 2017-04-19 | 阿里巴巴集团控股有限公司 | Method and equipment for data synchronization of distributed caching system |
-
2017
- 2017-08-17 CN CN201710706787.7A patent/CN109408280A/en active Pending
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100005124A1 (en) * | 2006-12-07 | 2010-01-07 | Robert Edward Wagner | Automated method for identifying and repairing logical data discrepancies between database replicas in a database cluster |
CN101834904A (en) * | 2010-05-14 | 2010-09-15 | 杭州华三通信技术有限公司 | Method and equipment for database backup |
CN102867035A (en) * | 2012-08-28 | 2013-01-09 | 浪潮(北京)电子信息产业有限公司 | High-availability method and device of distributed document system cluster |
CN102857577A (en) * | 2012-09-24 | 2013-01-02 | 北京联创信安科技有限公司 | System and method for automatic load balancing of cluster storage |
CN104424283A (en) * | 2013-08-30 | 2015-03-18 | 阿里巴巴集团控股有限公司 | Data migration system and data migration method |
CN103647622A (en) * | 2013-12-05 | 2014-03-19 | 北京奇虎科技有限公司 | Method, apparatus and system for realizing computer room-spanning data transmission |
CN104219085A (en) * | 2014-08-07 | 2014-12-17 | 深圳市同洲电子股份有限公司 | Proxy server and data processing method and system of database |
CN104219298A (en) * | 2014-08-27 | 2014-12-17 | 深圳市深信服电子科技有限公司 | Cluster system and data backup method thereof |
US20160085648A1 (en) * | 2014-09-19 | 2016-03-24 | International Business Machines Corporation | Automatic client side seamless failover |
CN104376087A (en) * | 2014-11-19 | 2015-02-25 | 天津南大通用数据技术股份有限公司 | Load balance calculation method for distributed database adopting cross backups |
CN106570007A (en) * | 2015-10-09 | 2017-04-19 | 阿里巴巴集团控股有限公司 | Method and equipment for data synchronization of distributed caching system |
CN105871987A (en) * | 2015-12-14 | 2016-08-17 | 乐视云计算有限公司 | High available system and method for data writing |
CN106156359A (en) * | 2016-07-28 | 2016-11-23 | 四川新环佳科技发展有限公司 | A kind of data synchronization updating method under cloud computing platform |
CN106372161A (en) * | 2016-08-31 | 2017-02-01 | 天津南大通用数据技术股份有限公司 | Distributive database data backup piece deployment method and device |
CN106534288A (en) * | 2016-11-02 | 2017-03-22 | 广东欧珀移动通信有限公司 | Data transmission method and mobile terminal |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110515769A (en) * | 2019-08-15 | 2019-11-29 | 苏州浪潮智能科技有限公司 | A kind of backup processing method, device and electronic equipment and readable storage medium storing program for executing |
WO2021036330A1 (en) * | 2019-08-28 | 2021-03-04 | 华为技术有限公司 | Backup processing method and server |
US11971786B2 (en) | 2019-08-28 | 2024-04-30 | Huawei Technologies Co., Ltd. | Backup processing method and server |
CN111130896A (en) * | 2019-12-29 | 2020-05-08 | 北京浪潮数据技术有限公司 | NFS fault switching method and system and dual-control storage system |
CN111708763A (en) * | 2020-06-18 | 2020-09-25 | 北京金山云网络技术有限公司 | Data migration method and device of fragment cluster and fragment cluster system |
CN111708763B (en) * | 2020-06-18 | 2023-12-01 | 北京金山云网络技术有限公司 | Data migration method and device of sliced cluster and sliced cluster system |
CN111949637A (en) * | 2020-08-18 | 2020-11-17 | 上海七牛信息技术有限公司 | Log data processing method, device and system, electronic equipment and storage medium |
CN112652087A (en) * | 2020-12-23 | 2021-04-13 | 深圳中集天达空港设备有限公司 | Processing method of boarding bridge use record and related equipment |
WO2023019953A1 (en) * | 2021-08-16 | 2023-02-23 | 中兴通讯股份有限公司 | Data synchronization method and system, server, and storage medium |
CN113722154B (en) * | 2021-09-03 | 2024-04-19 | 咪咕音乐有限公司 | Data management method and system, monitoring server and storage medium |
CN113722154A (en) * | 2021-09-03 | 2021-11-30 | 咪咕音乐有限公司 | Data management method and system, monitoring server and storage medium |
CN115202588B (en) * | 2022-09-14 | 2022-12-27 | 本原数据(北京)信息技术有限公司 | Data storage method and device and data recovery method and device |
CN115202588A (en) * | 2022-09-14 | 2022-10-18 | 云和恩墨(北京)信息技术有限公司 | Data storage method and device and data recovery method and device |
CN117370078A (en) * | 2023-10-31 | 2024-01-09 | 广州鼎甲计算机科技有限公司 | Database backup management method, device, computer equipment and storage medium |
CN117370078B (en) * | 2023-10-31 | 2024-05-28 | 广州鼎甲计算机科技有限公司 | Database backup management method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109408280A (en) | Data back up method, apparatus and system | |
US9753954B2 (en) | Data node fencing in a distributed file system | |
US9116862B1 (en) | System and method for data replication using a single master failover protocol | |
CN108833479B (en) | Data synchronization method and device | |
US8930312B1 (en) | System and method for splitting a replicated data partition | |
US9069827B1 (en) | System and method for adjusting membership of a data replication group | |
US8719225B1 (en) | System and method for log conflict detection and resolution in a data store | |
JP5776267B2 (en) | Distributed file system | |
US20150019491A1 (en) | Replication of Data Between Mirrored Data Sites | |
CN113254466B (en) | Data processing method and device, electronic equipment and storage medium | |
CN102467508A (en) | Method for providing database service and database system | |
CN113641511A (en) | Message communication method and device | |
CN109739435B (en) | File storage and updating method and device | |
CN102761528A (en) | System and method for data management | |
KR101545626B1 (en) | System for interoperation between dds and dbms | |
CN105554074A (en) | NAS resource monitoring system and monitoring method based on RPC communication | |
CN106605217B (en) | For the method and system for being moved to another website from a website will to be applied | |
CN111506649A (en) | Transaction data disaster tolerance switching method and device, computing device and storage medium | |
CN104572351A (en) | Data recovery system and method based on host system | |
CN111865632A (en) | Switching method of distributed data storage cluster and switching instruction sending method and device | |
EP3427157B1 (en) | Cross-regional data transmission | |
CN108206839B (en) | Data storage method, device and system based on majority | |
CN103428288A (en) | Method for synchronizing copies on basis of partition state tables and coordinator nodes | |
JP2010044553A (en) | Data processing method, cluster system, and data processing program | |
WO2015196692A1 (en) | Cloud computing system and processing method and apparatus for cloud computing 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190301 |