JP7108782B2 - DATA RECOVERY METHOD, APPARATUS, SERVER AND COMPUTER PROGRAM - Google Patents

DATA RECOVERY METHOD, APPARATUS, SERVER AND COMPUTER PROGRAM Download PDF

Info

Publication number
JP7108782B2
JP7108782B2 JP2021506468A JP2021506468A JP7108782B2 JP 7108782 B2 JP7108782 B2 JP 7108782B2 JP 2021506468 A JP2021506468 A JP 2021506468A JP 2021506468 A JP2021506468 A JP 2021506468A JP 7108782 B2 JP7108782 B2 JP 7108782B2
Authority
JP
Japan
Prior art keywords
backup
data
recovery
data packet
data recovery
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.)
Active
Application number
JP2021506468A
Other languages
Japanese (ja)
Other versions
JP2021533495A (en
Inventor
リ,ハイシアン
Original Assignee
テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド
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 テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド filed Critical テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド
Publication of JP2021533495A publication Critical patent/JP2021533495A/en
Application granted granted Critical
Publication of JP7108782B2 publication Critical patent/JP7108782B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • 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/1474Saving, restoring, recovering or retrying in transactions
    • 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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous replication or reconciliation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

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)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Retry When Errors Occur (AREA)

Description

本出願は2018年11月30日に中国専利局に提出した、出願番号が2018114571961であり、発明の名称が「データリカバリー方法、装置、サーバ及び記憶媒体」である中国特許出願の優先権を主張し、その全ての内容は援用により本出願に結合される。 This application claims the priority of the Chinese Patent Application entitled "Data Recovery Method, Apparatus, Server and Storage Medium" with application number 2018114571961 filed with the Chinese Patent Office on November 30, 2018 , the entire contents of which are incorporated into this application by reference.

本出願は、データベース技術の分野に関し、特に、データリカバリー方法、装置、サーバ及びコンピュータ読み取り可能な記憶媒体に関する。 The present application relates to the field of database technology, and more particularly to data recovery methods, devices, servers and computer readable storage media.

データ処理システムにおいて、特に、OLAP(Online Analytical Processing、オンライン分析処理)システム、データウェアハウス、ビッグデータ分析などのシナリオにおいて、データベースに大量のデータを保存することに係る。サービスは常に更新される可能性があるため、一つのデータ項目には複数の状態に対応するバージョンデータを論理的に含む。このように、一つのデータ項目の全状態(現在状態、遷移状態及び履歴状態)のデータが保存されることで、システムが履歴データを追跡し、データの価値(いずれのデータも価値があるため、履歴状態のデータが紛失不可)を十分に発掘することに寄与する。ただし、データベースは、バックアップデータに基づくリカバリープロセスにも係る可能性があり、前記複数の状態データを含むバックアップデータ間の関係が複雑であるため、全状態データをリカバリーすることは大きな挑戦である。 Storing large amounts of data in databases in data processing systems, especially in scenarios such as OLAP (Online Analytical Processing) systems, data warehouses, and big data analysis. Since the service may be constantly updated, one data item logically contains version data corresponding to multiple states. By storing data for all states (current state, transition state and history state) of one data item in this way, the system can track historical data and determine the value of the data (because all data are valuable). , historical state data cannot be lost). However, a database may also be subject to a recovery process based on backup data, and recovering the entire state data is a significant challenge due to the complex relationships between the backup data containing said plurality of state data.

本出願の各実施例によれば、データリカバリー方法、装置、サーバ及び記憶媒体を提供する。 According to each embodiment of the present application, a data recovery method, apparatus, server and storage medium are provided.

データリカバリー方法であって、サーバによって実行され、
バックアップデータパケットのバックアップタイプを認識するステップと、
認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うステップと、
前記物理バックアップのデータに基づいてデータリカバリーを完了した後に、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップとを含み、
前記ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むことを指す。
A data recovery method, executed by a server,
recognizing the backup type of the backup data packet;
performing data recovery based on physical backup data in the backup data packet when the recognized backup type is hybrid backup;
After completing data recovery based on the physical backup data, performing data recovery on the logical backup data in the backup data packet;
The hybrid backup refers to including physical backup and logical backup in the backup process.

好ましく、前記バックアップデータパケットのバックアップタイプを認識するステップは、
前記バックアップデータパケットにおけるファイル名に基づいて、前記ファイル名に対応するバックアップタイプを取得するサブステップと、又は、
前記バックアップデータパケットに担持されているタイプ識別子に基づいて、前記タイプ識別子に対応するバックアップタイプを取得するサブステップとを含む。
Preferably, the step of recognizing the backup type of the backup data packet comprises:
a substep of obtaining a backup type corresponding to the file name based on the file name in the backup data packet; or
and obtaining a backup type corresponding to said type identifier based on a type identifier carried in said backup data packet.

データリカバリー装置であって、
バックアップデータパケットのバックアップタイプを認識するための認識モジュールと、
認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うデータリカバリーモジュールとを含み、
前記ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むことを指し、
前記データリカバリーモジュールは、さらに、前記物理バックアップのデータに基づいてデータリカバリーを完了した後に、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うために用いられる。
A data recovery device,
a recognition module for recognizing a backup type of a backup data packet;
a data recovery module that performs data recovery based on physical backup data in the backup data packet when the recognized backup type is hybrid backup;
The hybrid backup refers to including a physical backup and a logical backup in the backup process,
The data recovery module is further used to perform data recovery on logical backup data in the backup data packet after completing data recovery based on the physical backup data.

サーバであって、プロセッサー及びメモリを含み、当該メモリに少なくとも一つのコマンドが記憶され、前記したようなデータリカバリー方法による操作が実現されるように当該少なくとも一つのコマンドが当該プロセッサーによってロードされて実行される。 A server, comprising a processor and a memory, in which at least one command is stored, the at least one command being loaded and executed by the processor so as to realize operation according to the data recovery method as described above. be done.

コンピュータ読み取り可能な記憶媒体であって、当該記憶媒体に少なくとも一つのコマンドが記憶され、前記したようなデータリカバリー方法による操作が実現されるように当該少なくとも一つのコマンドが当該プロセッサーによってロードされて実行される。 A computer readable storage medium having stored thereon at least one command, the at least one command being loaded and executed by the processor to effectuate operation according to the data recovery method as described above. be done.

本出願の一つ又は複数の実施例の詳細は、以下の添付の図面及び説明において提供される。本出願の他の特徴、目的、及び利点は、明細書、添付図面、及び特許請求の範囲の記載により明瞭にする。 The details of one or more embodiments of the application are provided in the accompanying drawings and description below. Other features, objects, and advantages of the present application will become apparent from the description, accompanying drawings, and claims.

本出願の実施例に係るデータリカバリー方法の応用環境の模式図である。1 is a schematic diagram of an application environment of a data recovery method according to an embodiment of the present application; FIG. 本出願の実施例に係るデータリカバリー方法のフローチャートである。4 is a flowchart of a data recovery method according to an embodiment of the present application; 本出願の実施例に係るページ比較図である。FIG. 4 is a page comparison diagram according to an embodiment of the present application; 本出願の実施例に係るデータリカバリー装置の構成模式図である。1 is a structural schematic diagram of a data recovery device according to an embodiment of the present application; FIG. 本出願の実施例に係るサーバの構成模式図である。1 is a structural schematic diagram of a server according to an embodiment of the present application; FIG.

本出願の目的、技術案及び利点をより明確にするために、以下は、添付の図面に基づいて、本出願の実施形態をより詳細に説明する。 In order to make the objectives, technical solutions and advantages of the present application clearer, the following describes the embodiments of the present application in more detail based on the accompanying drawings.

本出願の実施例に係るデータベースには、データ項目を記憶するための複数のデータテーブルが記憶され、データ項目は1つ又は複数のバージョンを有してもよい。なお、当該データベースは、MVCC(Multi-Version Concurrency Control、マルチバージョン同時並行性制御)に基づく任意のタイプのデータベースであってもよい。本出願の実施例において、当該データベースのタイプは具体的に限定していない。なお、前記のデータベースにおけるデータは、状態属性に応じて、現在状態、遷移状態及び履歴状態の3つの状態を含み、当該3つの状態をまとめて「データの全状態」と称し、全状態データと略称し、全状態データにおける異なる状態属性のそれぞれはデータのライフサイクルの軌跡における状態を表記することに使用できる。 A database according to embodiments of the present application may store multiple data tables for storing data items, which may have one or more versions. Note that the database may be any type of database based on MVCC (Multi-Version Concurrency Control). In the embodiments of the present application, the type of database is not specifically limited. The data in the database includes three states, the current state, the transition state, and the history state, depending on the state attribute. Shorthand, each of the different state attributes in the total state data can be used to represent a state in the data's lifecycle trajectory.

現在状態(Current State)は、データ項目の最新バージョンのデータであって、現段階にあるデータである。現段階にあるデータの状態は、現在状態と呼ばれる。 The Current State is the latest version of the data for the data item, which is the data in the current stage. The current state of the data is called the current state.

遷移状態(Transitional State)は、データ項目の最新バージョンでもなければ、履歴状態バージョンでもなく、現在状態から履歴状態への遷移過程にあり、遷移状態にあるデータは、半減データと呼ばれる。 A transitional state is neither the latest version nor the historical state version of a data item, but is in the process of transitioning from the current state to the historical state, and the data in the transitional state is called halved data.

履歴状態(Historical state)は、履歴におけるデータ項目の1つの状態であり、その値は現在値ではなく、古い値である。履歴段階にあるデータの状態は、履歴状態と呼ばれる。1つのデータ項目の履歴状態は複数を有してもよく、データの状態の遷移過程が反映される。履歴状態にあるデータは、読み取りのみが可能であり、変更又は削除は許容されない。 Historical state is a state of a data item in history whose value is the old value rather than the current value. The state of data in the history stage is called the history state. A single data item may have a plurality of history states, and the data state transition process is reflected. Data in the history state can only be read and cannot be modified or deleted.

なお、データは、MVCCメカニズムにおいて、前記3つの状態が存在し、非MVCCメカニズムにおいて、履歴状態及び現在状態のみ存在してもよい。MVCC又はロック同時アクセス制御メカニズムにおいて、トランザクションが提出されたデータの新値は現在状態にある。MVCCメカニズムを例として、現在アクティブなトランザクションリストにおける最小のトランザクションの前のトランザクションによって生成されたデータは、その状態が履歴状態にある。ロック同時アクセス制御メカニズムにおいては、トランザクションが提出されると、その提出前のデータの値が履歴状態の値になり、即ち、データ項目の古い値が履歴状態にある。読み取られたバージョンにおいてまだアクティブなトランザクション(最新の関連トランザクションではない)が使用されるが、最新の関連トランザクションはデータ項目の値が変更され、その最新の値が既に現在状態にあり、読み取られた値が現在状態に対して履歴状態にある。よって、そのデータ状態は現在状態と履歴状態との間にあるため、遷移状態と称される。 Data may exist in the three states in the MVCC mechanism, and may exist in only the history state and the current state in the non-MVCC mechanism. In an MVCC or locked concurrent access control mechanism, the new value of the data submitted by the transaction is in the current state. Taking the MVCC mechanism as an example, the data generated by the transaction before the smallest transaction in the currently active transaction list is in the history state. In the locked concurrent access control mechanism, when a transaction is submitted, the value of the data before its submission becomes the value of the history state, ie the old value of the data item is in the history state. A transaction that is still active in the read version (not the most recent related transaction) is used, but the most recent related transaction has changed the value of the data item and its most recent value is already in the current state and has been read The value is in the historical state relative to the current state. Its data state is therefore called a transitional state because it lies between the current state and the historical state.

例えば、MVCCメカニズムにおいて、UserテーブルのAアカウントの残高は、10元から20元にチャージされ、そして、15元が消費されて5元になる。この場合、金融機関Bは、データを読み取ってトランザクションをチェックすることを常に行っている。その後、Aはさらに20元をチャージして25元になる。この25元は、現在状態データであり、Bにより読み取られた5元は遷移状態にあり、残りの2つの値である20、10のそれぞれは、過去に存在していた状態であり、履歴状態データである。 For example, in the MVCC mechanism, the balance of the A account in the User table is charged from 10 yuan to 20 yuan, and 15 yuan is consumed to become 5 yuan. In this case, financial institution B is constantly reading the data to check the transaction. After that, A charges another 20 yuan to 25 yuan. The 25 elements are the current state data, the 5 elements read by B are in the transition state, and the remaining two values, 20 and 10, respectively, are the states that existed in the past and the historical states. Data.

好ましくは、本実施例において、前記データリカバリー方法は、図1に示される複数のサーバ101を含むハードウェア環境に適用され得る。図1に示すように、複数のサーバ101はネットワークを介して接続したり、データが分離されたりすることができる。前記ネットワークは、広域ネットワーク、メトロポリタンエリアネットワーク又はローカルエリアネットワークを含むが、これらに限定されない。本出願の実施例に係るデータリカバリー方法は、いずれかのサーバ101又は複数のサーバ101によって実行され得る。サーバ101においては、データベースシステムが動作することができる。これにより、例えば、データ記憶、データ照合などのデータサービスを提供することができる。当該データベースシステムは、サーバにおいて動作させられるデータベースエンジンにより作動することができる。 Preferably, in this embodiment, the data recovery method can be applied to a hardware environment including multiple servers 101 shown in FIG. As shown in FIG. 1, multiple servers 101 can be connected via a network and data can be separated. The networks include, but are not limited to, wide area networks, metropolitan area networks or local area networks. A data recovery method according to embodiments of the present application can be performed by any server 101 or multiple servers 101 . A database system can operate in the server 101 . This makes it possible, for example, to provide data services such as data storage and data collation. The database system can be operated by a database engine running on a server.

本出願の実施例にかかるデータリカバリー方法のフローチャートは、図2に示すように、当該実施例は、具体的に以下のステップを含む。 A flowchart of the data recovery method according to an embodiment of the present application is shown in FIG. 2, and the embodiment specifically includes the following steps.

201において、バックアップデータパケットにおけるファイル名に応じて、バックアップタイプを認識する。 At 201, the backup type is recognized according to the filename in the backup data packet.

バックアップタイプによって、生成されたバックアップデータパケットにおけるファイルのファイル名が異なるため、バックアップデータパケットにおけるファイル名に基づいて当該バックアップデータパケットのバックアップタイプを認識することができ、その後、当該バックアップタイプに基づいて、異なったバックアップタイプにより、対応するデータリカバリーフローを行うことができる。他の実施形態においては、バックアップタイプの認識は、バックアップデータパケットに含まれるタイプ識別子を認識することにより行われる。即ち、当該バックアップデータパケットに担持されているタイプ識別子により、対応するバックアップタイプを取得する。当該タイプ識別子は、バックアップデータパケットにおける1つの指定ファイルに含まれてもよく、バックアップデータパケットのパケット名に担持されてもよい。本出願の実施例において、それを具体的に限定しない。なお、前記のタイプ識別子は、例えば、番号、文字列などのバックアップタイプを示すためのフィールドであってもよい。 Depending on the backup type, the file name of the file in the generated backup data packet will be different, so the backup type of the backup data packet can be recognized based on the file name in the backup data packet, and then based on the backup type , according to different backup types, corresponding data recovery flow can be carried out. In another embodiment, backup type recognition is performed by recognizing a type identifier included in the backup data packet. That is, the corresponding backup type is obtained according to the type identifier carried in the backup data packet. The type identifier may be included in one designated file in the backup data packet and may be carried in the packet name of the backup data packet. The examples of the present application do not specifically limit it. It should be noted that the type identifier may be, for example, a field for indicating the backup type such as a number or a character string.

ファイル名に基づくタイプ認識の例として、異なったバックアップタイプのバックアッププロセスによってそれぞれ得られたバックアップデータパケットに含まれるデータやファイル名が異なった。その例示、以下通りである。 As an example of file name based type recognition, the data and file names contained in the backup data packets respectively obtained by the backup processes of different backup types were different. Examples are as follows.

物理バックアップにより得られたバックアップデータパケットには、現在状態データのみがあり、履歴状態データ又は遷移状態データがない。物理的にバックアップにより得られたバックアップデータパケットにおけるファイルのファイル名は、物理的バックアップにより得られたバックアップデータパケットにおけるファイルのファイル名には、物理的バックアップを示すためのフィールドが担持され得る。例えば、ファイル名は、PhMeta_00000001、PhData_00000001、Log_00000001などであってもよい。 A backup data packet obtained by physical backup has only current state data and no history state data or transition state data. The filename of the file in the backup data packet obtained by physical backup may carry a field for indicating the physical backup. For example, the file names may be PhMeta_00000001, PhData_00000001, Log_00000001, and so on.

論理バックアップにより得られたバックアップデータパケットは、現在状態データ、履歴状態データ及び遷移状態データを含む全状態データを含んでも良い。論理バックアップにより得られたバックアップデータパケットにおけるファイルのファイル名には、論理バックアップを示すためのフィールドが担持され得る。例えば、ファイル名は、LoMeta_00000001、LoData_00000001、HMeta_00000001、HData_00000001などであってもよい。 A backup data packet obtained by a logical backup may contain all state data including current state data, historical state data and transition state data. The file name of the file in the backup data packet obtained by the logical backup may carry a field to indicate the logical backup. For example, the file names may be LoMeta_00000001, LoData_00000001, HMeta_00000001, HData_00000001, and so on.

ハイブリッドバックアップは、論理バックアップ及び物理バックアップの混合によって得られたバックアップデータパケットであり、全状態データ(即ち、現在の状態データ、履歴状態データ及び遷移状態データを含む)であっても良い。ハイブリッドバックアップによって得られたバックアップデータパケットにおけるファイルのファイル名には、ハイブリッドバックアップを示すためのフィールドが担持され得、例えば、ファイル名は、Meta_00000001、Data_00000001、Log_00000001、HMeta_00000001、HData_00000001などであってもよい。 A hybrid backup is a backup data packet obtained by mixing logical backup and physical backup, and may be full state data (ie, including current state data, historical state data and transition state data). The filenames of the files in the backup data packet obtained by hybrid backup may carry a field to indicate the hybrid backup, for example, the filenames may be Meta_00000001, Data_00000001, Log_00000001, HMeta_00000001, HData_00000001, etc. .

202において、認識されたバックアップタイプが論理バックアップである場合には、当該バックアップデータパケットのメタ情報ファイルに基づいて、ターゲットライブラリにおいてテーブルを作成するようにデータリカバリーを行う。 At 202, if the recognized backup type is logical backup, data recovery is performed to create a table in the target library based on the meta information file of the backup data packet.

論理バックアップの場合には、バックアップデータパケットにおけるデータは、現在状態時点の値、履歴状態時点の値及び全状態時間帯の値であってもよく、これらの値のそれぞれは、異なったスナップショットのバックアッププロセスにより得られたものである。 In the case of a logical backup, the data in the backup data packet may be the current state point-in-time value, the historical state point-in-time value, and the total state window value, each of which represents a different snapshot. It was obtained by a backup process.

第1のリカバリープロセスでは、バックアップデータパケットはノーマルトランザクションスナップショットに基づいて論理バックアップを行うことで得られたものであり、このようなタイプのバックアップのリカバリーについては、そのリカバリープロセスは以下のことを含む。即ち、バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取り、当該テーブルファイルのメタ情報に基づいてターゲットライブラリにテーブルを作成し、ターゲットライブラリに同名のテーブルが存在する場合、リカバリーに失敗し、その後、挿入操作(例えば、INSERT操作)を実行してデータリカバリーを行う。なお、このようなデータリカバリーは、「運行状態論理リカバリー」のみをサポートする。 In the first recovery process, the backup data packets were obtained by performing logical backups based on normal transaction snapshots, and for recovery of such type of backup, the recovery process: include. That is, the meta information of the table file is read from the meta information file of the backup data packet, and a table is created in the target library based on the meta information of the table file. If a table with the same name exists in the target library, recovery fails. and then perform an insert operation (for example, an INSERT operation) to perform data recovery. It should be noted that such data recovery only supports "running state logic recovery".

第2のリカバリープロセスでは、バックアップデータパケットは、履歴トランザクションスナップショットに基づいて論理バックアップを行うことで得られたものであり、バックアップデータパケットに履歴状態及び遷移状態のバックアップデータを含む。このようなバックアップのリカバリーについては、リカバリーのプロセスは以下のことを含む。即ち、バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取り、ターゲットライブラリに同名のテーブルが存在しない場合、当該テーブルファイルのメタ情報に基づいてターゲットライブラリにおいてテーブルを作成し、その後、挿入操作(例えば、INSERT操作)を実行してデータリカバリーを行う。一方、ターゲットライブラリに同名のテーブルが存在する場合、テーブルの作成を行わず、データリカバリーのみを行う。好ましい実施形態において、当該ターゲットライブラリにおいて当該同名のテーブルにリカバリーすべきデータと同じデータが存在する場合、リカバリーに失敗し、当該ターゲットライブラリにおいて当該同名のテーブルにリカバリーすべきデータと同じデータが存在しない場合、当該リカバリーすべきデータに基づいてリカバリーする(例えば、リカバリーを強制的に実行する)。なお、主キーインデックスにより当該ターゲットライブラリにおいて同名のテーブルにリカバリーすべきデータと同じデータが存在するか否かをチェックし、リカバリーすべきデータの主キーインデックスと同じ主キーインデックスが存在する場合、リカバリーすべきデータと同じデータが存在していることを意味し、リカバリーに失敗した。一方、ターゲットライブラリにおいて同名のテーブルに当該主キーインデックスが存在しない場合、当該リカバリーすべきデータに基づいてリカバリーする。なお、このようなデータリカバリーは、「運行状態論理リカバリー」のみをサポートする。さらに、権限を区分するデータベースシステムにおいて、当該データリカバリーは、スーパーユーザー(Super User、最も権限のあるローカルユーザー)に限って行われる。 In a second recovery process, the backup data packets are obtained by performing a logical backup based on the historical transaction snapshots, and include historical and transition state backup data in the backup data packets. For recovery of such backups, the recovery process includes: That is, read the meta information of the table file from the meta information file of the backup data packet, and if the table with the same name does not exist in the target library, create the table in the target library based on the meta information of the table file, and then insert Perform data recovery by performing an operation (eg, an INSERT operation). On the other hand, if a table with the same name exists in the target library, only data recovery is performed without creating the table. In a preferred embodiment, if the table with the same name in the target library contains the same data as the data to be recovered, the recovery fails, and the table with the same name in the target library does not contain the same data as the data to be recovered. In this case, recovery is performed based on the data to be recovered (for example, recovery is forcibly executed). By using the primary key index, it is checked whether or not the same data as the data to be recovered exists in the table with the same name in the target library. It means that the same data as the data that should have existed, and recovery failed. On the other hand, if the primary key index does not exist in the table with the same name in the target library, recovery is performed based on the data to be recovered. It should be noted that such data recovery only supports "running state logic recovery". Furthermore, in privilege-separating database systems, the data recovery is limited to Super User (the local user with the most privileges).

第3のリカバリープロセスであって、バックアップデータパケットは、履歴トランザクションスナップショット及びノーマルトランザクションスナップショットに基づいて論理バックアップを行うことで得られたものであり、バックアップデータパケットには現在状態、履歴状態及び遷移状態のバックアップデータを含む。このようなバックアップのリカバリーは、そのリカバリープロセスに前記の第1のリカバリープロセスと第2のリカバリープロセスを含むことができ、即ち、当該ノーマルトランザクションスナップショット及び当該履歴トランザクションスナップショットに対応するデータリカバリー方式を組み合わせてデータリカバリーを行い、データリカバリーを行う場合、リカバリー効率を向上するために、同名のテーブルのチェックを繰り返す必要がなく、同名のテーブルを1回チェックするだけで済む。 A third recovery process, wherein the backup data packets are obtained by performing a logical backup based on the historical transaction snapshot and the normal transaction snapshot, and the backup data packets include the current state, the historical state and Contains transition state backup data. Recovery of such a backup can include the first recovery process and the second recovery process in its recovery process, namely, data recovery methods corresponding to the normal transaction snapshot and the historical transaction snapshot. When data recovery is performed by combining , there is no need to repeatedly check tables with the same names in order to improve recovery efficiency, and tables with the same names need only be checked once.

前記の当該ノーマルトランザクションスナップショット及び当該履歴トランザクションスナップショットに対応するデータリカバリー方式を組み合わせてデータリカバリーを行うことは、
バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取り、テーブルファイルのメタ情報に基づいてターゲットライブラリにおいてテーブルを作成し、テーブルに対して挿入操作を実行して、バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うこと、又は、
バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取り、ターゲットライブラリに同名のテーブルが存在しない場合、テーブルファイルのメタ情報に基づいてターゲットライブラリにおいてテーブルを作成し、挿入操作を実行してデータリカバリーを行い、ターゲットライブラリに同名のテーブルが存在する場合、同名のテーブル挿入操作を実行してデータリカバリーを行うことを含む。
Performing data recovery by combining data recovery methods corresponding to the normal transaction snapshot and the historical transaction snapshot
Read the table file meta information from the backup data packet meta information file, create a table in the target library based on the table file meta information, perform an insert operation on the table, and perform a logical backup in the backup data packet to perform data recovery on the data of
Read the meta information of the table file from the meta information file of the backup data packet. If the table with the same name does not exist in the target library, create the table in the target library based on the meta information of the table file and execute the insert operation. If data recovery is performed and a table with the same name exists in the target library, it includes executing a table insertion operation with the same name to perform data recovery.

なお、前記プロセスにおいて、テーブルの作成はオプションのステップであり、リカバリーコマンドにおいてパラメータにてテーブルの作成ステップを行うか否かを指定可能、例えば、RECOVERYコマンドにおいて、パラメータ「CREATE TABLE=Y/N」により指定し、Yは、作成を示し、Nは、非作成を示す。 In the above process, table creation is an optional step, and it is possible to specify whether to perform the table creation step with a parameter in the recovery command. For example, in the RECOVERY command, the parameter "CREATE TABLE=Y/N" can be specified. where Y indicates production and N indicates non-production.

単に論理バックアップによって得られたバックアップデータパケットは、前記の技術的プロセスを利用してリカバリーを個別に行うことができる。ただし、ハイブリッドバックアップのバックアップデータパケットには、論理バックアップを利用してバックアップしたデータも含み、このようなデータのリカバリーは、潜んでいる論理データリカバリーであり、そのリカバリー原理は同様である。 Backup data packets obtained simply by logical backup can be individually recovered using the above technical process. However, the backup data packet of the hybrid backup also includes the data backed up using the logical backup, and the recovery of such data is latent logical data recovery, and the recovery principle is the same.

好ましく、データリカバリーの効率を向上するために、複数のテーブルに対してデータリカバリーを行う場合に、マルチスレッドで並行して行ってもよく、具体的に、バックアップデータパケットにおけるファイルを複数のスレッドで並行して読み取り、読み取られたリカバリーコマンドを並行して実行する。例えば、データファイルLoData_00000001、LoData_00000002などを並行して読み取り、各データファイル内のSQLコマンドを並行して実行してもよい。 Preferably, when performing data recovery for multiple tables, in order to improve the efficiency of data recovery, it may be performed in parallel with multiple threads. Read in parallel and execute read recovery commands in parallel. For example, data files LoData_00000001, LoData_00000002, etc. may be read in parallel, and the SQL commands in each data file may be executed in parallel.

好ましく、データリカバリーの効率を向上するために、履歴状態データについて、リカバリーを行う過程において、サーバはトランザクションに係る様々の一致性チェック操作を禁止する一方、直接にデータを履歴テーブルのデータページに格納する。 Preferably, in order to improve the efficiency of data recovery, in the process of recovering history state data, the server prohibits various consistency check operations related to transactions, while directly storing data in the data page of the history table. do.

一例では、論理バックアップのリカバリーコマンドは1つのSQLステートメントであってもよく、1つのCLIフォーマットのコマンドであってもよい。例えば、‘/usr/bak/my_first_backup_02’バックアップデータパケットから‘/data/my_data_02’にデータをリカバリーする場合に、以下のコマンドを利用することができる。 In one example, the logical backup recovery command may be a single SQL statement or a single CLI formatted command. For example, when recovering data from the '/usr/bak/my_first_backup_02' backup data packet to '/data/my_data_02', the following command can be used.

即ち、RECOVERY FROM‘/usr/bak/my_first_backup_02’TO‘/data/my_data_02’;//物理バックアップのリカバリーは、CLIのRECOVERYコマンドを使用して空きディレクトリへリカバリーする。 RECOVERY FROM '/usr/bak/my_first_backup_02' TO '/data/my_data_02';

RECOVERY FROM‘/usr/bak/my_first_backup_02’INCLUDE my_table01,my_table02;//論理バックアップのリカバリーは、1つの運行中のシステムからリカバリーする。 RECOVERY FROM '/usr/bak/my_first_backup_02' INCLUDE my_table01, my_table02; //Recovery of logical backup recovers from one running system.

203において、サーバはCHECKPOINT操作を実行して、リカバリーされたデータをメモリからフラッシュし、データリカバリー操作を完了する。 At 203, the server performs a CHECKPOINT operation to flush the recovered data from memory and complete the data recovery operation.

なお、バックアップデータパケットが単に論理方式により得られたものであれば、データベースエンジンの運行中にリカバリーを行うことを許可することができ、「運行状態論理リカバリー」と称され、即ち、データベースエンジンの運行中に前記論理バックアップのリカバリーを行うことができ、リカバリーが完了した後に、データベースエンジンを起動する必要がないが、運行速度を向上するためにデータベースエンジンを再起動してもよいことが言うまでもない。つまり、サーバは、論理バックアップに対してリカバリー操作を行うことで得られたターゲットライブラリに基づいて、データベースシステムを再起動してデータサービスを提供することができ、本出願の実施例では、それを限定しない。一方、物理バックアップ方式のバックアップは、通常、データベースエンジンが非運行状態にある場合にのみ実行され、「非運行状態物理リカバリー」と称される。また、ハイブリッド方式に基づくバックアップデータは、運行状態においてリカバリーされたり、セミオフラインの場合にリカバリーされたりしてもよく。セミオフラインの場合とは、物理バックアップのデータがオフライン状態においてリカバリーされ済み、その後、サーバが起動して、ログ、及び論理バックアップにより得られたデータを引き続きリカバリーすることを指す。 In addition, if the backup data packet is obtained only by logic, it can be allowed to perform recovery while the database engine is running, which is called "running state logical recovery", that is, the database engine. It goes without saying that the recovery of the logical backup can be performed during operation, and the database engine does not need to be started after the recovery is completed, but the database engine may be restarted to improve the operation speed. . That is, the server can restart the database system and provide data services based on the target library obtained by performing the recovery operation on the logical backup, and in the embodiment of the present application, it can be Not limited. On the other hand, the backup of the physical backup method is usually performed only when the database engine is in a non-operational state, and is called "non-operational state physical recovery". Also, the backup data based on the hybrid method may be recovered in the operating state or in the semi-offline. The case of semi-offline means that the data of the physical backup has already been recovered in the offline state, and then the server is started and the data obtained by the log and logical backup are continuously recovered.

204において、認識したバックアップタイプが物理バックアップである場合に、当該バックアップデータパケットを新しいデータディレクトリにリカバリーする。 At 204, if the recognized backup type is a physical backup, the backup data packets are recovered to a new data directory.

一例において、物理バックアップのリカバリーコマンドは、1つのCLI(command-line interface、コマンドラインインターフェース)フォーマットのコマンドであってもよい。 In one example, the physical backup recovery command may be a command-line interface (CLI) format command.

205において、データがリカバリーされると、サーバは、バックアップデータパケットにおけるログファイルを実行する。 At 205, once the data is recovered, the server executes the log file in the backup data packet.

バックアップされた現在状態データは、データの一致性を保証するために、さらに、ログファイルをバックアップする必要があり、即ち、データをリカバリーする場合に、ログファイルに基づいてリカバリーする必要がある。一つの好ましい実施形態において、当該ログファイルを実行するプロセスは、バックアップ時点のデータの一致性を実現するように、ARIESアルゴリズム原理を使用して、ログファイル(例えばREDOログ)に基づくリカバリー作業を行ってもよい。 The backed-up current state data should also back up the log file to ensure data consistency, that is, when recovering the data, it should be recovered based on the log file. In one preferred embodiment, the process of executing the log file uses the ARIES algorithm principle to perform recovery work based on the log file (eg, REDO log) so as to achieve data consistency at the time of backup. may

206において、サーバはログファイルの実行を完了した後に、CHECKPOINT操作を実行して、リカバリーされたデータをメモリからフラッシュし、データリカバリー操作を完了する。 At 206, after the server has completed executing the log file, it performs a CHECKPOINT operation to flush the recovered data from memory and complete the data recovery operation.

207において、サーバは、新しいデータディレクトリに基づいてデータベースエンジンを起動して、データサービスの提供を開始し、終了する。 At 207, the server launches the database engine based on the new data directory to begin and end providing data services.

前記のステップ204ないし207までのリカバリープロセスは、バックアップデータパケットを空きデータディレクトリにリカバリーし、サーバは、物理バックアップをリカバリー操作を行うことで得られた新しいデータディレクトリに基づいてデータベースエンジンを起動し、データサービスの提供を開始することができる。 The recovery process of steps 204 through 207 above recovers the backup data packets to a free data directory, the server starts the database engine based on the new data directory obtained by performing the recovery operation on the physical backup, You can start providing data services.

208において、認識したバックアップタイプがハイブリッドバックアップである場合に、サーバは当該バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行う。 At 208, if the recognized backup type is a hybrid backup, the server performs data recovery based on the physical backup data in the backup data packet.

データリカバリーを開始する前に、サーバは、ターゲットディレクトリが空きであるか否かをチェックし、空きではない場合、エラーを報告して終了する。好ましく、幾つかのデータベースシステムは、さらに、バックアップするときの環境にリカバリーするように、先にバックアップデータパケットにおける制御ファイルに基づいてデータリカバリーを行う必要がある。例えば、ARIESアルゴリズム原理を使用して、制御ファイルなどの必要なデータのリカバリーを行ってもよい。 Before starting data recovery, the server checks whether the target directory is free, and if not, reports an error and exits. Preferably, some database systems also need to perform data recovery based on the control file in the backup data packet first, so as to recover to the environment at the time of backup. For example, the ARIES algorithm principle may be used to recover necessary data such as control files.

物理バックアップのデータは、ファイルコピー方式が利用される。このような物理バックアップのデータは、バックアップの際にブロックコピー方式で行われたため、バックアップされると、独立したデータファイルが形成されている。従って、リカバリーを行う場合、ファイルコピー方式を直接利用することにより実現される。具体的に、当該ファイルコピーに基づくデータリカバリープロセスは、ファイルコピー方式により、当該バックアップデータパケットにおける物理バックアップのデータを、ファイル名及びテーブル名に従ってターゲットディレクトリにおける対応する位置にコピーすることを含む。例えば、1つのデータファイルが、元のシステムにおけるサブディレクトリmydataにある場合、ターゲットディレクトリにおいて対応するサブディレクトリmydataを作成し、そして、対応するデータファイルをこのサブディレクトリにコピーする必要があり、ファイル名はMeta系、即ち、バックアップするとき元のシステムにおける名称で命名されるため、リカバリーするときにデータの一致性が保証される。 The file copy method is used for physical backup data. Such physical backup data is backed up by a block copy method, so that when backed up, an independent data file is formed. Therefore, recovery is achieved by directly using the file copy method. Specifically, the file copy-based data recovery process includes copying the physical backup data in the backup data packet to the corresponding location in the target directory according to the file name and table name by file copy method. For example, if one data file is in the subdirectory mydata in the original system, you need to create a corresponding subdirectory mydata in the target directory, and copy the corresponding data file to this subdirectory, with the file name is named with the name in the Meta system, ie, the original system when backing up, so data consistency is guaranteed when recovering.

データリカバリーの効率を向上するために、バックアップデータパケットにおける物理バックアップのデータに対して、並行方式により、複数のデータファイルを同時に指定のリカバリーターゲットディレクトリにおける対応する位置にコピーする。このような物理バックアップのデータは、バックアップされると、それぞれ独立したデータファイルが形成されるため、リカバリーするときに、直接に並行コピーの方式によりデータリカバリーを行うことができる。 In order to improve the efficiency of data recovery, for the data of the physical backup in the backup data packet, a plurality of data files are simultaneously copied to corresponding locations in the specified recovery target directory in a parallel manner. When such physical backup data is backed up, each independent data file is formed, so data recovery can be performed directly by the parallel copy method at the time of recovery.

209において、データがリカバリーされると、サーバはバックアップデータパケットにおけるログファイルを実行する。 At 209, once the data is recovered, the server executes the log file in the backup data packet.

210において、サーバはログファイルの実行を完了した後に、CHECKPOINT操作を実行し、リカバリーされたデータをメモリからフラッシュし、データリカバリー操作を完了する。 At 210, after the server has completed executing the log file, it performs a CHECKPOINT operation to flush the recovered data from memory and complete the data recovery operation.

211において、サーバは、物理バックアップに対してリカバリー操作を行うことで得られたターゲットディレクトリに基づいてデータベースエンジンを起動し、データサービスの提供を開始する。 At 211, the server launches the database engine based on the target directory obtained by performing the recovery operation on the physical backup and begins providing data services.

なお、サーバがデータベースエンジンを起動している過程に、「システム故障のリカバリー」プロセスの実行を禁止することができる。 It should be noted that while the server is starting the database engine, it is possible to inhibit execution of the "system failure recovery" process.

前記ステップ208~211における物理バックアップのリカバリープロセスは、さらに、前記の実施例に係る物理バックアップのリカバリーに関して記載された技術内容を参考することができ、ここで、重複な説明を省略する。 The physical backup recovery process in steps 208 to 211 can further refer to the technical content described in the physical backup recovery according to the above embodiments, and redundant descriptions will be omitted here.

212において、サーバは、ターゲットディレクトリにおいてデータベースエンジンを起動すると、当該バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行う。 At 212, the server starts the database engine in the target directory and performs data recovery on the logical backup data in the backup data packet.

当該物理バックアップのデータに基づいてデータリカバリーを完了した後に、論理リカバリーコマンドを作成し、当該論理リカバリーコマンドを実行し、当該バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うことをトリガーする。例えば、潜んでいる論理リカバリーSQLステートメントRECOVERYを作成してもよく、前記論理バックアップのリカバリーと同様な原理を利用しているため、ここで重複な説明を省略する。 After completing data recovery based on the physical backup data, create a logical recovery command, execute the logical recovery command, and trigger data recovery for the logical backup data in the backup data packet. . For example, a latent logical recovery SQL statement RECOVERY may be created, which uses the same principle as the logical backup recovery described above, so redundant description is omitted here.

バックアップデータパケットは、複数のtarパケットからなる1つのバックアップデータパケットであってもよく、この場合、先に当該複数のtarパケットを同一の一時ディレクトリに展開し、そして、一時ディレクトリに基づいてデータリカバリーを行う。一実施形態において、一時ディレクトリを、リカバリーコマンドにおけるリカバリーデータソースサブステートメントのコンテンツ、例えば、一時ディレクトリをRECOVERYコマンドにおけるFROMサブステートメントのコンテンツとして、当該RECOVERYコマンドを実行してデータリカバリーを行う。 The backup data packet may be one backup data packet consisting of multiple tar packets, in which case the multiple tar packets are first expanded into the same temporary directory, and then data recovery is performed based on the temporary directory. I do. In one embodiment, the RECOVERY command is executed to perform data recovery with the temporary directory as the contents of the recovery data source substatement in the RECOVERY command, eg, the temporary directory as the contents of the FROM substatement in the RECOVERY command.

213において、サーバは、論理バックアップのデータに対してデータリカバリーを完了した後に、CHECKPOINT操作を再実行する。 At 213, the server re-executes the CHECKPOINT operation after completing data recovery for the data in the logical backup.

なお、データベースシステムにおけるトータルデータのリカバリーは、一般的に、オフラインリカバリーによって行われることができる。従って、CLIのBACKUPコマンドのみを利用してリカバリーを実行することができる一方、非トータルデータのリカバリーは、オフライン場合におけるリカバリー及びオンライン場合におけるリカバリーの両方をサポートすることができる。 Recovery of total data in a database system can generally be performed by offline recovery. Thus, recovery of non-total data can support both offline and online cases, while only the CLI BACKUP command can be used to perform recovery.

また、幾つかの可能な実施形態において、幾つかのデータベースエンジンのオペレーティングシステムは、ユーザーによって権限の違いがあるため、リカバリー操作を行うユーザー権限を制限してもよい。例えば、リカバリーコマンドを実行させるユーザーはデータベースエンジンのオペレーティングシステム起動権限を有しなければならい。一方、幾つかの好ましい実施形態において、データベース内部に権限の違いがあり、リカバリーデータの網羅性ために、論理データをリカバリーする場合、ユーザー権限のチェックを行わず、リカバリー操作を行うことを許可する。 Also, in some possible embodiments, some database engine operating systems may restrict user rights to perform recovery operations, as different users have different rights. For example, the user running the recovery command must have operating system startup privileges for the database engine. On the other hand, in some preferred embodiments, there is a difference in authority inside the database, and for completeness of recovery data, when recovering logical data, it is allowed to perform recovery operations without checking user authority. do.

好ましく、データの一致性を保証するために、データリカバリーを行った後に、さらに、データの可視性を判断することにより、読み取られてユーザーに表示可能なデータを特定する。例えば、ブロック方式によりバックアップされたデータの場合、1つのページには、一部のデータが有効データ(バックアップするときに指定されたバックアップ条件、例えば、WHERE条件を満たす)であり、残りの無効データ(バックアップするときに指定されたバックアップ条件を満たさないが、ブロックバックアップ方式によって冗長にバックアップされる)は、読み取られるべきではない。 Preferably, after performing data recovery to ensure data integrity, data visibility is further determined to identify data that can be read and displayed to a user. For example, in the case of data backed up by the block method, one page contains valid data (that satisfies the backup conditions specified at the time of backup, such as the WHERE condition) and the remaining invalid data. (does not meet the specified backup conditions when backed up, but is redundantly backed up by the block backup method) should not be read.

前記の要素に基づいて、データリカバリーを行う場合に、相応的にデータファイルのコピープロセスは、簡単にブロックコピーを行うことではなく、幾つかの場合に分けて処理する。 Based on the above factors, when performing data recovery, the data file copy process is accordingly divided into several cases instead of simply performing block copy.

1、バックアップするときにバックアップ条件が無い(例えば、バックアップするときにWHERE条件なし)場合、バックアップデータパケットのバックアップオブジェクトは、全テーブル空間であり、追加の操作が無く、直接にファイルコピー及び/又はデータブロックコピーを行うことができる。 1. If there is no backup condition when backing up (e.g., no WHERE condition when backing up), the backup object in the backup data packet is the entire tablespace, without additional operations, directly file copy and/or A data block copy can be performed.

2、バックアップするときにバックアップ条件付き(例えば、バックアップするときにWHERE条件付き)、且つバックアップ条件が全てのデータファイルをカバーすることができる場合、追加の操作がなく、直接にファイルコピー及び/又はデータブロックコピーを行うことができる。 2. If there is a backup condition when backing up (e.g., a WHERE condition when backing up), and the backup condition can cover all data files, without additional operations, directly file copy and/or A data block copy can be performed.

3、バックアップするときにバックアップ条件付き(例えば、バックアップするときにWHERE条件付き)、且つバックアップ条件が全てのデータファイルをカバーすることができず、バックアップするときにファイルコピー又はブロックコピー方式によりバックアップが行われたとともに、図3に示すようにクロスページ識別ビットが設置されている。この場合、データリカバリーを行う場合に、バックアップ条件に応じて(ハイブリッドバックアップを例として、WHERE条件はメタ情報ファイル、HMeta_00000001ファイルに記憶されてもよい)、データブロック毎に認識及びフィルタリングし、バックアップ条件を満たさない場合、バージョンのそれぞれは、「データ有効ビット」において対応する1つのビットが1である。データリカバリーが完了した後に、データ読み取り操作により読み取られたバージョンのそれぞれは、そのデータ有効ビットが当該バージョンが視認不可であることを示す場合、当該バージョンを返さず、データ有効ビットが当該バージョンが視認可能であることを示す場合、当該バージョンを返し、例えば、それに対応する「データ有効ビット」のビットの値が1である場合、当該バージョンを上へ返さず、それに対応する「データ有効ビット」のビットの値が1ではない場合、当該バージョンを上へ返して、当該バージョンがユーザーに視認される。データブロックの間に直接関連関係がないため、データをリカバリーする場合に、リカバリー効率を向上するために、ブロックを単位として、データ識別ビットを並行して設置してもよい。通常、データバックアップは、バックアップテーブルの全体をメインにして、リカバリーするときに認識及びフィルタリングプロセスによって引き起こされ易い効率課題を回避することができる。 3. Backing up with a backup condition (e.g., WHERE condition when backing up), and the backup condition does not cover all data files, and backup is performed by file copy or block copy method when backing up. and the cross-page identification bits are set as shown in FIG. In this case, when performing data recovery, according to the backup conditions (taking hybrid backup as an example, the WHERE conditions may be stored in the meta information file, HMeta_00000001 file), recognize and filter each data block, and , each of the versions has one corresponding bit in the "data valid bit" is 1. After data recovery is complete, each version read by a data read operation does not return that version if its data valid bit indicates that the version is not visible, and the data valid bit indicates that the version is not visible. If it indicates that it is possible, return the version, for example, if the value of the bit of the "data valid bit" corresponding to it is 1, do not return the version up, but return the value of the "data valid bit" corresponding to it. If the value of the bit is not 1, return the version up so that the version is visible to the user. Since there is no direct relationship between data blocks, data identification bits may be set in parallel on a block-by-block basis in order to improve recovery efficiency when recovering data. Typically, data backups can main the entire backup table to avoid efficiency issues that are likely caused by the recognition and filtering process when recovering.

データリカバリーが完了した後に、前記のデータを読み取る過程において、図3に示すように、データ有効ビットは2つの部分に分けられる。一実施形態において、当該データ有効ビットは、2つのビットで示してもよく、そのうちの一方の部分はデータ識別ビットであり、当該バージョンの表示可否を示すために用いられ、1つのビットで示すことができる。他方の部分はクロスページ識別ビットであり、本ベージデータがクロスページであるか否かを示し、残りの一つのビットであり、1でクロスページを示し、0がクロスページではないことを示す。クロスページ識別ビットが存在する場合、データ捜索する時に停止することができず、次のページを継続して読み込んでページ解析を行う。 After data recovery is completed, in the process of reading the data, the data valid bits are divided into two parts, as shown in FIG. In one embodiment, the data valid bit may be indicated by two bits, one of which is a data identification bit, used to indicate whether the version can be displayed, and indicated by one bit. can be done. The other part is a cross-page identification bit, which indicates whether or not the page data is cross-page, and the remaining one bit, 1 indicates cross-page, and 0 indicates not cross-page. If the cross-page identification bit exists, it cannot stop when searching for data, and continues to read the next page for page analysis.

本出願の実施例は、時制データベースを基に、時制データバックアップに基づくリカバリー方法を提案し、全状態データにおける任意の状態のデータをバックアップした後に、例えば、論理方式又は物理方式及びハイブリッドでバックアップした後に、データリカバリーを実現し、時制データの有効記憶及び安全信頼性を保証し、有効な保障を提供することができる。 The embodiment of the present application proposes a recovery method based on temporal data backup based on the temporal database, after backing up data in any state in all state data, for example, backing up in logical or physical method and hybrid Later, it can realize data recovery, guarantee effective storage and security reliability of temporal data, and provide effective guarantee.

図2のフローチャートにおける各ステップは、矢印の指示に従って順に表示されているが、これらのステップは必ずしも矢印で指示した順に実行されるわけではない。本明細書に明確な記載があることを除外、これらのステップの実行は、厳格に順に行われるものではなく、これらのステップは他の順に従って実行されてもよい。そして、図2における少なくとも一部のステップは複数のサブステップ又は複数の段階を含んでもよく、これらのサブステップ又は段階は、必ずしも同じタイミングで実行されて完了するわけではなく、異なったタイミングで実行されてもよく、これらのサブステップ又は段階の実行順序も必ず順に行われるわけではなく、他のステップ又は他のステップのサブステップ又は段階における少なくとも一部に対して、順番にまたは交替に実行されてもよい。 Although each step in the flow chart of FIG. 2 is displayed in order according to the directions of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Except where expressly stated herein, performance of these steps is not strictly sequential, and these steps may be performed according to other orders. Also, at least some of the steps in FIG. 2 may include multiple substeps or multiple stages, and these substeps or stages are not necessarily performed and completed at the same time, but are performed at different times. Nor is the order of execution of these substeps or stages necessarily sequential, and may be performed sequentially or alternately with respect to other steps or at least some of the substeps or stages of other steps. may

図4は、本出願の実施例にかかるデータリカバリー装置の構成模式図である。図4を参照して、当該装置は、
バックアップデータパケットのバックアップタイプを認識するための認識モジュール401と、
認識したバックアップタイプがハイブリッドバックアップである場合に、当該バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うためのデータリカバリーモジュール402と、を含み、
当該ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むことを指し、
当該データリカバリーモジュール402は、当該物理バックアップのデータに基づいてデータリカバリーを完了した後に、当該バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うために用いられる。
FIG. 4 is a structural schematic diagram of a data recovery device according to an embodiment of the present application. Referring to FIG. 4, the device
a recognition module 401 for recognizing backup types of backup data packets;
a data recovery module 402 for performing data recovery based on the physical backup data in the backup data packet when the recognized backup type is a hybrid backup;
The hybrid backup refers to including physical backup and logical backup in the backup process,
The data recovery module 402 is used to perform data recovery on logical backup data in the backup data packet after completing data recovery based on the physical backup data.

一つの好ましい実施形態において、データリカバリーモジュール402は、ファイルコピー方式により、当該バックアップデータパケットにおける物理バックアップのデータを、ファイル名及びテーブル名に従ってターゲットディレクトリにおける対応する位置にコピーするために用いられる。 In one preferred embodiment, the data recovery module 402 is used to copy the physical backup data in the backup data packet to the corresponding location in the target directory according to the file name and table name by file copy method.

一つの好ましい実施形態において、当該バックアップデータパケットにおける物理バックアップのデータをコピーする場合、並行の方式により行う。 In one preferred embodiment, when copying the physical backup data in the backup data packet, it is done in a parallel fashion.

一つの好ましい実施形態において、当該装置は、
当該物理バックアップのデータに基づいてデータリカバリーを完了した後に、論理リカバリーコマンドを作成し、当該論理リカバリーコマンドを実行し、当該バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うことをトリガーするトリガーモジュールをさらに含む。
In one preferred embodiment, the device comprises
After completing data recovery based on the physical backup data, create a logical recovery command, execute the logical recovery command, and trigger data recovery for the logical backup data in the backup data packet. Further includes a trigger module.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、認識したバックアップタイプが論理バックアップである場合に、当該バックアップデータパケットのメタ情報ファイルに基づいて、ターゲットライブラリにおいてテーブルを作成し、データリカバリーを行う。 In one preferred embodiment, the data recovery module 402 further uses: That is, when the recognized backup type is logical backup, a table is created in the target library based on the meta information file of the backup data packet, and data recovery is performed.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、当該バックアップデータパケットがノーマルトランザクションスナップショットに基づいて得られたものである場合、当該バックアップデータパケットのメタ情報ファイルからテーブルファイルのメタ情報を読み取り、当該テーブルファイルのメタ情報に基づいてターゲットライブラリにおいてテーブルを作成し、挿入操作を実行してデータリカバリーを行い、当該ターゲットライブラリに同名のテーブルが存在する場合、リカバリーに失敗した。 In one preferred embodiment, the data recovery module 402 further uses: That is, if the backup data packet was obtained based on a normal transaction snapshot, the meta information of the table file is read from the meta information file of the backup data packet, and based on the meta information of the table file, the target library create a table, execute an insert operation to perform data recovery, and if a table with the same name exists in the target library, recovery fails.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、当該バックアップデータパケットが履歴トランザクションスナップショットに基づいて得られたものである場合、当該バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取り、前記ターゲットライブラリに同名のテーブルが存在しない場合、当該テーブルファイルのメタ情報に基づいてターゲットライブラリにテーブルを作成し、挿入操作を実行してデータリカバリーを行い、当該ターゲットライブラリに同名のテーブルが存在する場合、テーブルの作成を行わず、データリカバリーのみを行う。 In one preferred embodiment, the data recovery module 402 further uses: That is, if the backup data packet is obtained based on a historical transaction snapshot, the meta information of the table file is read from the meta information file of the backup data packet, and the table with the same name does not exist in the target library. In this case, create a table in the target library based on the meta information of the table file, execute the insert operation to recover the data, and if a table with the same name exists in the target library, the table is not created and the data Perform recovery only.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、当該バックアップデータパケットがノーマルトランザクションスナップショット及び履歴トランザクションスナップショットに基づいて得られたものである場合、当該ノーマルトランザクションスナップショット及び当該履歴トランザクションスナップショットに対応するデータリカバリー方式を組み合わせてデータリカバリーを行う。 In one preferred embodiment, the data recovery module 402 further uses: That is, when the backup data packet is obtained based on the normal transaction snapshot and the historical transaction snapshot, the data recovery is performed by combining the data recovery methods corresponding to the normal transaction snapshot and the historical transaction snapshot. conduct.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、当該ターゲットライブラリにおいて当該同名のテーブルにリカバリーすべきデータと同じデータが存在する場合、リカバリーに失敗し、当該ターゲットライブラリにおいて当該同名のテーブルにリカバリーすべきデータと同じデータが存在しない場合、当該リカバリーすべきデータに基づいてリカバリーを行う。 In one preferred embodiment, the data recovery module 402 further uses: That is, if the same data as the data to be recovered exists in the table with the same name in the target library, recovery fails, and if the same data as the data to be recovered does not exist in the table with the same name in the target library, the Perform recovery based on the data to be recovered.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、主キーインデックスにより当該ターゲットライブラリにおいて当該同名のテーブルに当該リカバリーすべきデータと同じデータが存在するか否かをチェックする。 In one preferred embodiment, the data recovery module 402 further uses: That is, it checks whether or not the same data as the data to be recovered exists in the table with the same name in the target library based on the primary key index.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、認識したバックアップタイプが物理バックアップである場合、当該バックアップデータパケット及び新しく作成されたデータディレクトリに基づいて、データリカバリーを行う。 In one preferred embodiment, the data recovery module 402 further uses: That is, if the recognized backup type is physical backup, data recovery is performed based on the backup data packet and the newly created data directory.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、マルチスレッド並行の方式により、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行う。 In one preferred embodiment, the data recovery module 402 further uses: That is, data recovery is performed based on the physical backup data in the backup data packet by a multi-thread parallel method.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、マルチスレッド並行の方式により、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行う。 In one preferred embodiment, the data recovery module 402 further uses: That is, data recovery is performed on the logical backup data in the backup data packet by a multi-thread parallel method.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、データリカバリーを行う過程において、バックアップするときにバックアップ条件がない場合、ファイルコピー又はブロックコピーを行い、
バックアップするときにバックアップ条件付き、且つ当該バックアップ条件が全てのデータファイルをカバーすることができる場合、ファイルコピー又はブロックコピーを行う。
In one preferred embodiment, the data recovery module 402 further uses: That is, in the process of data recovery, if there is no backup condition at the time of backup, file copy or block copy is performed,
File copy or block copy is performed when a backup condition is attached at the time of backup and the backup condition can cover all data files.

一つの好ましい実施形態において、当該データリカバリーモジュール402は、さらに以下のことに用いる。即ち、データリカバリーを行う過程において、バックアップするときにファイルコピー又はブロックコピー方式により行い、且つバックアップするときにバックアップ条件付き、当該バックアップ条件が全てのデータファイルをカバーすることができない場合、バックアップデータパケットのメタ情報ファイルにマークされている無効データに基づいてデータリカバリーを行う。 In one preferred embodiment, the data recovery module 402 further uses: That is, in the process of performing data recovery, when backup is performed by file copy or block copy method, and when backup is performed with backup conditions, if the backup conditions cannot cover all data files, the backup data packet perform data recovery based on invalid data marked in the meta information file.

一つの好ましい実施形態において、当該認識モジュール401は、さらに以下のことに用いる。即ち、当該バックアップデータパケットにおけるファイル名に基づいて、当該ファイル名に対応するバックアップタイプを取得し、又は、当該バックアップデータパケットに担持されているタイプ識別子に基づいて、当該タイプ識別子に対応するバックアップタイプを取得する。 In one preferred embodiment, the recognition module 401 is further used to: That is, based on the file name in the backup data packet, obtain the backup type corresponding to the file name, or based on the type identifier carried in the backup data packet, obtain the backup type corresponding to the type identifier. to get

一つの好ましい実施形態において、当該装置は、
データリカバリーが完了した後に、データ読み取り操作によりいずれかのバージョンを読み取った場合に、当該バージョンのデータ有効ビットが当該バージョンが視認不可であることを示す場合、当該バージョンを返さず、当該バージョンのデータ有効ビットが当該バージョンが視認可能であることを示す場合、当該バージョンを返すための読み取りモジュールをさらに含む。
In one preferred embodiment, the device comprises
After data recovery is complete, if any version is read by a data read operation and the data valid bit for that version indicates that the version is not visible, that version is not returned and the data for that version is returned. A read module for returning the version if the valid bit indicates that the version is visible.

なお、前記の実施例にかかるデータリカバリー装置は、データをリカバリーする場合に、前記各機能モジュールに対する区分を例にして説明したが、実際の適用において、必要に応じて、前記機能を異なった機能モジュールに割り当てて完了させることができる。即ち、装置の内部構成を異なった機能モジュールに分割して、上記した全て又は一部の機能を完了させる。また、前記の実施例にかかるデータリカバリー装置は、データリカバリー方法実施例と同一技術思想に属し、具体的な実現プロセスの詳細は、方法実施例を参照することができ、ここで重複な説明を省略する。 In addition, the data recovery apparatus according to the above-described embodiment has been described with an example of partitioning each functional module when recovering data. Can be assigned to a module and completed. That is, the internal structure of the device is divided into different functional modules to complete all or some of the functions described above. In addition, the data recovery device according to the above embodiment belongs to the same technical idea as the data recovery method embodiment, and the details of the specific implementation process can be referred to the method embodiment, and no redundant description will be given here. omitted.

図5は、本出願の実施例にかかるサーバの構成模式図であり、当該サーバ500は、配置又は性能によっては大きい相違が生じる可能性があり、1つ又は1つ以上のプロセッサー(central processing units、CPU)501及び1つ又は1つ以上のメモリ502を含み、その中、前記メモリ502に少なくとも一つのコマンドが記憶され、前記少なくとも一つのコマンドが前記プロセッサー501によってロードされて実行されると、前記の各方法実施例にかかる方法が実現される。勿論、当該サーバは、入出力を行うように、有線又は無線ネットワークインターフェース、キーボード及び入出力インターフェースなどの部品をさらに有してもよく、当該サーバは、他の機器機能を実現するための構成要素をさらに含んでもよく、ここで重複な説明を省略する。 FIG. 5 is a schematic diagram of the configuration of a server according to an embodiment of the present application. The server 500 may vary greatly depending on the arrangement or performance, and may include one or more central processing units. , CPU) 501 and one or more memories 502, wherein at least one command is stored in said memory 502, and when said at least one command is loaded and executed by said processor 501; A method according to each of the above method embodiments is implemented. Of course, the server may further have components such as wired or wireless network interfaces, keyboards and input/output interfaces to perform input and output, and the server may also have components to realize other device functions. may further include, and redundant description is omitted here.

本出願の実施例において、さらに、コンピュータ読み取り可能な記憶媒体を提供し、当該コンピュータ読み取り可能な記憶媒体はサーバに適用され、当該コンピュータ読み取り可能な記憶媒体に少なくとも一つのコマンド、少なくとも一つのプログラム、コードセット又はコマンドセットが記憶され、当該コマンド、当該プログラム、当該コードセット又は当該コマンドセットはプロセッサーによってロードされて実行されると、前記の実施例に係るデータリカバリー方法においてサーバにより実行される操作が実現される。 Embodiments of the present application further provide a computer-readable storage medium, which is applied to a server, and store at least one command, at least one program, and at least one program on the computer-readable storage medium. Once the code set or command set is stored and the command, program, code set or command set is loaded and executed by a processor, the operations performed by the server in the above example data recovery methods are: Realized.

なお、本出願の実施例に係るバージョンの表示可否とは、バックアップタスクにおける当該バージョンに対応するトランザクションスナップショットのタイミングがトランザクションにより読み取られ得るか否かを指す。データテーブル内の任意のタプルのいずれかのバージョンについて、トランザクションスナップショット及び前記バージョンの作成タイミング、削除タイミング及び前記バージョンの提出タイミングに基づいて、前記バージョンの表示可否を特定する。サーバは、データテーブルから一つのタプルを読み取る度に、当該タプルのライフサイクル情報、即ち、当該バージョンの作成タイミング、削除タイミング及び前記バージョンの提出タイミングなどの情報を読み取ることができ、履歴時間帯の可視性に基づいて判断することを例とする。即ち
(一):当該バージョンが挿入操作生成である場合、且つ当該作成タイミングが当該履歴時間帯の開始タイミングの前にあり、当該提出タイミングが当該履歴時間帯の間にある場合、当該バージョンが視認可能であると特定し、又は、当該作成タイミング及び当該提出タイミングの両方が当該履歴時間帯の間にある場合、当該バージョンが視認可能であると特定する。
(二):当該バージョンが削除操作生成である場合、当該削除タイミングが当該履歴時間帯の開始時点の前にあり、当該提出タイミングが当該履歴時間帯の間にある場合、当該バージョンが視認可能であると特定し、又は、当該削除タイミング及び当該提出タイミングの両方が当該履歴時間帯の間にある場合、当該バージョンが視認可能であると特定する。
(三):当該バージョンが更新操作生成である場合、当該作成タイミングが当該履歴時間帯の開始タイミングの前にあり、当該提出タイミングが当該履歴時間帯の間にある場合、当該バージョンが視認可能であると特定し、又は、当該作成タイミングが当該履歴時間帯の開始時点の後にあり、当該提出タイミングが当該履歴時間帯の間にある場合、当該バージョンが視認可能であると特定する。
In addition, whether the version can be displayed according to the embodiment of the present application refers to whether the timing of the transaction snapshot corresponding to the version in the backup task can be read by the transaction. For any version of any tuple in the data table, whether or not to display the version is specified based on the transaction snapshot and the creation timing, deletion timing, and submission timing of the version. Each time a server reads one tuple from the data table, it can read the life cycle information of the tuple, that is, information such as the creation timing, deletion timing, and submission timing of the version. Take judging based on visibility as an example. Namely
(1): If the version is generated by an insertion operation, and if the creation timing is before the start timing of the history time period, and the submission timing is within the history time period, the version is visible. or that the version is visible if both the creation timing and the submission timing are within the history time period.
(2): If the version is a deletion operation generation, the deletion timing is before the start of the history time period, and the submission timing is within the history time period, the version is visible. or, if both the deletion timing and the submission timing are within the history time period, then the version is identified as visible.
(3): If the version is an update operation generation, the creation timing is before the start timing of the history time period, and the submission timing is within the history time period, the version is visible. Alternatively, if the creation timing is after the start of the history time period and the submission timing is during the history time period, then the version is identified as visible.

当業者が理解できるように、前記実施例の全てまたは一部のステップを実現することは、ハードウェアにより完成されてもよく、プログラムにより、関するハードウェアに命令するように完成されてもよく、前記プログラムはコンピュータ可読記憶媒体に記憶され、前記言及された記憶媒体は、読み取り専用メモリ、磁気ディスクまたは光ディスクなどであってもよい。 As can be understood by those skilled in the art, implementing all or part of the steps of the above embodiments may be completed by hardware, or by a program to instruct relevant hardware, The program is stored in a computer-readable storage medium, and the mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.

以上の実施例の各技術特徴に対して、任意の組み合わせを行ってもよく、記載を簡潔にするために、前記実施例の各技術特徴の全ての可能な組み合わせを記載していないが、これらの技術特徴の組み合わせはいずれも、矛盾が存在しない限り、本明細書の記載範囲であると認められる。 Any combination may be made for each technical feature of the above embodiments, and for the sake of brevity, not all possible combinations of each technical feature of the above embodiments are described. Any combination of the technical features of is considered to be within the scope of the description unless there is a contradiction.

以上の実施例は、本出願のいくつかの実施形態のみを表現し、その記載は具体的且つ詳しいが、そのため、発明の特許範囲に対する限定と理解されることができない。指摘すべきこととして、当業者にとって、本出願の構想から逸脱しない前提で、さらに、若干の変形及び改良を行ってもよく、これらはいずれも本出願の保護範囲に当該当すべきである。従って、本出願特許の保護範囲は、添付の請求項を基準とする。 The above examples represent only some embodiments of the present application, and although the descriptions are specific and detailed, they cannot, therefore, be taken as limitations on the patentable scope of the invention. It should be pointed out that a person skilled in the art may make further slight variations and improvements without departing from the concept of the present application, which should all fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be based on the attached claims.

Claims (17)

サーバによって実行されるデータリカバリー方法であって、
バックアップデータパケットのバックアップタイプを認識するステップと、
認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うステップと、
前記物理バックアップのデータに基づいてデータリカバリーを行うステップを完了した後に、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップとを含み、
前記ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むこと指し、
当該方法はさらに:
前記の物理バックアップのデータに基づいてデータリカバリーを行うステップを完了した後、
論理リカバリーコマンドを作成するステップと、
前記論理リカバリーコマンドを実行して、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップをトリガーするステップとをさらに含む、
ことを特徴とする方法。
A data recovery method performed by a server, comprising:
recognizing the backup type of the backup data packet;
performing data recovery based on physical backup data in the backup data packet when the recognized backup type is hybrid backup;
After completing the step of performing data recovery based on the physical backup data, performing data recovery on the logical backup data in the backup data packet;
The hybrid backup refers to including a physical backup and a logical backup in the backup process,
The method further:
After completing the steps to perform data recovery based on the physical backup data,
creating a logical recovery command;
executing the logical recovery command to trigger a step of performing data recovery on logical backup data in the backup data packet;
A method characterized by:
前記認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うステップは、
ファイルコピー方式により、前記バックアップデータパケットにおける物理バックアップのデータを、ファイル名及びテーブル名に従ってターゲットディレクトリにおける対応する位置にコピーすることを含むことを特徴とする請求項1に記載の方法。
When the recognized backup type is a hybrid backup, the step of performing data recovery based on physical backup data in the backup data packet comprises:
2. The method of claim 1, comprising copying the physical backup data in the backup data packet to the corresponding location in the target directory according to the file name and table name by a file copy method.
並行方式により、前記バックアップデータパケットにおける物理バックアップのデータをターゲットディレクトリにおける対応する位置にコピーするステップをさらに含むことを特徴とする請求項1に記載の方法。 2. The method of claim 1, further comprising copying physical backup data in the backup data packets to corresponding locations in a target directory in a parallel fashion. サーバによって実行されるデータリカバリー方法であって、
バックアップデータパケットのバックアップタイプを認識するステップと、
認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うステップと、
前記物理バックアップのデータに基づいてデータリカバリーを行うステップを完了した後に、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップとを含み、
前記ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むこと指し、
当該方法はさらに:
認識したバックアップタイプが論理バックアップである場合に、前記バックアップデータパケットのメタ情報ファイルに基づいて、ターゲットライブラリにおいてテーブルを作成し、データリカバリーを行うステップを含
ことを特徴とする方法。
A data recovery method performed by a server, comprising:
recognizing the backup type of the backup data packet;
performing data recovery based on physical backup data in the backup data packet when the recognized backup type is hybrid backup;
After completing the step of performing data recovery based on the physical backup data, performing data recovery on the logical backup data in the backup data packet;
The hybrid backup refers to including a physical backup and a logical backup in the backup process,
The method further:
and creating a table in a target library to perform data recovery based on the meta information file of the backup data packet when the recognized backup type is logical backup.
前記バックアップデータパケットのメタ情報ファイルに基づいて、ターゲットライブラリにおいてテーブルを作成し、データリカバリーを行うステップは、
前記バックアップデータパケットがノーマルトランザクションスナップショットに基づいて得られたものである場合に、前記バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取るサブステップと、
前記テーブルファイルのメタ情報に基づいて前記ターゲットライブラリにおいて前記テーブルを作成するサブステップと、
前記テーブルに対して挿入操作を実行して、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うサブステップとを含むことを特徴とする請求項に記載の方法。
The step of creating a table and performing data recovery in the target library based on the meta information file of the backup data packet,
reading table file meta information from a meta information file of the backup data packet if the backup data packet was obtained based on a normal transaction snapshot;
creating the table in the target library based on the meta information of the table file;
5. The method of claim 4 , comprising the substep of performing an insert operation on the table to perform data recovery on the data of the logical backup in the backup data packet.
前記バックアップデータパケットのメタ情報ファイルに基づいて、ターゲットライブラリにおいてテーブルを作成し、データリカバリーを行うステップは、
前記バックアップデータパケットが履歴トランザクションスナップショットに基づいて得られたものである場合に、前記バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取るサブステップと、
前記ターゲットライブラリに同名のテーブルが存在しない場合、前記テーブルファイルのメタ情報に基づいてターゲットライブラリにおいてテーブルを作成し、挿入操作を実行してデータリカバリーを行うサブステップと、
前記ターゲットライブラリに同名のテーブルが存在する場合、前記同名のテーブルに対して挿入操作を実行してデータリカバリーを行うサブステップとを含むことを特徴とする請求項に記載の方法。
The step of creating a table and performing data recovery in the target library based on the meta information file of the backup data packet,
reading table file meta information from a meta information file of the backup data packet if the backup data packet was obtained based on a historical transaction snapshot;
a substep of creating a table in the target library based on the meta information of the table file and executing an insert operation to recover data if the table with the same name does not exist in the target library;
5. The method of claim 4 , further comprising performing an insert operation on the same-named table for data recovery if the same-named table exists in the target library.
前記バックアップデータパケットのメタ情報ファイルに基づいて、ターゲットライブラリにおいてテーブルを作成し、データリカバリーを行うステップは、
前記バックアップデータパケットがノーマルトランザクションスナップショット及び履歴トランザクションスナップショットに基づいて得られたものである場合は、
前記バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取り、前記テーブルファイルのメタ情報に基づいて前記ターゲットライブラリにおいて前記テーブルを作成し、前記テーブルに対して挿入操作を実行して、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うサブステップ、又は
前記バックアップデータパケットのメタ情報ファイルから、テーブルファイルのメタ情報を読み取り、前記ターゲットライブラリに同名のテーブルが存在しない場合、前記テーブルファイルのメタ情報に基づいてターゲットライブラリにおいてテーブルを作成し、挿入操作を実行してデータリカバリーを行い、前記ターゲットライブラリに同名のテーブルが存在する場合、前記同名のテーブルに対して挿入操作を実行してデータリカバリーを行うサブステップを含むことを特徴とする請求項に記載の方法。
The step of creating a table and performing data recovery in the target library based on the meta information file of the backup data packet,
If the backup data packet was obtained based on a normal transaction snapshot and a historical transaction snapshot,
reading meta information of a table file from the meta information file of the backup data packet; creating the table in the target library based on the meta information of the table file; performing an insert operation on the table; a substep of performing data recovery on the logical backup data in the backup data packet; or reading the meta information of the table file from the meta information file of the backup data packet, and if the table with the same name does not exist in the target library, Create a table in the target library based on the meta information of the table file, execute the insert operation to recover the data, and if a table with the same name exists in the target library, execute the insert operation to the table with the same name. 5. The method of claim 4 , comprising the substep of performing data recovery by
前記ターゲットライブラリに同名のテーブルが存在する場合、前記同名のテーブルに対して挿入操作を実行してデータリカバリーを行うサブステップは、
前記ターゲットライブラリにおいて前記同名のテーブルにリカバリーすべきデータと同じデータが存在しない場合、前記リカバリーすべきデータに基づいてリカバリーすることを含むことを特徴とする請求項に記載の方法。
If a table with the same name exists in the target library, the sub-step of performing an insert operation on the table with the same name to recover data includes:
7. The method of claim 6 , comprising recovering based on the data to be recovered if the same data to be recovered does not exist in the same-named table in the target library.
認識したバックアップタイプが物理バックアップである場合に、前記バックアップデータパケット及び新しく作成されたデータディレクトリに基づいて、データリカバリーを行うステップをさらに含むことを特徴とする請求項1に記載の方法。 2. The method of claim 1, further comprising performing data recovery based on the backup data packet and the newly created data directory if the recognized backup type is physical backup. 前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うステップは、
マルチスレッド並行の方式により、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うサブステップを含むことを特徴とする請求項1に記載の方法。
The step of performing data recovery based on the physical backup data in the backup data packet,
2. The method of claim 1, comprising the substep of performing data recovery based on physical backup data in the backup data packets in a multithreaded parallel manner.
前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップは、
マルチスレッド並行の方式により、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うサブステップを含むことを特徴とする請求項1に記載の方法。
The step of performing data recovery on logical backup data in the backup data packet includes:
2. The method of claim 1, comprising the substep of performing data recovery on logical backup data in the backup data packet in a multithreaded parallel manner.
サーバによって実行されるデータリカバリー方法であって、
バックアップデータパケットのバックアップタイプを認識するステップと、
認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うステップと、
前記物理バックアップのデータに基づいてデータリカバリーを行うステップを完了した後に、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップとを含み、
前記ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むこと指し、
当該方法はさらに:
データリカバリーを行う過程において、バックアップする場合にバックアップ条件がない場合、ファイルコピー又はブロックコピーを行うステップと、
バックアップする場合にバックアップ条件があり、且つ前記バックアップ条件が全てのデータファイルをカバーすることができる場合、ファイルコピー又はブロックコピーを行うステップとを含
ことを特徴とする方法。
A data recovery method performed by a server, comprising:
recognizing the backup type of the backup data packet;
performing data recovery based on physical backup data in the backup data packet when the recognized backup type is hybrid backup;
After completing the step of performing data recovery based on the physical backup data, performing data recovery on the logical backup data in the backup data packet;
The hybrid backup refers to including a physical backup and a logical backup in the backup process,
The method further:
performing file copy or block copy if there is no backup condition in the process of data recovery;
and if there are backup conditions when backing up, and said backup conditions can cover all data files, do a file copy or a block copy .
サーバによって実行されるデータリカバリー方法であって、
バックアップデータパケットのバックアップタイプを認識するステップと、
認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うステップと、
前記物理バックアップのデータに基づいてデータリカバリーを行うステップを完了した後に、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップとを含み、
前記ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むこと指し、
当該方法はさらに:
データリカバリーを行う過程において、バックアップする場合にファイルコピー又はブロックコピー方式により行われ、且つ、バックアップする場合にバックアップ条件があり、前記バックアップ条件が全てのデータファイルをカバーすることができない場合、バックアップデータパケットにおけるメタ情報ファイル中にマークされた無効データに基づいて、データリカバリーを行うステップをさらに含む
ことを特徴とする方法。
A data recovery method performed by a server, comprising:
recognizing the backup type of the backup data packet;
performing data recovery based on physical backup data in the backup data packet when the recognized backup type is hybrid backup;
After completing the step of performing data recovery based on the physical backup data, performing data recovery on the logical backup data in the backup data packet;
The hybrid backup refers to including a physical backup and a logical backup in the backup process,
The method further:
In the process of data recovery, when backup is performed by file copy or block copy method, and when backup is performed, there are backup conditions, and the backup conditions cannot cover all data files, backup data A method , further comprising performing data recovery based on invalid data marked in a meta information file in a packet.
サーバによって実行されるデータリカバリー方法であって、
バックアップデータパケットのバックアップタイプを認識するステップと、
認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うステップと、
前記物理バックアップのデータに基づいてデータリカバリーを行うステップを完了した後に、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップとを含み、
前記ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むこと指し、
当該方法はさらに:
データリカバリーを行った後、データ読み取り操作によりいずれかのバージョンが読み取られる場合は、
前記バージョンのデータ有効ビットが前記バージョンが視認不可であることを示すと、前記バージョンを返さず、
前記バージョンのデータ有効ビットが前記バージョンが視認可能であることを示すと、前記バージョンを返すステップをさらに含む
ことを特徴とする方法。
A data recovery method performed by a server, comprising:
recognizing the backup type of the backup data packet;
performing data recovery based on physical backup data in the backup data packet when the recognized backup type is hybrid backup;
After completing the step of performing data recovery based on the physical backup data, performing data recovery on the logical backup data in the backup data packet;
The hybrid backup refers to including a physical backup and a logical backup in the backup process,
The method further:
After data recovery, if any version is read by a data read operation,
not returning the version if the data valid bit of the version indicates that the version is not visible;
The method , further comprising returning the version when a data valid bit of the version indicates that the version is visible.
データリカバリー装置であって、
バックアップデータパケットのバックアップタイプを認識するための認識モジュールと、
認識したバックアップタイプがハイブリッドバックアップである場合に、前記バックアップデータパケットにおける物理バックアップのデータに基づいてデータリカバリーを行うデータリカバリーモジュールとを含み、
前記ハイブリッドバックアップとは、バックアッププロセスに物理バックアップと論理バックアップとを含むことを指し、
前記データリカバリーモジュールは、さらに、前記物理バックアップのデータに基づいてデータリカバリーを完了した後に、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うために用いられ
前記データリカバリーモジュールは、さらに:
前記の物理バックアップのデータに基づいてデータリカバリーを行うステップを完了した後、
論理リカバリーコマンドを作成するステップと、
前記論理リカバリーコマンドを実行して、前記バックアップデータパケットにおける論理バックアップのデータに対してデータリカバリーを行うステップをトリガーするステップとを実行するように構成されている、
ことを特徴とする装置。
A data recovery device,
a recognition module for recognizing a backup type of a backup data packet;
a data recovery module that performs data recovery based on physical backup data in the backup data packet when the recognized backup type is hybrid backup;
The hybrid backup refers to including a physical backup and a logical backup in the backup process,
The data recovery module is further used to perform data recovery on logical backup data in the backup data packet after completing data recovery based on the physical backup data ,
The data recovery module further:
After completing the steps to perform data recovery based on the physical backup data,
creating a logical recovery command;
executing the logical recovery command to trigger a step of performing data recovery on the data of the logical backup in the backup data packet;
A device characterized by:
サーバであって、プロセッサー及びメモリを含み、
前記メモリに少なくとも一つのコマンドが記憶され、前記少なくとも一つのコマンドは、当該プロセッサーによってロードされて実行されると、前記サーバに請求項1~14のうちいずれか一項に記載の方法を実行させるためのものである、サーバ。
a server, comprising a processor and memory;
At least one command is stored in the memory, the at least one command being loaded and executed by the processor causing the server to perform the method of any one of claims 1-14. for the server.
コンピュータ・プログラムであって、
少なくとも一つのコマンドが含まれ、前記少なくとも一つのコマンドは、プロセッサーによってロードされて実行されると、前記プロセッサーに請求項1~14のうちいずれか一項に記載の方法を実行させるためのものである、コンピュータ・プログラム。
A computer program,
At least one command is included which, when loaded and executed by a processor, causes the processor to perform the method of any one of claims 1-14. There is a computer program.
JP2021506468A 2018-11-30 2019-11-29 DATA RECOVERY METHOD, APPARATUS, SERVER AND COMPUTER PROGRAM Active JP7108782B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201811457196.1A CN110209527B (en) 2018-11-30 2018-11-30 Data recovery method, device, server and storage medium
CN201811457196.1 2018-11-30
PCT/CN2019/121916 WO2020108604A1 (en) 2018-11-30 2019-11-29 Data recovery method and device, server and computer readable storage medium

Publications (2)

Publication Number Publication Date
JP2021533495A JP2021533495A (en) 2021-12-02
JP7108782B2 true JP7108782B2 (en) 2022-07-28

Family

ID=67779952

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021506468A Active JP7108782B2 (en) 2018-11-30 2019-11-29 DATA RECOVERY METHOD, APPARATUS, SERVER AND COMPUTER PROGRAM

Country Status (5)

Country Link
US (1) US11531594B2 (en)
EP (1) EP3822793A4 (en)
JP (1) JP7108782B2 (en)
CN (1) CN110209527B (en)
WO (1) WO2020108604A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209527B (en) * 2018-11-30 2023-05-05 腾讯科技(深圳)有限公司 Data recovery method, device, server and storage medium
CN111125060B (en) * 2019-12-17 2023-10-31 中国联合网络通信集团有限公司 Database management method, system, equipment and storage medium
CN112882861B (en) * 2021-02-18 2023-11-07 北京思特奇信息技术股份有限公司 Service configuration data loading and recovering system and method
CN113821382B (en) * 2021-11-24 2022-03-01 西安热工研究院有限公司 Real-time database data processing method, system and equipment
CN114896102B (en) * 2022-05-23 2022-11-25 北京智博万维科技有限公司 Data protection time point recovery method and system
CN116467037B (en) * 2023-06-09 2023-09-22 成都融见软件科技有限公司 Graphic user interface work state recovery method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004139217A (en) 2002-10-16 2004-05-13 Hewlett Packard Co <Hp> Migration method for database
JP2006092553A (en) 2004-09-22 2006-04-06 Microsoft Corp Method and system of synthetic back up and restoration
JP2006106868A (en) 2004-09-30 2006-04-20 Toshiba Corp File system with file management function and file management method
JP2011053780A (en) 2009-08-31 2011-03-17 Oki Networks Co Ltd Restoration system, restoration method and backup control system
JP2014137711A (en) 2013-01-17 2014-07-28 Fujitsu Ltd Storage device, backup program and backup method

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6938180B1 (en) * 2001-12-31 2005-08-30 Emc Corporation Logical restores of physically backed up data
US7389314B2 (en) * 2004-08-30 2008-06-17 Corio, Inc. Database backup, refresh and cloning system and method
US8099572B1 (en) * 2008-09-30 2012-01-17 Emc Corporation Efficient backup and restore of storage objects in a version set
US8990161B1 (en) * 2008-09-30 2015-03-24 Emc Corporation System and method for single segment backup
US8639665B2 (en) * 2012-04-04 2014-01-28 International Business Machines Corporation Hybrid backup and restore of very large file system using metadata image backup and traditional backup
US9183205B1 (en) * 2012-10-05 2015-11-10 Symantec Corporation User-based backup
CN103942117B (en) * 2013-01-21 2018-03-23 中国移动通信集团河南有限公司 A kind of data back up method, apparatus and system
US9424265B1 (en) * 2013-05-30 2016-08-23 Emc Corporation Method and system for backing up and restoring a multi-user relational database management system
CN104657382B (en) 2013-11-21 2018-09-14 阿里巴巴集团控股有限公司 Method and apparatus for MySQL principal and subordinate's server data consistency detections
CN104850598B (en) * 2015-04-28 2017-11-14 江苏瑞中数据股份有限公司 A kind of real-time data base back-up restoring method
CN106354583B (en) * 2016-08-30 2019-09-17 广州鼎甲计算机科技有限公司 A kind of heat backup method and system of MySQL database
CN106658753B (en) * 2016-09-14 2020-01-17 Oppo广东移动通信有限公司 Data migration method and terminal equipment
CN108319623B (en) * 2017-01-18 2021-10-22 华为技术有限公司 Data redistribution method and device and database cluster
CN107145403B (en) * 2017-04-20 2020-06-30 浙江工业大学 Relational database data backtracking method oriented to Web development environment
CN107179965B (en) * 2017-04-25 2020-05-19 北京潘达互娱科技有限公司 Database recovery method and device
CN110309122B (en) 2018-03-28 2022-12-30 腾讯科技(深圳)有限公司 Method, device, server and storage medium for obtaining incremental data
CN110309233B (en) 2018-03-28 2022-11-15 腾讯科技(深圳)有限公司 Data storage method, device, server and storage medium
CN110196758A (en) 2018-05-10 2019-09-03 腾讯科技(深圳)有限公司 Data processing method and device, storage medium and electronic device
CN110209527B (en) * 2018-11-30 2023-05-05 腾讯科技(深圳)有限公司 Data recovery method, device, server and storage medium
CN110209528B (en) 2018-11-30 2022-10-28 腾讯科技(深圳)有限公司 Data backup method, device, server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004139217A (en) 2002-10-16 2004-05-13 Hewlett Packard Co <Hp> Migration method for database
JP2006092553A (en) 2004-09-22 2006-04-06 Microsoft Corp Method and system of synthetic back up and restoration
JP2006106868A (en) 2004-09-30 2006-04-20 Toshiba Corp File system with file management function and file management method
JP2011053780A (en) 2009-08-31 2011-03-17 Oki Networks Co Ltd Restoration system, restoration method and backup control system
JP2014137711A (en) 2013-01-17 2014-07-28 Fujitsu Ltd Storage device, backup program and backup method

Also Published As

Publication number Publication date
US11531594B2 (en) 2022-12-20
EP3822793A4 (en) 2022-04-20
CN110209527A (en) 2019-09-06
CN110209527B (en) 2023-05-05
US20210165716A1 (en) 2021-06-03
WO2020108604A1 (en) 2020-06-04
JP2021533495A (en) 2021-12-02
EP3822793A1 (en) 2021-05-19

Similar Documents

Publication Publication Date Title
JP7108782B2 (en) DATA RECOVERY METHOD, APPARATUS, SERVER AND COMPUTER PROGRAM
US11429641B2 (en) Copying data changes to a target database
US7117229B2 (en) Method and system for online reorganization of databases
US9183236B2 (en) Low level object version tracking using non-volatile memory write generations
EP2356560B1 (en) Atomic multiple modification of data in a distributed storage system
Verhofstad Recovery techniques for database systems
US7779295B1 (en) Method and apparatus for creating and using persistent images of distributed shared memory segments and in-memory checkpoints
US7552148B2 (en) Shutdown recovery
US7472129B2 (en) Lossless recovery for computer systems with map assisted state transfer
US10936441B2 (en) Write-ahead style logging in a persistent memory device
US7360111B2 (en) Lossless recovery for computer systems with remotely dependent data recovery
US4945474A (en) Method for restoring a database after I/O error employing write-ahead logging protocols
US8615489B2 (en) Storing block-level tracking information in the file system on the same block device
US7133884B1 (en) Unobtrusive point-in-time consistent copies
US9311311B2 (en) Archival management of database logs
WO2021184679A1 (en) Continuous data protection system and method
Graefe A survey of B-tree logging and recovery techniques
Pillai et al. Crash consistency
US7765247B2 (en) System and method for removing rows from directory tables
US11086649B2 (en) Minimizing downtime of highly available virtual machines
WO2015084409A1 (en) Nosql database data validation
CN112148532A (en) Batch recovery method and device for hard disk data, storage medium and electronic equipment
US20230315582A1 (en) Object-level Incremental Cloud Backups

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220323

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220329

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220527

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220705

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220715

R150 Certificate of patent or registration of utility model

Ref document number: 7108782

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150