CN107678888A - database data backup method and device - Google Patents

database data backup method and device Download PDF

Info

Publication number
CN107678888A
CN107678888A CN201710938181.6A CN201710938181A CN107678888A CN 107678888 A CN107678888 A CN 107678888A CN 201710938181 A CN201710938181 A CN 201710938181A CN 107678888 A CN107678888 A CN 107678888A
Authority
CN
China
Prior art keywords
database
target client
source
client database
transaction
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
Application number
CN201710938181.6A
Other languages
Chinese (zh)
Inventor
陈�全
石亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Nine Bridge Synchronization Software Co Ltd
Original Assignee
Beijing Nine Bridge Synchronization Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Nine Bridge Synchronization Software Co Ltd filed Critical Beijing Nine Bridge Synchronization Software Co Ltd
Priority to CN201710938181.6A priority Critical patent/CN107678888A/en
Publication of CN107678888A publication Critical patent/CN107678888A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This disclosure relates to a kind of database data backup method and device, including Transaction Identifier, object identity, action type, operation content and the line identifier extracted from the journal file of source database, each transaction file is generated in units of affairs, each transaction file is sent to target client database so that destination end according to each transaction file and mapping table by the operation backed up in synchronization of source database to target client database.By Transaction Identifier, object identity, action type, operation content and the line identifier extracted from the journal file of source database, each transaction file is generated in units of affairs and is sent to target client database.Data syn-chronization thus, it is possible to quickly realize database based on journal file and line identifier in units of affairs, data synchronization process need not rely on the major key of data in source database, be more widely applied.

Description

Database data backup method and device
Technical field
This disclosure relates to database technical field, more particularly to a kind of database data backup method and device.
Background technology
With the fast development of database technology, the application of database is also more and more extensive.Wherein, database data Safety is even more important to the very high industry of data reliability requirement such as bank, security, telecommunications etc..The data backup guarantee of database One important means of data safety, in correlation technique, the backup to database be destination end according to where conditional statements come It is loaded, it is therefore desirable to which the data of source database possess major key, restricted application.
The content of the invention
In view of this, the present disclosure proposes a kind of database data backup method and device.
According to the one side of the disclosure, there is provided a kind of database data backup method, methods described are applied to source, bag Include:
Transaction Identifier, object identity, action type, operation content and the row extracted from the journal file of source database Mark, generates each transaction file in units of affairs;
Each transaction file is sent to target client database, to be incited somebody to action according to each transaction file and mapping table The operation backed up in synchronization of source database includes the line identifier of source database to target client database, the mapping table With the corresponding relation of the line identifier of target client database.
In a kind of possible implementation, this method also includes:
When target client database initializes, by source wide area information server rank, object rank or the other number of table level According to being sent to target client database, and mapping table is generated in target client database.
According to another aspect of the present disclosure, there is provided a kind of database data backup method, methods described are applied to target End, including:
Receive and come from each transaction file of source database, wherein, the transaction file is according to from source database Transaction Identifier, object identity, action type, operation content and the line identifier extracted in journal file is generated in units of affairs 's;
According to the transaction file and mapping table by the operation backed up in synchronization of source database to target client database, The mapping table includes the corresponding relation of the line identifier of source database and the line identifier of target client database.
In a kind of possible implementation, this method also includes:
When target client database initializes, it is other to receive database rank, object rank or table level from source database Data, and generate mapping table in target client database.
In a kind of possible implementation, the action type includes at least one in DML operations and DDL operations.
According to another aspect of the present disclosure, there is provided a kind of database data back-up device, described device are applied to source, Including:
Generation module, for the Transaction Identifier, object identity, operation class extracted from the journal file of source database Type, operation content and line identifier, each transaction file is generated in units of affairs;
Sending module, for each transaction file to be sent to target client database, so that destination end is according to each described Transaction file and mapping table are by the operation backed up in synchronization of source database to target client database, in the mapping table The corresponding relation of line identifier and the line identifier of target client database including source database.
In a kind of possible implementation, described device also includes:
First initialization module, for when target client database initializes, by source wide area information server rank, right As rank or the other data of table level are sent to target client database, and mapping table is generated in target client database.
According to another aspect of the present disclosure, there is provided a kind of database data back-up device, described device are applied to target End, including:
Receiving module, each transaction file of source database is come from for receiving, wherein, the transaction file is basis Transaction Identifier, object identity, action type, operation content and the line identifier extracted from source database log file is with affairs For unit generation;
Synchronization module, for being arrived the operation backed up in synchronization of source database according to the transaction file and mapping table Target client database, the mapping table include pair of the line identifier of source database and the line identifier of target client database It should be related to.
In a kind of possible implementation, described device also includes:
Second initialization module, for when target client database initializes, from source database receive database rank, Object rank or the other data of table level, and generate mapping table in target client database.
In a kind of possible implementation, the action type includes at least one in DML operations and DDL operations.
According to another aspect of the present disclosure, there is provided a kind of database data back-up device, including:Processor;For depositing Store up the memory of processor-executable instruction;Wherein, the processor is configured as performing the above method.
According to another aspect of the present disclosure, there is provided a kind of non-volatile computer readable storage medium storing program for executing, be stored thereon with Computer program instructions, wherein, the computer program instructions realize the above method when being executed by processor.
The disclosure passes through the Transaction Identifier that is extracted from the journal file of source database, object identity, action type, behaviour Make content and line identifier, each transaction file is generated in units of affairs and is sent to target client database, with according to each transaction File and mapping table are by the operation backed up in synchronization of source database to target client database.Thus, it is possible in units of affairs Based on journal file and the quick data syn-chronization for realizing database of line identifier (ROWID), data synchronization process need not rely on source The major key of data, is more widely applied in database.
According to below with reference to the accompanying drawings becoming to detailed description of illustrative embodiments, the further feature and aspect of the disclosure It is clear.
Brief description of the drawings
Comprising in the description and the accompanying drawing of a part for constitution instruction and specification together illustrate the disclosure Exemplary embodiment, feature and aspect, and for explaining the principle of the disclosure.
Fig. 1 a are a kind of flow charts of database data backup method according to an exemplary embodiment.
Fig. 1 b multiple source database in phase that are the disclosure in source application are into multiple destination end databases Schematic diagram.
Fig. 2 a are a kind of flow charts of database data backup method according to another exemplary embodiment.
Fig. 2 b multiple source database in phase that are the disclosure in destination end application are into a target client database And the schematic diagram of subsequent devices be present.
Fig. 2 c are the schematic diagrames of the application example of the disclosure one.
Fig. 3 is a kind of block diagram of database data back-up device according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of database data back-up device according to an example of an exemplary embodiment.
Fig. 5 is a kind of block diagram of database data back-up device according to another exemplary embodiment.
Fig. 6 is a kind of frame of database data back-up device according to an example of another exemplary embodiment Figure.
Fig. 7 is a kind of block diagram of device for database data backup according to an exemplary embodiment.
Fig. 8 is a kind of block diagram of device for database data backup according to an exemplary embodiment.
Embodiment
Describe various exemplary embodiments, feature and the aspect of the disclosure in detail below with reference to accompanying drawing.It is identical in accompanying drawing Reference represent the same or analogous element of function.Although the various aspects of embodiment are shown in the drawings, remove Non-specifically point out, it is not necessary to accompanying drawing drawn to scale.
Special word " exemplary " is meant " being used as example, embodiment or illustrative " herein.Here as " exemplary " Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
In addition, in order to better illustrate the disclosure, numerous details is given in embodiment below. It will be appreciated by those skilled in the art that without some details, the disclosure can equally be implemented.In some instances, for Method, means, element and circuit well known to those skilled in the art are not described in detail, in order to highlight the purport of the disclosure.
Fig. 1 a are a kind of flow charts of database data backup method according to an exemplary embodiment, such as Fig. 1 a institutes Show, methods described includes step S101 and step S102.
In step S101, the Transaction Identifier that is extracted from the journal file of source database, object identity, operation class Type, operation content and line identifier, each transaction file is generated in units of affairs.
In step s 102, each transaction file is sent to target client database, with according to each transaction file The operation backed up in synchronization of source database to target client database, the mapping table are included into source with mapping table The corresponding relation of the line identifier of database and the line identifier of target client database.
As an example of the present embodiment, source software (abbreviation source) is obtained by on-line analysis journal file (Log) To transaction file (i.e. Transaction Identifier, object identity, action type and line identifier and operation content), and by the transaction file Send to destination end software (abbreviation destination end).
The full content for the journal file that source will not be transmitted is to destination end, except the related DML (data of specified duplication object Manipulation language, database manipulation language) operate and DDL (data definition language, data Pattern definition language) operation outside, other information are not processed.Wherein, DML operations include deletion action, insertion operation Includes modification table name Deng, DDL operation, change data type of field etc..
In other words, the present embodiment carrys out trace log data in units of affairs, analyzes online daily record, and only processing has been completed (COMMIT) transaction, without handling rollback (ROLLBACK) operation.Therefore, the journal change amount of source crawl only accounts for daily record File total amount 1/3.
The present embodiment to the integration of daily record and transmission with " affairs " for unit, be different from correlation technique with SQL (Structured Query Language, SQL) sentence is log processing, the transmission technology of unit, without Handle complicated " rollback " mechanism.Possessing uniformity that is high performance while can also preferably ensureing data duplication and complete Property.
In the disclosure, source is handled again afterwards without waiting for journal file filing, but reads source number online According to data block contents in storehouse (i.e. redoing log in database log file).Source crawl log and source database write daily record It is parallel work-flow and does not interact, and without using any resource of source database.
In the disclosure, the interval time of source reading daily record can use parameter setting, such as in seconds.Therefore just In the case of often, source is the daily record amount of crawl change quasi real time.After the daily record amount processing captured every time is completed, it is recorded in In the CACHE DIRECTORY of source.Therefore for day-to-day operation during, source be stopped or other reasons need read filing day During will, the archive log for needing to capture is positioned according to the physical location of the archive log of Database Systems record.Thus, it is possible to The integrality of data is kept in the data synchronization process of source database and target client database.
In a kind of possible implementation, methods described also includes:When target client database initializes, by source number Target client database is sent to according to the database rank in storehouse, object rank or the other data of table level, and in target client database Generate mapping table.Wherein, destination end is according to the mapping table and the transaction for the coming from source database text received Part carries out data syn-chronization backup operation to target client database.
In an application example, as shown in Figure 1 b, src_id comes from export (parsing) process for differentiation, its In, the corresponding different source of each src_id.Tgt_id is used to distinguish send (transmission) process, wherein, each tgt_id A corresponding different destination end.Manager (management) process is used to control parsing process, makes the data of parsing process with affairs Transmitted for unit to transmission process.The data that the disclosure is achieved between multiple source databases and multiple target end datas are same Step backup.
Fig. 2 a are a kind of flow charts of database data backup method according to another exemplary embodiment, such as Fig. 2 a Shown, methods described includes step S201 and step S202.
In step s 201, each transaction file for coming from source database is received, wherein, the transaction file is basis Transaction Identifier, object identity, action type, operation content and the line identifier extracted from source database log file is with affairs For unit generation.
In step S202, the operation backed up in synchronization of source database is arrived according to the transaction file and mapping table Target client database, the mapping table include pair of the line identifier of source database and the line identifier of target client database It should be related to.
As an example of the present embodiment, destination end receives the transaction file for coming from source database.Transaction file Include Transaction Identifier, object identity, action type, line identifier and operation content etc..Then, destination end obtains according to transaction file SQL statement is obtained, so that destination end database root completes DataBase (database) level according to each SQL statement and mapping table Not, the data duplication of Schema (object) ranks or Table (table) rank.
In a kind of possible implementation, methods described also includes:When target client database initializes, from source number Database rank, object rank or the other data of table level are received according to storehouse, and mapping table is generated in target client database.Mesh Mark end is according to the mapping table and the transaction file for coming from source database received to target client database number Operated according to backed up in synchronization.
In a kind of possible implementation, the action type includes at least one in DML operations and DDL operations.
In another applies example, as shown in Figure 2 b, situation of the destination end in more sources to a destination end synchrodata Under can start multiple recv (reception) process.Wherein, different receiving process is distinguished with src_id, each src_id is corresponding one Different sources.The tgt_id of each source and the src_id of each destination end have corresponding relation.Queue_id is used to distinguish concurrently Load (loading) process.Specifically, when the data increment under user a is big, destination end is activated individually loading process a and specially filled Carry user a data.The data of other users are given other loading process b and loaded.At this moment, just identified with different queue_id To distinguish mounted in process a and mounted in process b.
In an application example, source obtains the log file formats of source database, by parsing source database Journal file, can obtain insert, delete and update etc. the specific form of operation in source database, and increasing can be risked The SQL statement revised, these sentences are organized and then are loaded into target client database.
As shown in Figure 2 c, source database performs the first operation.First operation includes inserting 10 rows record, and source is grabbed The first journal file (log) corresponding to first operation has been taken, and has been gone out according to log file analysis and from first daily record text Transaction Identifier (Xid is extracted in part:0x343), object identity (Objn:0x11), action type (Objd:0x12), operation content (Value:Person name=' a ' where id=1) and line identifier (Rowid:Ad343f ddf), as transaction file send out Destination end is delivered to, destination end obtains SQL statement (being referred to as incremental data block) according to transaction file
" insert into person (' did ', ' did ', 12)
Commit;
Update person name=' a ' where id=1
Commit;”
Destination end indicates that target client database carries out corresponding autoincrementing operation according to the SQL statement, to realize data syn-chronization. The disclosure is different from according to condition being loaded come constructing SQL statement to realize according to where conditions for conventional similar products, but is based on Rowid mode is loaded.Originally the load mode opened is not need major key, and application is significantly more expansive.
Fig. 3 is a kind of block diagram of database data back-up device according to an exemplary embodiment, as shown in figure 3, Described device includes:Generation module 11 and sending module 12.
The generation module 11, for the Transaction Identifier, object identity, operation extracted from the journal file of source database Type, operation content and line identifier, each transaction file is generated in units of affairs;
The sending module 12, for each transaction file to be sent to target client database, with according to each transaction File and mapping table include the operation backed up in synchronization of source database to target client database, the mapping table The corresponding relation of the line identifier of source database and the line identifier of target client database.
Fig. 4 is a kind of block diagram of database data back-up device according to an example of an exemplary embodiment. Label has identical function with Fig. 3 identical components in Fig. 4, for brevity, omits the detailed description to these components. As shown in Figure 4:
In a kind of possible implementation, described device also includes:First initialization module 13
First initialization module 13, for when target client database initializes, by source wide area information server level Not, object rank or the other data of table level are sent to target client database, and generate mapping table in target client database.
Fig. 5 is a kind of block diagram of database data back-up device according to another exemplary embodiment.Such as Fig. 5 institutes State, described device includes:Receiving module 14 and synchronization module 15.
Receiving module 14, each transaction file of source database is come from for receiving, wherein, the transaction file is root According to Transaction Identifier, object identity, action type, operation content and the line identifier extracted from source database log file with thing It is engaged in as unit generation;
Synchronization module 15, for according to the transaction file and mapping table by the operation backed up in synchronization of source database To target client database, the mapping table includes the line identifier of source database and the line identifier of target client database Corresponding relation.
Fig. 6 is a kind of frame of database data back-up device according to an example of another exemplary embodiment Figure.Label has identical function with Fig. 5 identical components in Fig. 6, for brevity, omits to these components specifically It is bright.As shown in Figure 6:Also include:Second initialization module 16.
Second initialization module 16, for when target client database initializes, database to be received from source database Rank, object rank or the other data of table level, and generate mapping table in target client database.
In a kind of possible implementation, the action type includes at least one in DML operations and DDL operations.
Fig. 7 is a kind of block diagram of device for database data backup according to an exemplary embodiment.For example, Device 800 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, cure Treat equipment, body-building equipment, personal digital assistant etc..
Reference picture 7, device 800 can include following one or more assemblies:Processing component 802, memory 804, power supply Component 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of input/output (I/O), sensor cluster 814, and Communication component 816.
The integrated operation of the usual control device 800 of processing component 802, such as communicated with display, call, data, phase The operation that machine operates and record operation is associated.Processing component 802 can refer to including one or more processors 820 to perform Order, to complete all or part of step of above-mentioned method.In addition, processing component 802 can include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 can include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in device 800.These data are shown Example includes the instruction of any application program or method for being operated on device 800, contact data, telephone book data, disappears Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM) are erasable to compile Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 can include power management system System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 800.
Multimedia groupware 808 is included in the screen of one output interface of offer between described device 800 and user.One In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch-screen, to receive the input signal from user.Touch panel includes one or more touch sensings Device is with the gesture on sensing touch, slip and touch panel.The touch sensor can not only sensing touch or sliding action Border, but also detect and touched or the related duration and pressure of slide with described.In certain embodiments, more matchmakers Body component 808 includes a front camera and/or rear camera.When device 800 is in operator scheme, such as screening-mode or During video mode, front camera and/or rear camera can receive outside multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio-frequency assembly 810 is configured as output and/or input audio signal.For example, audio-frequency assembly 810 includes a Mike Wind (MIC), when device 800 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The audio signal received can be further stored in memory 804 or via communication set Part 816 is sent.In certain embodiments, audio-frequency assembly 810 also includes a loudspeaker, for exports audio signal.
I/O interfaces 812 provide interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor cluster 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented Estimate.For example, sensor cluster 814 can detect opening/closed mode of device 800, and the relative positioning of component, for example, it is described Component is the display and keypad of device 800, and sensor cluster 814 can be with 800 1 components of detection means 800 or device Position change, the existence or non-existence that user contacts with device 800, the orientation of device 800 or acceleration/deceleration and device 800 Temperature change.Sensor cluster 814 can include proximity transducer, be configured to detect in no any physical contact The presence of neighbouring object.Sensor cluster 814 can also include optical sensor, such as CMOS or ccd image sensor, for into As being used in application.In certain embodiments, the sensor cluster 814 can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 816 also includes near-field communication (NFC) module, to promote junction service.Example Such as, in NFC module radio frequency identification (RFID) technology can be based on, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuits (ASIC), numeral Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of non-volatile computer readable storage medium storing program for executing is additionally provided, such as including calculating The memory 804 of machine programmed instruction, above computer programmed instruction can be performed above-mentioned to complete by the processor 820 of device 800 Method.
Fig. 8 is a kind of block diagram of device for database data backup according to an exemplary embodiment.For example, Device 1900 may be provided in a server.Reference picture 8, device 1900 include processing component 1922, and it further comprises one Individual or multiple processors, and as the memory resource representated by memory 1932, can be by processing component 1922 for storing The instruction of execution, such as application program.The application program stored in memory 1932 can include one or more every One module for corresponding to one group of instruction.In addition, processing component 1922 is configured as execute instruction, to perform the above method.
Device 1900 can also include a power supply module 1926 and be configured as the power management of performs device 1900, one Wired or wireless network interface 1950 is configured as device 1900 being connected to network, and input and output (I/O) interface 1958.Device 1900 can be operated based on the operating system for being stored in memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
In the exemplary embodiment, a kind of non-volatile computer readable storage medium storing program for executing is additionally provided, such as including calculating The memory 1932 of machine programmed instruction, above computer programmed instruction can be performed by the processing component 1922 of device 1900 to complete The above method.
The disclosure can be system, method and/or computer program product.Computer program product can include computer Readable storage medium storing program for executing, containing for making processor realize the computer-readable program instructions of various aspects of the disclosure.
Computer-readable recording medium can keep and store to perform the tangible of the instruction that uses of equipment by instruction Equipment.Computer-readable recording medium for example can be-- but be not limited to-- storage device electric, magnetic storage apparatus, optical storage Equipment, electromagnetism storage device, semiconductor memory apparatus or above-mentioned any appropriate combination.Computer-readable recording medium More specifically example (non exhaustive list) includes:Portable computer diskette, hard disk, random access memory (RAM), read-only deposit It is reservoir (ROM), erasable programmable read only memory (EPROM or flash memory), static RAM (SRAM), portable Compact disk read-only storage (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical coding equipment, for example thereon It is stored with punch card or groove internal projection structure and the above-mentioned any appropriate combination of instruction.Calculating used herein above Machine readable storage medium storing program for executing is not construed as instantaneous signal in itself, the electromagnetic wave of such as radio wave or other Free propagations, leads to Cross the electromagnetic wave (for example, the light pulse for passing through fiber optic cables) of waveguide or the propagation of other transmission mediums or transmitted by electric wire Electric signal.
Computer-readable program instructions as described herein can be downloaded to from computer-readable recording medium it is each calculate/ Processing equipment, or outer computer or outer is downloaded to by network, such as internet, LAN, wide area network and/or wireless network Portion's storage device.Network can include copper transmission cable, optical fiber is transmitted, is wirelessly transferred, router, fire wall, interchanger, gateway Computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment receive from network to be counted Calculation machine readable program instructions, and the computer-readable program instructions are forwarded, for the meter being stored in each calculating/processing equipment In calculation machine readable storage medium storing program for executing.
For perform the disclosure operation computer program instructions can be assembly instruction, instruction set architecture (ISA) instruction, Machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programming languages The source code or object code that any combination is write, programming language of the programming language including object-oriented-such as Smalltalk, C++ etc., and conventional procedural programming languages-such as " C " language or similar programming language.Computer Readable program instructions fully can on the user computer perform, partly perform on the user computer, be only as one Vertical software kit performs, part performs or completely in remote computer on the remote computer on the user computer for part Or performed on server.In the situation of remote computer is related to, remote computer can pass through network-bag of any kind LAN (LAN) or wide area network (WAN)-be connected to subscriber computer are included, or, it may be connected to outer computer (such as profit Pass through Internet connection with ISP).In certain embodiments, by using computer-readable program instructions Status information carry out personalized customization electronic circuit, such as PLD, field programmable gate array (FPGA) or can Programmed logic array (PLA) (PLA), the electronic circuit can perform computer-readable program instructions, so as to realize each side of the disclosure Face.
Referring herein to the method, apparatus (system) according to the embodiment of the present disclosure and the flow chart of computer program product and/ Or block diagram describes various aspects of the disclosure.It should be appreciated that each square frame and flow chart of flow chart and/or block diagram and/ Or in block diagram each square frame combination, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to all-purpose computer, special-purpose computer or other programmable datas The processor of processing unit, so as to produce a kind of machine so that these instructions are passing through computer or other programmable datas During the computing device of processing unit, work(specified in one or more of implementation process figure and/or block diagram square frame is generated The device of energy/action.These computer-readable program instructions can also be stored in a computer-readable storage medium, these refer to Order causes computer, programmable data processing unit and/or other equipment to work in a specific way, so as to be stored with instruction Computer-readable medium then includes a manufacture, and it is included in one or more of implementation process figure and/or block diagram square frame The instruction of the various aspects of defined function/action.
Computer-readable program instructions can also be loaded into computer, other programmable data processing units or other In equipment so that series of operation steps is performed on computer, other programmable data processing units or miscellaneous equipment, with production Raw computer implemented process, so that performed on computer, other programmable data processing units or miscellaneous equipment Instruct function/action specified in one or more of implementation process figure and/or block diagram square frame.
Flow chart and block diagram in accompanying drawing show the system, method and computer journey of multiple embodiments according to the disclosure Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation One module of table, program segment or a part for instruction, the module, program segment or a part for instruction include one or more use In the executable instruction of logic function as defined in realization.At some as the function of in the realization replaced, being marked in square frame Can be with different from the order marked in accompanying drawing generation.For example, two continuous square frames can essentially be held substantially in parallel OK, they can also be performed in the opposite order sometimes, and this is depending on involved function.It is also noted that block diagram and/or The combination of each square frame and block diagram in flow chart and/or the square frame in flow chart, function or dynamic as defined in performing can be used The special hardware based system made is realized, or can be realized with the combination of specialized hardware and computer instruction.
It is described above the presently disclosed embodiments, described above is exemplary, and non-exclusive, and It is not limited to disclosed each embodiment.In the case of without departing from the scope and spirit of illustrated each embodiment, for this skill Many modifications and changes will be apparent from for the those of ordinary skill in art field.The selection of term used herein, purport Best explaining the principle of each embodiment, practical application or to the technological improvement in market, or make the art its Its those of ordinary skill is understood that each embodiment disclosed herein.

Claims (12)

  1. A kind of 1. database data backup method, it is characterised in that methods described is applied to source, including:
    Transaction Identifier, object identity, action type, operation content and the rower extracted from the journal file of source database Know, each transaction file is generated in units of affairs;
    Each transaction file is sent to target client database, so that destination end is according to each transaction file and mapping relations The operation backed up in synchronization of source database to target client database, the mapping table are included the row of source database by table Mark and the corresponding relation of the line identifier of target client database.
  2. 2. according to the method for claim 1, it is characterised in that also include:
    When target client database initializes, source wide area information server rank, object rank or the other data of table level are sent out Target client database is sent to, and mapping table is generated in target client database.
  3. A kind of 3. database data backup method, it is characterised in that methods described is applied to destination end, including:
    Receive and come from each transaction file of source database, wherein, the transaction file is according to from source database journal What Transaction Identifier, object identity, action type, operation content and the line identifier extracted in file was generated in units of affairs;
    It is described according to the transaction file and mapping table by the operation backed up in synchronization of source database to target client database Mapping table includes the corresponding relation of the line identifier of source database and the line identifier of target client database.
  4. 4. according to the method for claim 3, it is characterised in that also include:
    When target client database initializes, database rank, object rank or the other data of table level are received from source database, And generate mapping table in target client database.
  5. 5. method according to any one of claim 1 to 4, it is characterised in that the action type include DML operation and At least one of in DDL operations.
  6. A kind of 6. database data back-up device, it is characterised in that described device is applied to source, including:
    Generation module, for extracted from the journal file of source database Transaction Identifier, object identity, action type, behaviour Make content and line identifier, each transaction file is generated in units of affairs;
    Sending module, for each transaction file to be sent to target client database, so that destination end is according to each transaction File and mapping table include the operation backed up in synchronization of source database to target client database, the mapping table The corresponding relation of the line identifier of source database and the line identifier of target client database.
  7. 7. device according to claim 6, it is characterised in that also include:
    First initialization module, for when target client database initializes, by source wide area information server rank, object level Not or the other data of table level are sent to target client database, and generate mapping table in target client database.
  8. A kind of 8. database data back-up device, it is characterised in that described device is applied to destination end, including:
    Receiving module, come from each transaction file of source database for receiving, wherein, the transaction file is according to from source Transaction Identifier, object identity, action type, operation content and the line identifier extracted in client database journal file is using affairs to be single Position generation;
    Synchronization module, for according to the transaction file and mapping table by the operation backed up in synchronization of source database to target Client database, the mapping table include the line identifier pass corresponding with the line identifier of target client database of source database System.
  9. 9. device according to claim 8, it is characterised in that also include:
    Second initialization module, for when target client database initializes, database rank, object to be received from source database Rank or the other data of table level, and generate mapping table in target client database.
  10. 10. the device according to any one of claim 6 to 9, it is characterised in that the action type operates including DML At least one of in being operated with DDL.
  11. A kind of 11. database data back-up device, it is characterised in that including:
    Processor;
    For storing the memory of processor-executable instruction;
    Wherein, the processor is configured as:
    Method in perform claim requirement 1 to 5 described in any one.
  12. 12. a kind of non-volatile computer readable storage medium storing program for executing, is stored thereon with computer program instructions, it is characterised in that institute State and method in claim 1 to 5 described in any one is realized when computer program instructions are executed by processor.
CN201710938181.6A 2017-09-30 2017-09-30 database data backup method and device Pending CN107678888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710938181.6A CN107678888A (en) 2017-09-30 2017-09-30 database data backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710938181.6A CN107678888A (en) 2017-09-30 2017-09-30 database data backup method and device

Publications (1)

Publication Number Publication Date
CN107678888A true CN107678888A (en) 2018-02-09

Family

ID=61139556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710938181.6A Pending CN107678888A (en) 2017-09-30 2017-09-30 database data backup method and device

Country Status (1)

Country Link
CN (1) CN107678888A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254870A (en) * 2018-08-01 2019-01-22 华为技术有限公司 The method and apparatus of data backup
CN109634972A (en) * 2018-11-12 2019-04-16 武汉达梦数据库有限公司 A kind of method positioned when data are synchronous using ROWID
CN109933630A (en) * 2019-03-19 2019-06-25 武汉达梦数据库有限公司 Database data real-time synchronization method and equipment
CN110263057A (en) * 2019-06-12 2019-09-20 上海英方软件股份有限公司 A kind of storage/the querying method and device of ROWID mapping table
CN111309740A (en) * 2020-01-16 2020-06-19 中国建设银行股份有限公司 Data processing method, device, equipment and storage medium
WO2021169955A1 (en) * 2020-02-28 2021-09-02 华为技术有限公司 Database replication system and method, and source device and destination device
CN117033083A (en) * 2023-09-28 2023-11-10 武汉吧哒科技股份有限公司 Data backup method, system and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187888A (en) * 2007-12-11 2008-05-28 浪潮电子信息产业股份有限公司 Method for coping database data in heterogeneous environment
CN101719165A (en) * 2010-01-12 2010-06-02 山东高效能服务器和存储研究院 Method for realizing high-efficiency rapid backup of database
CN102375890A (en) * 2011-11-02 2012-03-14 杭州合众信息工程有限公司 Data synchronization method for source terminal table of database without major key
CN103268351A (en) * 2013-05-31 2013-08-28 网易(杭州)网络有限公司 Method and device for data synchronism
CN103345470A (en) * 2013-05-31 2013-10-09 深圳市沃信科技有限公司 Database disaster tolerance method, database disaster tolerance system and server
CN105183581A (en) * 2015-07-23 2015-12-23 深圳市沃信科技有限公司 Database disaster tolerance system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187888A (en) * 2007-12-11 2008-05-28 浪潮电子信息产业股份有限公司 Method for coping database data in heterogeneous environment
CN101719165A (en) * 2010-01-12 2010-06-02 山东高效能服务器和存储研究院 Method for realizing high-efficiency rapid backup of database
CN102375890A (en) * 2011-11-02 2012-03-14 杭州合众信息工程有限公司 Data synchronization method for source terminal table of database without major key
CN103268351A (en) * 2013-05-31 2013-08-28 网易(杭州)网络有限公司 Method and device for data synchronism
CN103345470A (en) * 2013-05-31 2013-10-09 深圳市沃信科技有限公司 Database disaster tolerance method, database disaster tolerance system and server
CN105183581A (en) * 2015-07-23 2015-12-23 深圳市沃信科技有限公司 Database disaster tolerance system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254870A (en) * 2018-08-01 2019-01-22 华为技术有限公司 The method and apparatus of data backup
CN109254870B (en) * 2018-08-01 2021-05-18 华为技术有限公司 Data backup method and device
CN109634972A (en) * 2018-11-12 2019-04-16 武汉达梦数据库有限公司 A kind of method positioned when data are synchronous using ROWID
CN109933630A (en) * 2019-03-19 2019-06-25 武汉达梦数据库有限公司 Database data real-time synchronization method and equipment
CN110263057A (en) * 2019-06-12 2019-09-20 上海英方软件股份有限公司 A kind of storage/the querying method and device of ROWID mapping table
CN110263057B (en) * 2019-06-12 2020-04-17 上海英方软件股份有限公司 Storage and query method and device for ROWID mapping table
CN111309740A (en) * 2020-01-16 2020-06-19 中国建设银行股份有限公司 Data processing method, device, equipment and storage medium
WO2021169955A1 (en) * 2020-02-28 2021-09-02 华为技术有限公司 Database replication system and method, and source device and destination device
CN117033083A (en) * 2023-09-28 2023-11-10 武汉吧哒科技股份有限公司 Data backup method, system and storage medium
CN117033083B (en) * 2023-09-28 2024-01-19 武汉吧哒科技股份有限公司 Data backup method, system and storage medium

Similar Documents

Publication Publication Date Title
CN107678888A (en) database data backup method and device
CN104378441B (en) schedule creation method and device
CN105117207B (en) Photograph album creation method and device
CN106603667A (en) Screen information sharing method and device
KR20160048708A (en) Recognition method and apparatus for communication message
CN106875157A (en) Meeting treating method and apparatus
CN103927081A (en) Method and device for processing notification events
CN107729522A (en) Multimedia resource fragment intercept method and device
CN108259991A (en) Method for processing video frequency and device
CN104240068A (en) Method and device for creating reminding event
CN105354284B (en) Processing method and processing device, short message recognition methods and the device of template
US10755344B2 (en) System framework processor for channel contacts
CN104951935A (en) Bill splitting method and device
CN105068976A (en) Ticket information exhibition method and device
CN107797741A (en) Method for showing interface and device
CN107895190A (en) The weights quantization method and device of neural network model
CN106991018A (en) The method and device of changing an interface skin
CN106897399A (en) Character displaying method and device
CN107122430A (en) Search result display methods and device
CN106873994A (en) Interface display method and device
CN108259974A (en) Video matching method and device
US9747175B2 (en) System for aggregation and transformation of real-time data
US10664457B2 (en) System for real-time data structuring and storage
CN109388423A (en) Method for upgrading software and device
CN105243051A (en) Creation method, extraction method and apparatus for hotel order short message template

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

Application publication date: 20180209

RJ01 Rejection of invention patent application after publication