Data flashback method and apparatus for database

A database and data technology, applied in the database field, can solve the problems of long time, low database recovery efficiency, and recovery time affecting users' access to the database, etc., and achieve the effect of high recovery efficiency and short time

Inactive Publication Date: 2017-03-29
BEIJING QIHOO TECH CO LTD +1
View PDF5 Cites 27 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, it takes a long time to recover from the previous day's database backup, and it needs to re-execute the operation between the backup time and the misoperation time, which also takes a long time
Therefore, the recovery efficiency of the database in the prior art is low and the time is long, especially for many online application services, the long recovery time will greatly affect the user's access to the database

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data flashback method and apparatus for database
  • Data flashback method and apparatus for database
  • Data flashback method and apparatus for database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0060] Reference figure 1 , Shows a flowchart of the steps of a method for flashback of database data provided in the first embodiment of the present invention, which may specifically include:

[0061] Step S110: Receive a data recovery request; the data recovery request includes the first time corresponding to the misoperation of the database.

[0062] The embodiments of the present invention can be applied to restore data or tables for database misoperation. The database misoperation can be that a certain table in the database is deleted by mistake, or the data in a certain table is deleted by mistake, or some data is mistakenly added to the wrong table, etc. The embodiment of the present invention can be applied to a MySQL database.

[0063] Of course, the system structure of the embodiment of the present invention may include the architecture of a back-end database server and various front-end application service servers. Each application business developer can deploy their app...

Embodiment 2

[0124] Reference figure 2 , Shows a flowchart of the steps of a method for flashback of database data provided in the second embodiment of the present invention, which may specifically include:

[0125] Step S210: Receive a data recovery request; the data recovery request includes the first time corresponding to the misoperation of the database.

[0126] Step S220: Start a first process, the first process simulates the slave library of the database, and informs the database to return the operation record log corresponding to the misoperation part at the first time.

[0127] In the embodiment of the present invention, after receiving the data recovery request, the first process is started, and the first process simulates the slave database of the database according to the protocol of the master database (Master) and the database slave database (Slave) to slave the database The main library obtains the operation record log corresponding to the first misoperation part.

[0128] The slav...

Embodiment 3

[0143] Reference image 3 , Shows a schematic structural diagram of a database data flashback device provided in the third embodiment of the present invention, which may specifically include:

[0144] The recovery request receiving module 310 is adapted to receive a data recovery request; the data recovery request includes the first time corresponding to the misoperation of the database;

[0145] The operation record log obtaining module 320 is adapted to obtain the operation record log corresponding to the misoperation part of the first time from the operation record log of the database; the operation record log records non-query operations on the database in a row format ;

[0146] The parsing module 330 is adapted to analyze each line of operation corresponding to the misoperation from the operation record log;

[0147] The reverse operation module 340 is adapted to perform a reverse operation corresponding to the misoperation on the database starting from the last line of each lin...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a data flashback method and apparatus for a database, and relates to the technical field of the database. The method comprises the steps of receiving a data recovery request, wherein the data recovery request comprises first time corresponding to a misoperation of the database; obtaining an operation record log of a misoperation part corresponding to the first time from operation record logs of the database, wherein the operation record log records non-inquiring operations on the database based on formats; analyzing operations in each line corresponding to the misoperation from the operation record log; and performing reverse operation corresponding to the misoperation on the database from the last line of the operations corresponding to the misoperation. The data flashback method and apparatus achieve the beneficial effects of relatively short use time, high recovery efficiency, and capability of effectively reducing influence on database visit by a user caused by relatively long recovery time.

Description

Technical field [0001] The invention relates to the technical field of databases, in particular to a method and device for flashback of database data. Background technique [0002] Database is a warehouse that organizes, stores and manages data according to data structure. There are many types of databases, from the simplest tables that store various data to large-scale database systems that can store massive amounts of data. They have been widely used in all aspects. [0003] At present, many businesses use databases. For example, there is an architecture where each application business service of the front-end server performs data management operations on the database corresponding to the application service in the back-end server, such as query, update, delete, modify, etc. . The front-end application business service technicians may have misoperations when operating the above-mentioned database. For example, when deleting, they should set a deletion condition, such as deletin...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/1734G06F16/1815G06F16/211G06F16/215
Inventor 刘臻
Owner BEIJING QIHOO TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products