CN106933703A - A kind of method of database data backup, device and electronic equipment - Google Patents
A kind of method of database data backup, device and electronic equipment Download PDFInfo
- Publication number
- CN106933703A CN106933703A CN201511027020.9A CN201511027020A CN106933703A CN 106933703 A CN106933703 A CN 106933703A CN 201511027020 A CN201511027020 A CN 201511027020A CN 106933703 A CN106933703 A CN 106933703A
- Authority
- CN
- China
- Prior art keywords
- event
- database
- daily record
- read
- backup
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1461—Backup scheduling policy
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1464—Management of the backup or restore process for networked environments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The device and a kind of electronic equipment of method, a kind of database data backup this application discloses a kind of backup of database data.Wherein, the method for the database data backup, including:Event is read from relaying daily record;Corresponding database manipulation is performed to backup database according to the event for reading;Based on the database manipulation, the content of the event read in relaying daily record is updated;The event after by renewal is written in binary log.The technical scheme is using the characteristics of relaying journal file to binary log file content and similar form, relaying journal file is converted into binary log file during data renewal passes through, eliminate when carrying out active-standby mode synchrodata, backup database is updated the data by relaying journal file and needs to carry out the process of primary structure binary log file in the more newly-generated binary log file of data, process is cumbersome when solving data syn-chronization, the low problem of synchronous efficiency.
Description
Technical field
The application is related to database technical field, and in particular to a kind of method and one kind of database data backup
The device of database data backup;The application is related to a kind of electronic equipment simultaneously.
Background technology
MySQL is a kind of Relational DBMS.Have in MySQL database various types of
Journal file:Error log, binary log, inquiry log etc., MySQL can be inquired about according to these daily records
The information such as the operation of database execution and state.Wherein binary log (binlog), have recorded to MySQL
The change operation of database, for example:Create database or table (create), insertion operation (insert),
Operation (update), deletion action (delete) etc. are updated, each change operation is with event
In form write-in binary log file, the timestamp of current event renewal is all contained in every event, is somebody's turn to do
Position of the record in current binary log file is (i.e.:Side-play amount) and operate phase with database change
The other information of pass.MySQL database generally has one or more binary log file, and different two enter
Journal file processed is distinguish between by file extension using different digital numbering forms, for example:
MySQL-bin.00001。
It is general for the reliability and stability of strengthening system, disposed in systems commonly using active-standby mode
The database for using, current MySQL generally includes a MDL and at least one backup database, main
Database is used to provide the functions such as data management and data query, and backup database is used to backing up in MDL
Data, to replace MDL to provide corresponding function when MDL breaks down.In MySQL
The scheme that active-standby mode is realized in database is:Backup database obtains binary log file from MDL,
The binary log file is converted into relaying journal file (relay log), according to relaying journal file standby
The binary log file of backup database is updated the data and generated in part database.
As can be seen here, under the scheme of existing active-standby mode synchrodata, backup database is by application relaying day
Will file updates the data to be synchronized with MDL, and in the more newly-generated binary log file of data
When, it is necessary to carry out the process of primary structure binary log file, process is cumbersome during data syn-chronization, synchronous effect
Rate is low.
The content of the invention
The application provides a kind of method of database data backup and a kind of device of database data backup,
To solve above mentioned problem of the prior art.The application is related to a kind of electronic equipment simultaneously.
This application provides a kind of method of database data backup, the method for the database data backup, bag
Include:
Event is read from relaying daily record;
Corresponding database manipulation is performed to backup database according to the event for reading;
Based on the database manipulation, the content of the event read in relaying daily record is updated;
The event after by renewal is written in binary log.
Optionally, the event that the basis reads performs corresponding database manipulation to backup database,
Including:
The event read from relaying daily record is resolved into execution sentence, and current database is held
Database manipulation of the row corresponding to the execution sentence;The execution sentence at least includes:Modification action statement,
Insertion operation sentence or deletion action sentence.
Optionally, the event at least includes:
Timestamp when performing the event, the service processes mark, the deviant of the event that create the event.
Optionally, it is described based on the database manipulation, update the event of reading in relaying daily record
Content, including:
Based on the database manipulation, timestamp, the clothes in the event read in relaying daily record are updated
Business process identification (PID) and the deviant of the event.
Optionally, it is described based on the database manipulation, in the event read in renewal relaying daily record
Timestamp, service processes mark and the event deviant, including:
Obtain present system time when corresponding database manipulation is performed to the database;
Update of time stamp by the event read in relaying daily record is the present system time for having obtained;
Obtain the service processes mark of the database;
The service processes for creating the event that the event read in relaying daily record is carried are identified and is updated
For the service processes of the database are identified;
Obtain the deviant and the event of the last item event in binary log of the storage in the database
Length;
According to the deviant and the thing of the last item event in binary log of the storage in the database
The length of part, is that the event read from relaying daily record is calculated and updates deviant.
Optionally, the event also includes:Verification and;
Described based on the database manipulation, the content of the event read in relaying daily record is updated
In step, also include:
Update it is described relaying daily record in read the event verification and.
Optionally, it is described update it is described relaying daily record in read the event verification and, including:
Generated during the relaying daily record that be written to for the event in the binary log in backup database by acquisition
Verification and;
Described will relay the verification of the event carrying read in daily record and be updated to the binary log
In event be written in backup database relaying daily record when the verification that generates and.
Optionally, before the step of reading event in the daily record from relaying, including:
Data cube computation will be set up between current database as backup database, with MDL.
Optionally, the MDL and backup database are MySQL database.
Optionally, it is described set up data cube computation and MDL between the step of after, including:
Receive the binary log in the MDL that MDL sends;
In the relaying daily record that event in the binary log is written in backup database.
Accordingly, present invention also provides a kind of device of database data backup, the database data backup
Device, including:
Event reading unit, for reading event from relaying daily record;
Database manipulation execution unit, it is corresponding for being performed to backup database according to the event for reading
Database manipulation;
Event update unit, for based on the database manipulation, that is read in renewal relaying daily record to be described
The content of event;
Daily record writing unit, is written in binary log for the event after by renewal.
Optionally, the database manipulation execution unit, specifically for will be read from relaying daily record
The event resolves to execution sentence, and the database corresponding to the execution sentence is performed to current database
Operation;The execution sentence at least includes:Modification action statement, insertion operation sentence or deletion action language
Sentence.
Optionally, the event reading unit, the event read from relaying daily record at least includes:
Timestamp when performing the event, the service processes mark, the deviant of the event that create the event.
Optionally, the event update unit, specifically for based on the database manipulation, updating the relaying
The deviant of timestamp, service processes mark and the event in the event read in daily record.
Optionally, the event update unit, including:
System time obtains subelement, current when corresponding database manipulation is performed to the database for obtaining
System time;
Time updates subelement, for the update of time stamp will described relay the event read in daily record for
The present system time of acquisition;
Service processes mark obtains subelement, and the service processes for obtaining the database are identified;
Service processes mark updates subelement, for the wound for carrying the event read in relaying daily record
The service processes mark for building the event is updated to the service processes mark of the database;
Deviant obtains subelement, for the last item thing in binary log of the acquisition storage in the database
The deviant of part and the length of the event;
Deviant updates subelement, for according in the binary log of the storage in the database last
The deviant of bar event and the length of the event, are that the event read from relaying daily record is calculated simultaneously
Update deviant.
Optionally, the event reading unit, the event read from relaying daily record also includes:Verification and;
The event update unit, is additionally operable to based on the database manipulation, updates reading in relaying daily record
The event verification and.
Optionally, the event update unit, also includes:
Verification and acquisition subelement, backup database is written to for obtaining by the event in the binary log
In relaying daily record when the verification that generates and;
Verification and subelement is updated, the verification and more that the event for that will read in relaying daily record is carried
The verification generated when being newly the relaying daily record being written to the event in the binary log in backup database
With.
Optionally, the device of the database data backup, also includes:
Connection establishment unit, for from relaying daily record before reading event, using current database as backup number
According to setting up data cube computation between storehouse, with MDL.
Optionally, the connection establishment unit, using current database as backup database, with MDL it
Between set up data cube computation MDL and backup database be MySQL database.
Optionally, the device of the database data backup, also includes:
Binary log receiving unit, for being set up after data cube computation and MDL between described, receives
Binary log in the MDL that MDL sends;
Relaying daily record writing unit, for the event in the binary log to be written in backup database
In relaying daily record.
Additionally, present invention also provides a kind of electronic equipment, including:
Display;
Processor;
Memory, for data storage database data stand-by program, described program is reading execution by the processor
When, perform following operation:Event is read from relaying daily record;According to the event for reading to Backup Data
Storehouse performs corresponding database manipulation;Based on the database manipulation, read in renewal relaying daily record
The content of the event;The event after by renewal is written in binary log.
Compared with prior art, the application has advantages below:
The application provide a kind of database data backup method, a kind of database data backup device and
Electronic equipment, event is read by from relaying daily record;According to the event for reading to backup database
Perform corresponding database manipulation;Based on the database manipulation, the institute read in relaying daily record is updated
State the content of event;The event after by renewal is written in binary log.The technical scheme is utilized
The characteristics of relaying journal file is to binary log file content and similar form, updates what is passed through in data
During will relaying journal file be converted to binary log file, eliminating carries out active-standby mode synchrodata
When, backup database is updated the data and in the more newly-generated binary log text of data by relaying journal file
Need to carry out the process of primary structure binary log file during part, process is cumbersome when solving data syn-chronization,
The low problem of synchronous efficiency.
Brief description of the drawings
In order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art, below will be to reality
The accompanying drawing to be used needed for example or description of the prior art is applied to be briefly described, it should be apparent that, below
Accompanying drawing in description is only some embodiments described in the application, for those of ordinary skill in the art
For, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 shows the flow chart of the method that the database data provided according to embodiments herein is backed up;
Fig. 2 shows the flow chart of the binary log write-in relaying daily record provided according to embodiments herein;
Fig. 3 is shown according to embodiments herein offer based on the database manipulation, during renewal is described
After the stream of the deviant of the timestamp in the event read in daily record, service processes mark and the event
Cheng Tu;
Fig. 4 shows the thing read in the renewal relaying daily record provided according to embodiments herein
The flow chart of the verification sum in the event body of part;
Fig. 5 shows the schematic diagram of the device that the database data provided according to embodiments herein is backed up;
Fig. 6 shows the schematic diagram of the electronic equipment provided according to embodiments herein.
Specific embodiment
In order to be more clearly understood that above-mentioned purpose, the feature and advantage of the application, below in conjunction with the accompanying drawings and tool
Body implementation method is further described in detail to the application.It should be noted that in situation about not conflicting
Under, the feature in embodiments herein and embodiment can be mutually combined.
Elaborate many details in order to fully understand the application in the following description.But, the application
Can be implemented with being much different from other manner described here, those skilled in the art can without prejudice to
Similar popularization is done in the case of the application intension, therefore, the application is not limited by following public specific implementation
System.
The method and a kind of database data that embodiments herein provides a kind of backup of database data are standby
The device of part;Embodiments herein provides a kind of electronic equipment simultaneously.Enter one by one in the following embodiments
Row is described in detail.
Current MySQL generally includes a MDL and at least one backup database, and MDL is used to carry
For functions such as data management and data queries, backup database is used to back up the data in MDL, is used to
MDL is replaced to provide corresponding function when MDL breaks down.Realized in MySQL database
The scheme of active-standby mode is:Backup database obtains binary log file from MDL, by the binary system
Journal file is converted to relaying journal file (relay log), according to relaying journal file in backup database
Update the data and generate the binary log file of backup database.As can be seen here, it is same in existing active-standby mode
Under the scheme of step data, backup database updates the data to enter with MDL by application relaying journal file
Row is synchronous, and in the more newly-generated binary log file of data, it is necessary to carry out primary structure binary system day
The process of will file, process is cumbersome during data syn-chronization, and synchronous efficiency is low.For this problem, the application's
Technical scheme utilizes the characteristics of relaying journal file to binary log file content and similar form, in number
During passing through according to renewal will relaying journal file be converted to binary log file, eliminate carry out it is active and standby
During pattern synchronization data, backup database is updated the data and more newly-generated in data by relaying journal file
Need to carry out the process of primary structure binary log file during binary log file, it is achieved thereby that quickly
The function of data syn-chronization.
Before the specific steps of the present embodiment are described in detail, the binary log being first related to the technical program
File and relaying journal file are briefly described.
Binlog is called binary log file, and it can be by the Query of all modifications database data in MySQL
Recorded in journal file that (once-through operation often done to database, all can be in binlog in binary form
In recorded), for example:Create, insert, drop, update etc., then will not for select operations
It is recorded in binlog, because it does not change the data of database.MySQL database is initially being transported
The new of the similar xxx-bin.000001 and xxx-bin.index of two titles can be created during row in data root
File, if the relevant options of configuration file do not provide filename, MySQL will using Hostname name this two
Individual file, such as MySQL-bin.000001 and MySQL-bin.index.MySQL can be all to data
The modification situation of storehouse content and structure charges to MySQL-bin.000001 files, and MySQL-bin.index is literary
Part then contains the inventory of a currently used all binary log files.MySQL database can restart
When or log file size more than the upper limit that system variable is specified when, generate a new journal file,
Its file extension sequence number is incremented by successively.As can be seen here, the binary log file of MySQL database is probably
One, it is also possible to one group, and binary log file described herein then contains MySQL database
Currently used all binary log files.
The update event that meeting database of record occurs in binary log file.So-called event, be exactly in fact
To the once-through operation of database record, when the sentence, the execution of sentence that perform including MySQL server
Between point, client's Thread Id for initiating to perform, sentence perform the information such as time overhead for spending.
The form of binlog has three kinds:Duplication STATEMENT (statement-based based on SQL statement
Replication, SBR), the SQL statement of each modification data can be all saved in binlog;Base
In capable duplication ROW (row-based replication, RBR), the change of every a line record can be recorded, just
It is that the modification of every a line all be recorded into binlog the insides, but sql sentences do not have in binlog, but
Have the disadvantage binlog amounts than larger, for example:When being not added with where conditions behind execution update sentences
When time or alter table, a large amount of daily records can be produced;Mixed mode replicates MIXED (mixed-based
Replication, MBR), it is in default situations STATEMENT, but can be switched in some cases
Row states, such as when DML updates an engine table, or with time user-related function etc..
Relaying journal file (relay log) default use host_name-relay-bin.nnnnnn forms
Filename, n is sequence number, since 000001, backup database tracked using index file it is current which
Individual file is currently in use, the entitled host_name-relay-bin.index of index file.Relaying journal file
Form it is identical with the form of binary log.From after the binary log of server acquisition MDL just
Can parse and the data to backup database do same renewal.Backup database has two threads, IO threads,
SQL threads.I/O threads download the binary log of MDL, and each IO threads are locally being created when starting
The daily record of a relaying is built, the data that SQL threads obtain relaying daily record updated from storehouse.SQL threads are reading
Relay journal files are automatically deleted after complete whole renewal sentence.
Embodiments herein provides a kind of method of database data backup, general, the present embodiment institute
The method of the database data backup stated is completed by backup database, and the method is by updating the relaying daily record
The content of the event of middle reading, and by renewal after the event be written to binary log in complete number
According to the backup of database data.The embodiment of the method for the database data backup is as follows:
Fig. 1 is refer to, the method backed up it illustrates the database data provided according to embodiments herein
Flow chart.
The method of the database data backup includes:
Step S101, event is read from relaying daily record.
In the present embodiment, the event for being read from relaying daily record is made up of event header and data division,
And event header at least includes:Timestamp when performing the event, the service processes mark for creating the event,
The deviant of the event.
It should be noted that the format and content of relaying journal file is essentially identical with binary log, each two
System journal file head is all 4 marks of byte, and it is 0xfe0x620x690x6e to be worth, after file header
It is exactly a series of log event (EVENT), event is the base unit in binary log file, event
Type have many kinds, wherein for database of record change operation event be query event.Below to day
The structure of will event is described in further detail.
Each event has the event header that a length is 19 bytes, wherein comprising perform the event when when
Between stamp, event type, create service processes mark, the deviant of event length and the event of the event.
In order to make it easy to understand, the event header of explanation event of giving one example below, the event header such as following table of event
It is shown:
Specifically refer to table one:(unit:Byte)
timestamp | type_code | server_id | event_length | next_position |
Visible by table one, the event header of event includes:Timestamp (timestamp), type_code (events
Type), server_id (service processes mark), event_length (time span),
Five fields of next_position (deviant).Each field is elaborated below.
Host time when timestamp fields are the execution events, i.e., timestamp described herein, also
It it is the renewal time of current event, timestamp fields are 0-3 bytes in event header.
Type_code fields are event types, including FORMAT_DESCRIPTION_EVENT, QUERY,
LOAD_EVENT etc., the type of wherein the first of each binary log file event is
FORMAT_DESCRIPTION_EVENT, it have recorded the relevant information of the binary log file, such as version,
These information are useful for the event of postorder analysis binary log file, so entering for read two
The instrument of the content of journal file processed all must first read first record.QUERY includes what we often operated
Such as:Create, drop, update, insert etc., type_code fields are the 4th byte in event header.
Server_id fields are service processes marks, that is, create the service processes ID of the database of the event,
Server_id fields are the 5-8 bytes in event header.
Event_length fields are event lengths, the field record length of this event (including the note
The event header of record and the length of data division), event_length fields are the 9-12 bytes in event header.
Next_position fields are the deviants of the event, and the deviant is to represent the event in binary system day
Position in will file, i.e.,:The next starting position of event after this event, is also this event knot
The position of a upper byte of beam position, next_position fields are the 13-16 bytes in event header.
It is exactly, according to event type definite event body (BODY), thing to be included in event body after event header
The specific data of part and inspection and.
Because the method that database data described in the present embodiment is backed up is completed by backup database, institute
So that in step S101, from relaying in daily record before reading event, the backup database is also needed between MDL
It is attached, specifically includes following steps:
Data cube computation will be set up between current database as backup database, with MDL.
It should be noted that setting up data cube computation described in this step between MDL, employ relative
Wide in range form of presentation, in specific implementation, the backup database and MDL of this step are set up when being connected,
Also need to be authenticated, for example:The IP address and MDL for obtaining server where MDL provide number
The service processes serviced according to storehouse are identified, and are then created a socket (socket) and are set up number with MDL
According to connection, and performed according to the interaction protocol between master/slave data storehouse and shake hands and verify etc. that interaction etc. is verified
After identity, the data cube computation is just successfully established.
In the present embodiment, the MDL and backup database being related to are MySQL database.
Set up after data cube computation between backup database and MDL, the backup database is needed from master
Binary log file is obtained in database, and the binary log file is converted into relaying journal file,
Step S100-1 to S100-2 is specifically included, is described further with reference to Fig. 2.
Fig. 2 is refer to, it illustrates the binary log write-in relaying daily record provided according to embodiments herein
Flow chart.
Step S100-1, receives the binary log in the MDL that MDL sends.
In the present embodiment, the binary log received in the MDL that MDL sends, can
To realize in the following way:After being connected with MDL foundation, MySQL master/slave datas storehouse uses 3 altogether
Thread performs the function of data syn-chronization, when backup database sends start slave, is localling create
One I/O thread, makes MDL send binary log file, and backup database receives MDL hair
Binary log in the MDL for sending.
It should be noted that when the I/O threads of backup database start every time, can be created in backup database
One relaying journal file.
In the specific implementation, backup database can be sent by cli_advanced_command
COM_BINLOG_DUMP orders obtain binary log to MDL, and this agreement the inside needs to specify two
System daily record name and offset address, MDL is that each backup database creates one after order is received
Individual Binlog Dump threads are used to send binary log content.
It should be noted that when order is sent to MDL, in addition it is also necessary to which the service for sending backup database is entered
Journey is identified, service processes mark can not with set up in MDL the existing backup database that is connected service into
Journey mark is repeated, and not so order can be rejected, and service processes mark can not be 0.
Step S100-2, the event in the binary log is written to the relaying daily record in backup database
It is interior.
In the present embodiment, the event by the binary log is written to the relaying in backup database
In daily record, can realize in the following way:The I/O threads of backup database read the Binlog of MDL
The binary log file that Dump threads send, and by the data copy in the binary log file to standby
In the relaying journal file that part database is created when I/O threads are started.
It should be noted that backup database can create 2 files, these shapes in local data catalogues
The default name of state file is MDL master.info and relay-log.info, due to these states
File is preserved in a hard disk, so backup database will not be lost when closing, and is opened in next backup database
When dynamic, can determine backup database from the binary system in MDL by reading these status files
The degree of the relaying daily record processed in how many data, and backup database is have read in journal file.
In the present embodiment, step S101 reads event from relaying daily record, can realize in the following way:
SQL threads are created in backup database, storage is read and is created when I/O threads are started in backup database
Relaying journal file in event information.
It should be noted that the SQL threads created in backup database, in can reading backup database
Relaying journal file, and can according to relaying journal file in event information to specific event according to renewal
Sentence performs renewal, and SQL threads read and perform renewal sentence and are divided into two independent tasks, in this step
In, only carry out the reading the event information in relaying journal file of the task therein.
Step S103, corresponding database manipulation is performed according to the event for reading to backup database.
In the present embodiment, the event that the basis reads performs corresponding database to backup database
Operation, can realize in the following way:The event read from relaying daily record is resolved to
Sentence is performed, and the database manipulation corresponding to the execution sentence is performed to current database;The execution
Sentence at least includes:Modification action statement, insertion operation sentence or deletion action sentence.
In the specific implementation, be by backup database create SQL threads, will from it is described relaying daily record in
The event for reading resolves to execution sentence, and current database is performed corresponding to the execution sentence
Database manipulation.SQL threads read and perform renewal sentence and are divided into two independent tasks, in this step
In, only carry out performing and updating sentence for task therein.
Due to user be with to database send SQL (Structured Query Language,
SQL) the mode of sentence, the data to being stored in the database are modified operation, therefore, in database
Every operation note that every event of the storage in local binary log file is recorded can all include
One corresponding SQL statement, for example:These SQL statements can be UPDATE, INSERT, DELETE etc.
Sentence, so in the present embodiment, it is described to resolve to the event read from relaying daily record
Perform in sentence, the execution sentence being parsed into includes updating operation (update) sentence, insertion operation
(insert) sentence, deletion action (delete) sentence, update sentences are the renewal operations to data,
Insert sentences are the insertion operations to data, and delete sentences are the deletion actions to data.And select behaviour
It is the selection operation to data to make (select) sentence, is substantially exactly by corresponding digital independent to caching
In operation, so SELECT statement can't be recorded in binary log and to data reality is not carried out
The UPDATE statement of renewal.
After the event read from relaying daily record is resolved to execution sentence by SQL threads, according to
The execution sentence parsed in every event, performs the database behaviour that correspondence performs sentence in backup database
Make.For example:The execution sentence parsed in event is:UPDATE Person SET Cash=Cash-1000
WHERE LastName='Wilson', then from the database table of entitled Persons, extract LastName
Field is the record of Wilson, and performs the operation that the numerical value of Cash fields is reduced 1000 to this record.
It should be noted that performing correspondence to backup database according to the event for reading in step S103
Database manipulation in, the event that reads from relaying daily record is resolved in SQL threads is held
Line statement and performed in database correspondence perform sentence database manipulation after, in backup database jump
Cross and generate corresponding event according to this database manipulation and write the binary system day stored in backup database
Operation in will file.
Step S105, based on the database manipulation, updates the event of reading in relaying daily record
Content.
In the present embodiment, described based on the database manipulation, that is read in renewal relaying daily record is described
The content of event, including:Update it is described relaying daily record in read the event in timestamp, service into
Journey mark, the deviant of the event.
It should be noted that the event recorded in binary log file or relaying journal file is to data
The once-through operation record in storehouse, so the Event Timestamp for updating in this step, service processes mark, the thing
The deviant of part is that the data corresponding to the execution sentence parsed from event have been performed in backup database
The service processes mark and the deviant of this event of timestamp, the backup database when storehouse operates.
In the present embodiment, described based on the database manipulation, that is read in renewal relaying daily record is described
The deviant of timestamp, service processes mark and the event in event, specifically includes step S105-1 extremely
S105-6, is described further with reference to Fig. 3.
Fig. 3 is refer to, it illustrates being provided according to embodiments herein based on the database manipulation, more
Timestamp, service processes mark and the event in the event read in the daily record of the new relaying it is inclined
The flow chart of shifting value.
Step S105-1, obtains present system time when corresponding database manipulation is performed to the database.
In the present embodiment, it is described obtain to the database perform corresponding database manipulation when current system when
Between refer to:The database behaviour corresponding to the execution sentence parsed from event has been performed in backup database
When making, the present system time of backup database is obtained.
In the specific implementation, the present system time of backup database is obtained, it is possible to use the interface that system is provided
The function of the temporal information of the monitored side of above-mentioned acquisition is realized, it is, for example possible to use the Calendar that system is provided
Class realizes the function of the temporal information of the monitored side of above-mentioned acquisition.
Step S105-2, the update of time stamp of the event read in relaying daily record has been obtained
Present system time.
In the present embodiment, the update of time stamp of the event for being read in the daily record by the relaying is to have obtained
The present system time for taking, can realize in the following way:The thing that will be read in relaying daily record
The data of part are extracted in caching, and the value of the 0-3 bytes in the event header of the event is revised as
In step S105-1, the present system time of the backup database for getting.
Step S105-3, obtains the service processes mark of the database.
In the present embodiment, the service processes mark for obtaining the database, can realize in the following way:
The service processes mark of the database is obtained in my.cnf files in backup database.For example:In the number
According to server_id=11 in the my.cnf files in storehouse, then the service processes for getting are designated 11.
Step S105-4, the service for creating the event that the event read in relaying daily record is carried
Process identification (PID) is updated to the service processes mark of the database.
In the present embodiment, what the event for being read in the daily record by the relaying was carried creates the event
Service processes mark is updated to the service processes mark of the database, can realize in the following way:To deposit
The value of the 5-8 bytes in the event header of the storage event in the buffer is revised as in step S105-3,
The service processes mark of the backup database for getting.
For example:The service processes mark 1 of MDL, then take the event read in relaying daily record
The service processes mark 1 of the establishment of the band event is updated to the service processes mark 11 of the database.
Step S105-5, obtains the skew of the last item event in binary log of the storage in the database
The length of value and the event.
In the present embodiment, the last item event in the binary log for obtaining storage in the database
The length of deviant and the event, can realize in the following way:Read the binary system in backup database
Journal file, obtain the last item event in binary log file in backup database deviant and
The length of the event.For example:The deviant of the last item event is 4 and length is 10.
In the specific implementation, the last item event in the binary log file in backup database can be read
Event header in 9-12 bytes and 13-16 bytes value obtain the event deviant and the event
Length.
It should be noted that the deviant of event represents position of the event in binary log file, for example:
The deviant of first event is exactly 4, because file header has a length for byte.It should be understood that for
For event n and event n+1 of the storage in binary log file, with following relation:
Next_position (n+1)=next_position (n)+event_length (n).
Step S105-6, according to the last item event in binary log of the storage in the database
The length of deviant and the event, is that the event read from relaying daily record is calculated and updates skew
Value.
In the present embodiment, the last item thing in the binary log according to the storage in the database
The deviant of part and the length of the event, are that the event read from relaying daily record is calculated and updated
Deviant, can realize in the following way:According to the backup database got in step S105-5
The length of the deviant of the last item event and the event in binary log file, the deviant that will be obtained and
Length is added, and calculates the new deviant of the event read in relaying daily record, and will be stored in delaying
The value of the 13-16 bytes in the event header of the event deposited is revised as the new deviant for calculating.
MySQL active-standby modes are fast in synchronizing speed, easy to use, but detect master/slave data it is inconsistent when,
But it is difficult to where judging to go wrong.For example:Software and hardware or network transmission malfunction, and cause to be transported on MDL
Capable SQL statement is inconsistent (referred to as event corrupt) with the SQL statement of operation on backup database.For
This problem is solved, it is ensured that correctness under active-standby mode during data syn-chronization, in 5.6Milestone
Replication event checksum (active-standby mode things are added in Development Release versions
Part is verified) function.
It should be noted that Checksum verification and, be in data processing and data communication field, to be used for
One group of sum of data item of purpose is verified, the integrality and accuracy of data are especially ensured in telecommunication.
These data item can be numeral or other character strings for regarding numeral as during inspection summation is calculated.It leads to
It is often in the form of hexadecimal is represented as numeral system, for example:Hexadecimal string:0102030405060708 school
Test and be:24 (hexadecimals).If the numerical value for verifying sum exceedes hexadecimal FF, that is, 255, just
It is required that its complement code as verification and.When an event is written into binary log, verification and also simultaneously
Write-in binary log, then after event is by network transmission to backup database, then in Backup Data
It is carried out in storehouse verifying and in the relaying journal file in writing backup data storehouse.Because each step all have recorded
Event and verification and, so we can soon find the problem.Verify and use the CRC-32 in zlib
Algorithm, is ISO-3309 CRC-32 algorithms more particularly.
So in the present embodiment, in the event body of the event in binary log file or relaying journal file
Also include verification and accordingly, the database manipulation, the renewal relaying daily record are based in step S103
During the content of the event of middle reading, in addition it is also necessary to update the thing of the event read in relaying daily record
Verification in part body and.
It is described update it is described relaying daily record in read the event event body in verification and, specifically include step
Rapid S105-7 to S105-8, is described further with reference to Fig. 4.
Fig. 4 is refer to, it illustrates reading in the renewal relaying daily record provided according to embodiments herein
The event event body in verification sum flow chart.
Event in the binary log is written to the relaying in backup database for step S105-7, acquisition
The verification that is generated during daily record and.
In the present embodiment, be written to the event in the binary log in backup database by the acquisition
During relaying daily record the verification that generates and, can realize in the following way:By in the binary log
When every event is written to the relaying daily record in backup database, the ISO-3309 CRC-32 in zlib are used
Algorithm, be every event generation verification and.
It should be noted that under MySQL active-standby modes, in MDL, every event is from session
Can be generated when binary log file is written in thread a verification for this event and, and in master data
When storehouse sends binary log content by the Binlog Dump threads created for each backup database, meeting
Every event of checking be written in session threads the verification that is generated during binary log file and;Standby
The I/O threads of part database read the binary log file that the Binlog Dump threads of MDL send,
And copy every event in binary log file to backup database is created when I/O threads are started
Can be during relaying journal file every event generate another verification and, the verification and can be created in backup database
Build in the relaying journal file that SQL threads reading storage is created when backup database is in startup I/O threads
Verified during event information.
Step S105-8, described will relay the verification of the event carrying read in daily record and be updated to institute
State the verification that is generated during the relaying daily record that the event in binary log is written in backup database and.
In the present embodiment, verification and be updated to that the event for being read in the daily record by the relaying is carried
The verification that is generated during the relaying daily record event in the binary log being written in backup database and,
Can realize in the following way:Will be stored in taking for the verification sum in the event body of the event in caching
Value is revised as in step S105-7, and what is got is written to backup number by the event in the binary log
The verification that is generated during according to relaying daily record in storehouse and.
Step S107, by renewal after the event be written in binary log.
In the present embodiment, it is described by renewal after the event be written in binary log, can be using such as
Under type is realized:After timestamp, service processes mark, the deviant of the event and verification and renewal
The event performs write operation, and the event in the buffer is written in binary log.
A kind of method of database data backup that the embodiment of the present application is provided, thing is read by from relaying daily record
Part;Corresponding database manipulation is performed to backup database according to the event for reading;Based on the number
Operated according to storehouse, update the content of the event read in relaying daily record;The event after by renewal
It is written in binary log, it is similar to binary log file content and form using journal file is relayed
The characteristics of, relaying journal file is converted into binary log file during data renewal passes through, save
When having gone to carry out active-standby mode synchrodata, backup database updated the data by relaying journal file and
Need to carry out the process of primary structure binary log file, solution during the more newly-generated binary log file of data
Determined data syn-chronization when process it is cumbersome, the low problem of synchronous efficiency.
In the above-described embodiment, there is provided a kind of method of database data backup, with above-mentioned database data
The method of backup is corresponding, present invention also provides a kind of device of database data backup.Due to device
Embodiment be substantially similar to the embodiment of method, so describe fairly simple, related part is referring to method
The part explanation of embodiment.Device embodiment described below is only schematical.The database
The device embodiment of data backup is as follows:
Fig. 5 is refer to, the device backed up it illustrates the database data provided according to embodiments herein
Schematic diagram.
The device of the database data backup, including:Event reading unit 501, database manipulation performs list
Unit 503, event update unit 505 and daily record writing unit 507;
The event reading unit 501, for reading event from relaying daily record;
The database manipulation execution unit 503, for being held to backup database according to the event for reading
The corresponding database manipulation of row;
The event update unit 505, for based on the database manipulation, reading in renewal relaying daily record
The content of the event for taking;
The daily record writing unit 507, is written in binary log for the event after by renewal.
Optionally, the database manipulation execution unit 503, specifically for that will be read from relaying daily record
To the event resolve to execution sentence, and the number corresponding to the execution sentence is performed to current database
Operated according to storehouse;The execution sentence at least includes:Modification action statement, insertion operation sentence delete behaviour
Make sentence.
Optionally, the event reading unit 501, the event read from relaying daily record at least includes:
Timestamp when performing the event, the service processes mark, the deviant of the event that create the event.
Optionally, the event update unit 505, specifically for based on the database manipulation, updating described
The deviant of timestamp, service processes mark and the event in the event read in relaying daily record.
Optionally, the event update unit 505, including:System time obtains subelement, time and updates son
It is single that unit, service processes mark obtain subelement, service processes mark renewal subelement, deviant acquisition
Unit and deviant update subelement;
The system time obtains subelement, when corresponding database manipulation is performed to the database for obtaining
Present system time;
The time updates subelement, the update of time stamp of the event for will be read in relaying daily record
It is the present system time for having obtained;
The service processes mark obtains subelement, and the service processes for obtaining the database are identified;
The service processes mark updates subelement, for the event read in relaying daily record to be carried
The service processes mark of the establishment event be updated to the service processes mark of the database;
The deviant obtains subelement, for obtaining in binary log of the storage in the database last
The deviant of bar event and the length of the event;
The deviant updates subelement, in the binary log according to the storage in the database most
The deviant of latter bar event and the length of the event, are the event meter read from relaying daily record
Calculate and update deviant.
Optionally, the event reading unit 501, the event read from relaying daily record also includes:Verification and;
The event update unit 505, is additionally operable to based on the database manipulation, in renewal relaying daily record
Read the event verification and.
Optionally, the event update unit 505, also includes:Verification and obtain subelement and verification and more
New subelement;
The verification and acquisition subelement, backup number is written to for obtaining by the event in the binary log
The verification that is generated during according to relaying daily record in storehouse and;
The verification and renewal subelement, for the verification that the event read in daily record is carried described will to be relayed
Generated during with the relaying daily record for being updated to be written to the event in the binary log in backup database
Verification and.
Optionally, the device of the database data backup, also includes:Connection establishment unit;
The connection establishment unit, for from relaying daily record before reading event, using current database as standby
Part sets up data cube computation between database, with MDL.
Optionally, the connection establishment unit, for using current database as backup database, with master data
The MDL and backup database that data cube computation is set up between storehouse are MySQL database.
Optionally, the device of the database data backup, also includes:Binary log receiving unit and in
After daily record writing unit;
The binary log receiving unit, for being set up after data cube computation and MDL between described,
Receive the binary log in the MDL that MDL sends;
The relaying daily record writing unit, for the event in the binary log to be written into backup database
In relaying daily record in.
In the above-described embodiment, there is provided the method and a kind of database data of a kind of database data backup
The device of backup, additionally, present invention also provides a kind of electronic equipment;The electronic equipment embodiment is as follows:
Fig. 6 is refer to, it illustrates the schematic diagram of the electronic equipment provided according to embodiments herein.
The electronic equipment, including:Display 601;Processor 603;Memory 605;
The memory 605, for data storage database data stand-by program, described program is by the processor
When reading execution, following operation is performed:Event is read from relaying daily record;According to the event pair for reading
Backup database performs corresponding database manipulation;Based on the database manipulation, the relaying daily record is updated
The content of the event of middle reading;The event after by renewal is written in binary log.
In a typical configuration, computing device includes one or more processors (CPU), input/output
Interface, network interface and caching.
Caching potentially includes the volatile memory in computer-readable medium, random access memory (RAM)
And/or the form, such as read-only storage (ROM) or flash memory (flash RAM) such as non-volatile cache.Caching is
The example of computer-readable medium.
1st, computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by
Any method or technique realizes information Store.Information can be computer-readable instruction, data structure, journey
The module of sequence or other data.The example of the storage medium of computer includes, but are not limited to phase transformation caching
(PRAM), static RAM (SRAM), dynamic random access memory (DRAM), other classes
The random access memory (RAM) of type, read-only storage (ROM), Electrically Erasable Read Only Memory
(EEPROM), fast flash memory bank or other caching technologys, read-only optical disc read-only storage (CD-ROM), numeral
Multifunctional optical disk (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic
Storage device or any other non-transmission medium, can be used to store the information that can be accessed by a computing device.Press
Defined according to herein, computer-readable medium does not include non-temporary computer readable media (transitory
Media), such as the data-signal and carrier wave of modulation.
2nd, it will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer
Program product.Therefore, the application can use complete hardware embodiment, complete software embodiment or combine software
With the form of the embodiment of hardware aspect.And, the application can be used and wherein include meter at one or more
Calculation machine usable program code computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM,
Optical memory etc.) on implement computer program product form.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, Ren Heben
Art personnel are not being departed from spirit and scope, can make possible variation and modification,
Therefore the scope that the protection domain of the application should be defined by the application claim is defined.
Claims (21)
1. a kind of method that database data is backed up, it is characterised in that including:
Event is read from relaying daily record;
Corresponding database manipulation is performed to backup database according to the event for reading;
Based on the database manipulation, the content of the event read in relaying daily record is updated;
The event after by renewal is written in binary log.
2. the method that database data according to claim 1 is backed up, it is characterised in that the basis
The event for reading performs corresponding database manipulation to backup database, including:
The event read from relaying daily record is resolved into execution sentence, and current database is held
Database manipulation of the row corresponding to the execution sentence;The execution sentence at least includes:Modification action statement,
Insertion operation sentence or deletion action sentence.
3. the method that database data according to claim 2 is backed up, it is characterised in that the event
At least include:
Timestamp when performing the event, the service processes mark, the deviant of the event that create the event.
4. the method that database data according to claim 3 is backed up, it is characterised in that described to be based on
The database manipulation, updates the content of the event read in relaying daily record, including:
Based on the database manipulation, timestamp, the clothes in the event read in relaying daily record are updated
Business process identification (PID) and the deviant of the event.
5. the method that database data according to claim 4 is backed up, it is characterised in that described to be based on
The database manipulation, updates timestamp, the service processes in the event read in relaying daily record
The deviant of mark and the event, including:
Obtain present system time when corresponding database manipulation is performed to the database;
Update of time stamp by the event read in relaying daily record is the present system time for having obtained;
Obtain the service processes mark of the database;
The service processes for creating the event that the event read in relaying daily record is carried are identified and is updated
For the service processes of the database are identified;
Obtain the deviant and the event of the last item event in binary log of the storage in the database
Length;
According to the deviant and the thing of the last item event in binary log of the storage in the database
The length of part, is that the event read from relaying daily record is calculated and updates deviant.
6. the method that database data according to claim 3 is backed up, it is characterised in that the event
Also include:Verification and;
Described based on the database manipulation, the content of the event read in relaying daily record is updated
In step, also include:
Update it is described relaying daily record in read the event verification and.
7. the method that database data according to claim 6 is backed up, it is characterised in that the renewal
In the relaying daily record read the event verification and, including:
Generated during the relaying daily record that be written to for the event in the binary log in backup database by acquisition
Verification and;
Described will relay the verification of the event carrying read in daily record and be updated to the binary log
In event be written in backup database relaying daily record when the verification that generates and.
8. the method for database data according to claim 1 backup, it is characterised in that it is described from
Before the step of event being read in relaying daily record, including:
Data cube computation will be set up between current database as backup database, with MDL.
9. the method that database data according to claim 8 is backed up, it is characterised in that the main number
It is MySQL database according to storehouse and backup database.
10. the method that database data according to claim 8 is backed up, it is characterised in that described
After the step of data cube computation is set up between MDL, including:
Receive the binary log in the MDL that MDL sends;
In the relaying daily record that event in the binary log is written in backup database.
A kind of 11. devices of database data backup, it is characterised in that including:
Event reading unit, for reading event from relaying daily record;
Database manipulation execution unit, it is corresponding for being performed to backup database according to the event for reading
Database manipulation;
Event update unit, for based on the database manipulation, that is read in renewal relaying daily record to be described
The content of event;
Daily record writing unit, is written in binary log for the event after by renewal.
The device of 12. database data backups according to claim 11, it is characterised in that the number
According to storehouse operation execution unit, held specifically for the event read from relaying daily record is resolved to
Line statement, and the database manipulation corresponding to the execution sentence is performed to current database;The execution language
Sentence at least includes:Modification action statement, insertion operation sentence or deletion action sentence.
The device of 13. database data backups according to claim 12, it is characterised in that the thing
Part reading unit, the event read from relaying daily record at least includes:
Timestamp when performing the event, the service processes mark, the deviant of the event that create the event.
The device of 14. database data backups according to claim 13, it is characterised in that the thing
Part updating block, specifically for based on the database manipulation, that is read in renewal relaying daily record is described
The deviant of timestamp, service processes mark and the event in event.
The device of 15. database data backups according to claim 14, it is characterised in that the thing
Part updating block, including:
System time obtains subelement, current when corresponding database manipulation is performed to the database for obtaining
System time;
Time updates subelement, for the update of time stamp will described relay the event read in daily record for
The present system time of acquisition;
Service processes mark obtains subelement, and the service processes for obtaining the database are identified;
Service processes mark updates subelement, for the wound for carrying the event read in relaying daily record
The service processes mark for building the event is updated to the service processes mark of the database;
Deviant obtains subelement, for the last item thing in binary log of the acquisition storage in the database
The deviant of part and the length of the event;
Deviant updates subelement, for according in the binary log of the storage in the database last
The deviant of bar event and the length of the event, are that the event read from relaying daily record is calculated simultaneously
Update deviant.
The device of 16. database data backups according to claim 13, it is characterised in that the thing
Part reading unit, the event read from relaying daily record also includes:Verification and;
The event update unit, is additionally operable to based on the database manipulation, updates reading in relaying daily record
The event verification and.
The device of 17. database data backups according to claim 16, it is characterised in that the thing
Part updating block, also includes:
Verification and acquisition subelement, backup database is written to for obtaining by the event in the binary log
In relaying daily record when the verification that generates and;
Verification and subelement is updated, the verification and more that the event for that will read in relaying daily record is carried
The verification generated when being newly the relaying daily record being written to the event in the binary log in backup database
With.
The device of 18. database data backups according to claim 11, it is characterised in that also include:
Connection establishment unit, for from relaying daily record before reading event, using current database as backup number
According to setting up data cube computation between storehouse, with MDL.
The device of 19. database data backups according to claim 18, it is characterised in that the company
Connect and set up unit, data cube computation will be set up between current database as backup database, with MDL
MDL and backup database are MySQL database.
The device of 20. database data backups according to claim 18, it is characterised in that also include:
Binary log receiving unit, for being set up after data cube computation and MDL between described, receives
Binary log in the MDL that MDL sends;
Relaying daily record writing unit, for the event in the binary log to be written in backup database
In relaying daily record.
21. a kind of electronic equipment, it is characterised in that the electronic equipment includes:
Display;
Processor;
Memory, for data storage database data stand-by program, described program is reading execution by the processor
When, perform following operation:Event is read from relaying daily record;According to the event for reading to Backup Data
Storehouse performs corresponding database manipulation;Based on the database manipulation, read in renewal relaying daily record
The content of the event;The event after by renewal is written in binary log.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511027020.9A CN106933703B (en) | 2015-12-30 | 2015-12-30 | Database data backup method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511027020.9A CN106933703B (en) | 2015-12-30 | 2015-12-30 | Database data backup method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106933703A true CN106933703A (en) | 2017-07-07 |
CN106933703B CN106933703B (en) | 2021-04-02 |
Family
ID=59441118
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511027020.9A Active CN106933703B (en) | 2015-12-30 | 2015-12-30 | Database data backup method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106933703B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107368390A (en) * | 2017-07-14 | 2017-11-21 | 北京三快在线科技有限公司 | Backup method and device for database logs and server |
CN107741963A (en) * | 2017-09-30 | 2018-02-27 | 北京奇虎科技有限公司 | Across company-data merging method and device, electronic equipment, computer-readable storage medium |
CN110275893A (en) * | 2019-06-11 | 2019-09-24 | 上海上湖信息技术有限公司 | A kind of data manipulation method and device |
CN111367893A (en) * | 2020-03-31 | 2020-07-03 | 中国建设银行股份有限公司 | Method and device for database version iteration |
CN111382012A (en) * | 2020-03-03 | 2020-07-07 | 广州鼎甲计算机科技有限公司 | Backup method and device for MySQL cloud database, computer equipment and storage medium |
CN111382024A (en) * | 2018-12-28 | 2020-07-07 | 中兴通讯股份有限公司 | Method, device and system for monitoring master-slave copying delay of database |
CN111625396A (en) * | 2019-02-27 | 2020-09-04 | 阿里巴巴集团控股有限公司 | Backup data verification method, server and storage medium |
CN111858171A (en) * | 2020-07-10 | 2020-10-30 | 上海达梦数据库有限公司 | Data backup method, device, equipment and storage medium |
CN112084161A (en) * | 2020-09-16 | 2020-12-15 | 腾讯科技(深圳)有限公司 | Database-based data processing method and device and readable storage medium |
CN112559247A (en) * | 2020-12-18 | 2021-03-26 | 创意信息技术股份有限公司 | Database data backup method and system based on third-party assistance |
CN112732492A (en) * | 2021-01-22 | 2021-04-30 | 安徽仝心电子科技有限公司 | Extraction backup method and system based on cloud database |
CN113032408A (en) * | 2019-12-24 | 2021-06-25 | 阿里巴巴集团控股有限公司 | Data processing method, system and equipment |
CN113467996A (en) * | 2021-07-08 | 2021-10-01 | 咪咕音乐有限公司 | Database backup method and device, computer equipment and storage medium |
CN113868022A (en) * | 2021-09-18 | 2021-12-31 | 聚好看科技股份有限公司 | Master-slave switching method and device for database |
CN113987078A (en) * | 2021-12-24 | 2022-01-28 | 中兴通讯股份有限公司 | Data synchronization method, device and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101719149A (en) * | 2009-12-03 | 2010-06-02 | 联动优势科技有限公司 | Data synchronization method and device |
CN103544076A (en) * | 2012-07-13 | 2014-01-29 | 阿里巴巴集团控股有限公司 | Data backup method and device |
CN103593257A (en) * | 2012-08-15 | 2014-02-19 | 阿里巴巴集团控股有限公司 | Data backup method and device |
CN103929472A (en) * | 2014-03-21 | 2014-07-16 | 珠海多玩信息技术有限公司 | Data processing method, device and system |
CN104657382A (en) * | 2013-11-21 | 2015-05-27 | 阿里巴巴集团控股有限公司 | Method and device for detecting consistency of data of MySQL master and slave servers |
-
2015
- 2015-12-30 CN CN201511027020.9A patent/CN106933703B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101719149A (en) * | 2009-12-03 | 2010-06-02 | 联动优势科技有限公司 | Data synchronization method and device |
CN103544076A (en) * | 2012-07-13 | 2014-01-29 | 阿里巴巴集团控股有限公司 | Data backup method and device |
CN103593257A (en) * | 2012-08-15 | 2014-02-19 | 阿里巴巴集团控股有限公司 | Data backup method and device |
CN104657382A (en) * | 2013-11-21 | 2015-05-27 | 阿里巴巴集团控股有限公司 | Method and device for detecting consistency of data of MySQL master and slave servers |
CN103929472A (en) * | 2014-03-21 | 2014-07-16 | 珠海多玩信息技术有限公司 | Data processing method, device and system |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107368390A (en) * | 2017-07-14 | 2017-11-21 | 北京三快在线科技有限公司 | Backup method and device for database logs and server |
CN107741963A (en) * | 2017-09-30 | 2018-02-27 | 北京奇虎科技有限公司 | Across company-data merging method and device, electronic equipment, computer-readable storage medium |
CN111382024B (en) * | 2018-12-28 | 2023-07-14 | 金篆信科有限责任公司 | Database master-slave copy delay monitoring method, device and system |
CN111382024A (en) * | 2018-12-28 | 2020-07-07 | 中兴通讯股份有限公司 | Method, device and system for monitoring master-slave copying delay of database |
CN111625396B (en) * | 2019-02-27 | 2023-05-26 | 阿里云计算有限公司 | Backup data verification method, server and storage medium |
CN111625396A (en) * | 2019-02-27 | 2020-09-04 | 阿里巴巴集团控股有限公司 | Backup data verification method, server and storage medium |
CN110275893A (en) * | 2019-06-11 | 2019-09-24 | 上海上湖信息技术有限公司 | A kind of data manipulation method and device |
CN113032408B (en) * | 2019-12-24 | 2024-05-07 | 阿里巴巴集团控股有限公司 | Data processing method, system and equipment |
CN113032408A (en) * | 2019-12-24 | 2021-06-25 | 阿里巴巴集团控股有限公司 | Data processing method, system and equipment |
CN111382012A (en) * | 2020-03-03 | 2020-07-07 | 广州鼎甲计算机科技有限公司 | Backup method and device for MySQL cloud database, computer equipment and storage medium |
CN111382012B (en) * | 2020-03-03 | 2020-12-29 | 广州鼎甲计算机科技有限公司 | Backup method and device for MySQL cloud database, computer equipment and storage medium |
CN111367893A (en) * | 2020-03-31 | 2020-07-03 | 中国建设银行股份有限公司 | Method and device for database version iteration |
CN111858171A (en) * | 2020-07-10 | 2020-10-30 | 上海达梦数据库有限公司 | Data backup method, device, equipment and storage medium |
CN111858171B (en) * | 2020-07-10 | 2024-03-12 | 上海达梦数据库有限公司 | Data backup method, device, equipment and storage medium |
CN112084161B (en) * | 2020-09-16 | 2024-06-25 | 腾讯科技(深圳)有限公司 | Database-based data processing method and device and readable storage medium |
CN112084161A (en) * | 2020-09-16 | 2020-12-15 | 腾讯科技(深圳)有限公司 | Database-based data processing method and device and readable storage medium |
CN112559247A (en) * | 2020-12-18 | 2021-03-26 | 创意信息技术股份有限公司 | Database data backup method and system based on third-party assistance |
CN112732492A (en) * | 2021-01-22 | 2021-04-30 | 安徽仝心电子科技有限公司 | Extraction backup method and system based on cloud database |
CN113467996B (en) * | 2021-07-08 | 2024-04-19 | 咪咕音乐有限公司 | Database backup method, device, computer equipment and storage medium |
CN113467996A (en) * | 2021-07-08 | 2021-10-01 | 咪咕音乐有限公司 | Database backup method and device, computer equipment and storage medium |
CN113868022A (en) * | 2021-09-18 | 2021-12-31 | 聚好看科技股份有限公司 | Master-slave switching method and device for database |
CN113987078A (en) * | 2021-12-24 | 2022-01-28 | 中兴通讯股份有限公司 | Data synchronization method, device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106933703B (en) | 2021-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106933703A (en) | A kind of method of database data backup, device and electronic equipment | |
KR102307371B1 (en) | Data replication and data failover within the database system | |
US10445321B2 (en) | Multi-tenant distribution of graph database caches | |
Preguiça | Conflict-free replicated data types: An overview | |
CN104657382B (en) | Method and apparatus for MySQL principal and subordinate's server data consistency detections | |
US9892185B2 (en) | Method and system for syncing data structures | |
CN107209704A (en) | Detect the write-in lost | |
CN111444196B (en) | Method, device and equipment for generating Hash of global state in block chain type account book | |
US10726042B2 (en) | Replication control using eventually consistent meta-data | |
KR20040088397A (en) | Transactionally consistent change tracking for databases | |
WO2019017997A1 (en) | Distributed graph database writes | |
CN106155838B (en) | A kind of database back-up data restoration methods and device | |
CN113204598B (en) | Data synchronization method, system and storage medium | |
CN109492049A (en) | Data processing, block generation and synchronous method for block chain network | |
US20220121527A1 (en) | Dynamically updating database archive log dependency and backup copy recoverability | |
CN108984337A (en) | A kind of restorative procedure of data synchronous abnormality, prosthetic device, medium and calculate equipment | |
CN113656384B (en) | Data processing method, distributed database system, electronic device and storage medium | |
Kleppmann et al. | A highly-available move operation for replicated trees | |
CN113515303B (en) | Project transformation method, device and equipment | |
CN109462661A (en) | Method of data synchronization, device, computer equipment and storage medium | |
Mao et al. | Reversible conflict-free replicated data types | |
CN114787780A (en) | System and method for blockchain based backup and restore | |
WO2014187216A1 (en) | Method and device for database structure object processing | |
WO2016117007A1 (en) | Database system and database management method | |
CN111444194B (en) | Method, device and equipment for clearing indexes in block chain type account book |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |