Method and device for recovering data snapshot

A data and snapshot technology, applied in the database field, can solve problems such as unrecoverable database snapshots

Active Publication Date: 2017-05-03
ZTE CORP
View PDF5 Cites 38 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The present invention provides a method and device for recovering data snapshots, to at least solve the problem in the related art that the database snapshots at the historical moment of distributed database recovery cannot recover database snapshots at any specified time and satisfy global transaction consistency

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
  • Method and device for recovering data snapshot
  • Method and device for recovering data snapshot
  • Method and device for recovering data snapshot

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0073] In this optional embodiment, taking the MariaDB distributed system as an example, the steps of the method for obtaining a consistent snapshot of database data include: the initial basic data generation process includes steps S201 to S203, and the database snapshot at a specified time t7 is restored based on the initial basic data The steps include step S204 to step S211.

[0074] Step S201, start the distributed database and management program (ClusterManager, GTM). The time point is t0. From time t0, ClusterManager periodically obtains snapshots of the active transaction list from GTM, writes them into files, and persists them.

[0075] Step S202, at time t1, the Cluster Manager initiates a backup request to the database nodes respectively according to the backup strategy and the result file of the last backup. The backup end time of node 1 is t3, the backup end time of node 2 is t4, and the backup end time of node 3 is The end time is t5. After the backup ends, each ...

Embodiment 2

[0087] The application scenario of this optional embodiment is: disaster recovery of online payment system based on MySQL distributed cluster database;

[0088] In this optional embodiment, a physical hot backup tool is used to back up single-node data, ClusterManager regularly obtains snapshots of active transaction list data from GTM, and archives binlog logs on a daily basis. When recovering, obtain single-node backup data, binlog logs and active transaction list snapshots, perform recovery, rollback and redo operations, so as to obtain database snapshots with global transaction consistency at the specified time or backup time without affecting the online operation of large amounts of data The payment system operates normally, and the steps in this optional embodiment include:

[0089] Step S301, start the distributed database and management program (ClusterManager, GTM). The time point is t0. From time t0, ClusterManager periodically obtains snapshots of the active transac...

Embodiment 3

[0104] Single data table recovery based on MariaDB distributed cluster database user savings system

[0105]In an optional embodiment, a physical hot backup tool is used to back up single-node data, ClusterManager regularly obtains snapshots of active transaction list data from GTM, and archives binlog logs on a daily basis. When recovering, obtain single-node backup data, binlog logs, and active transaction list snapshots, and perform recovery, rollback, and redo operations, so as to obtain a database snapshot of global transaction consistency at the moment before the operation and maintenance personnel accidentally delete the data table. Using this snapshot, the accidentally deleted data table can be exported and imported into the online system manually. The specific steps are as follows.

[0106] Step S401, start the distributed database and management program (ClusterManager, GTM). The time point is t0. From time t0, ClusterManager periodically obtains snapshots of the ac...

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 provides a method and a device for recovering data snapshot. The method comprises the following steps: recovering the data of each node connected to a cluster manager into data at the moment that the mostly recent physical backup is finished before an appointed moment by the cluster manager in a distributed database; reworking operations indicated by transactions in a transaction log according to the sequence of execution time of the transactions in the transaction log based on the data at the moment that the mostly recent physical backup is finished by the cluster manager so as to obtain the data snapshot of each node at the appointed moment, wherein the transaction log comprises operation for the data achieved between the moment that the mostly recent physical backup is finished and the appointed moment. According to the method and the device, the problem that database snapshot meeting the consistency of global transaction at any appointed moment cannot be recovered due to the database snapshot at the recovery history moment of the distributed database in the prior art is solved.

Description

technical field [0001] The invention relates to the field of databases, in particular to a data snapshot recovery method and device. Background technique [0002] At present, the mainstream databases in the industry are stand-alone databases (Oracle, DB2, MySQL, etc.), and with the expansion of data volume, stand-alone databases are increasingly unable to meet users' needs for large storage and high performance, and the application of distributed databases has gradually become widespread. . [0003] In related technologies, there are two main schemes for recovering database snapshots at historical moments in distributed databases: [0004] Solution 1: Use a backup tool on a single node for logical backup and recovery or directly perform disk image backup and archive transaction logs daily. After using the backup data to restore the backup data of each node, each node uses the transaction log to redo to the specified time. [0005] The problems of the first solution are: (...

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): G06F11/14G06F17/30
CPCG06F11/14
Inventor 汪彦舒陈河堆贾新华白涛郭龙波张宗禹
Owner ZTE CORP
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