JPH06149641A - On-line backup and fault recovery system - Google Patents

On-line backup and fault recovery system

Info

Publication number
JPH06149641A
JPH06149641A JP4322391A JP32239192A JPH06149641A JP H06149641 A JPH06149641 A JP H06149641A JP 4322391 A JP4322391 A JP 4322391A JP 32239192 A JP32239192 A JP 32239192A JP H06149641 A JPH06149641 A JP H06149641A
Authority
JP
Japan
Prior art keywords
database
file
backup
record
journal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4322391A
Other languages
Japanese (ja)
Inventor
Akiyoshi Usui
明寿 碓氷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP4322391A priority Critical patent/JPH06149641A/en
Publication of JPH06149641A publication Critical patent/JPH06149641A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain backup in the on-line operation. CONSTITUTION:The on-line backup preparing device 14 stores the information of a data base file 11 in a backup storing file 16 to backup the information. As to each table constituted of logical records, only constitutional information such as a table identifier (ID) and table length is stored. As to each record, the ID and contents of the record are stored. In the case of storing records, only records having transactions in executing out of deleted records or records to be deleted and records not to be deleted are stored. When a fault is generated in a disk device or the like stored in a data base file 11, contents are prepared from the backed-up constitutional information such as the table ID and table length, the record ID and record contents.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、論理ジャーナル方式を
用いたデータベースにおけるオンラインバックアップ及
び障害回復方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an online backup and failure recovery system for a database using a logical journal system.

【0002】[0002]

【従来の技術】通常、データベース管理システムでは、
障害に対してトランザクションの行なった変更を保証す
るためにコミットメント制御を行なう。コミットメント
制御とは、データの変更を伴なうトランザクションに含
まれるすべての処理が完了した後、コミットによりデー
タベースを更新する制御をいう。これにより、トランザ
クションに含まれる処理のいずれか1つでも正常に完了
しなかったときはトランザクションをロールバックし、
データベースの不当な更新を防止することができる。コ
ミットメント制御では、トランザクションの変更履歴を
ジャーナル(ログ)に格納するジャーナル方式が用いら
れている。論理ジャーナル方式は、データベース管理シ
ステムが変更を行なったレコードをレコード識別子と操
作及びレコードの変更差分をジャーナルに格納する方式
である。レコードは、論理的な識別子で指定され、ジャ
ーナルのみでは物理格納位置の情報を持たない。
2. Description of the Related Art Generally, in a database management system,
Commitment control is performed to guarantee the changes made by the transaction against failures. Commitment control refers to control for updating the database by committing after all the processing included in a transaction involving data change is completed. As a result, if any one of the processes included in the transaction is not completed normally, the transaction is rolled back,
It is possible to prevent unauthorized updating of the database. In commitment control, a journal method is used in which a change history of transactions is stored in a journal (log). The logical journal method is a method of storing a record changed by a database management system, a record identifier, an operation, and a record change difference in a journal. The record is specified by a logical identifier, and the journal alone does not have information on the physical storage location.

【0003】論理ジャーナル方式を用いたデータベース
管理システムの、バックアップ作成及びバックアップと
ジャーナルを用いた障害回復を次に説明する。図2は、
従来のオンラインシステムの構成図である。図示のよう
に、論理ジャーナル方式を用いたデータベース管理シス
テム20は、データベースファイル21、ジャーナルフ
ァイル22、リカバリ情報ファイル23の3種の情報を
管理している。データベースファイル21には、データ
ベースのテーブル、索引テーブルが格納されている。各
テーブルは、レコードから成る。ジャーナルファイル2
2は、データベース管理システム20の行なったデータ
ベースファイル21への変更レコードを一意に識別する
レコード識別子、レコードの変更動作、レコードの変更
差分(ジャーナル)を格納する。リカバリ情報ファイル
23は、障害回復(リカバリ)の際に、ジャーナルファ
イル22に格納されたジャーナルのどの位置から回復さ
せるべきかの情報を格納している。
Backup creation and backup and failure recovery using the journal of the database management system using the logical journal method will be described below. Figure 2
It is a block diagram of the conventional online system. As illustrated, the database management system 20 using the logical journal system manages three types of information: a database file 21, a journal file 22, and a recovery information file 23. The database file 21 stores database tables and index tables. Each table consists of records. Journal file 2
Reference numeral 2 stores a record identifier for uniquely identifying a record changed by the database management system 20 to the database file 21, a record change operation, and a record change difference (journal). The recovery information file 23 stores information about from which position of the journal stored in the journal file 22 the recovery should be performed at the time of failure recovery.

【0004】次に、図2及び図3を用いて従来のバック
アップ方法を説明する。図3は、従来のバックアップ方
法を説明するフローチャートである。バックアップ開始
前に、データベース管理システムの運用を終了する。こ
れは、バックアップすべきデータベースファイルがバッ
クアップ中に変更されないようにするためである。次
に、すべてのデータベースファイル21をファイルコピ
ーコマンド24によって複製する(ステップS32)。
これでデータベースファイルのコピー25が作成され
る。次に、リカバリ情報ファイル23をファイルコピー
コマンドによって複製する(ステップS33)。これで
リカバリ情報ファイルのコピー26が作成される。以上
でバックアップ処理は終了する。次に、図2及び図4を
用いて媒体破壊の発生した場合の、バックアップからの
リカバリ方法を説明する。
Next, a conventional backup method will be described with reference to FIGS. 2 and 3. FIG. 3 is a flowchart explaining a conventional backup method. Stop the operation of the database management system before starting backup. This is to prevent the database files that should be backed up from changing during the backup. Next, all the database files 21 are copied by the file copy command 24 (step S32).
This creates a copy 25 of the database file. Next, the recovery information file 23 is copied by the file copy command (step S33). This creates a copy 26 of the recovery information file. With that, the backup process ends. Next, a recovery method from backup in the case where the medium destruction occurs will be described with reference to FIGS. 2 and 4.

【0005】図4は、従来の媒体からのリカバリ方法を
説明するフローチャートである。データベースファイル
21の媒体破壊が発生した場合には、データベースファ
イルのコピー25をすべてリストアする(ステップS4
1)。これにより、バックアップ作成時と同じファイル
構成とする。同様に、リカバリ情報ファイルのコピー2
6をリストアする(ステップS42)。この状態で、バ
ックアップした時点のデータベースの状態に復旧したこ
とになる。次に、バックアップ時点から書き込まれたジ
ャーナルファイル22を用いてリカバリを行なう(ステ
ップS43)。ここでは、リストアしたリカバリ情報フ
ァイル23から、回復を開始すべきジャーナルの位置を
リードし、ジャーナルファイル22よりジャーナルを読
み、各レコードを回復する。最後のジャーナルまでこれ
を繰り返し、未完了トランザクションの変更を無効化し
て、回復作業は終了する。回復作業が終了したら、デー
タベース管理システムの運用を開始する(ステップS4
4)。
FIG. 4 is a flow chart for explaining a conventional recovery method from a medium. When the medium of the database file 21 is destroyed, all the copies 25 of the database file are restored (step S4).
1). As a result, the file structure will be the same as when creating the backup. Similarly, copy 2 of the recovery information file
6 is restored (step S42). In this state, the state of the database at the time of backup is restored. Next, recovery is performed using the journal file 22 written from the time of backup (step S43). Here, the position of the journal to start recovery is read from the restored recovery information file 23, the journal is read from the journal file 22, and each record is recovered. This process is repeated until the last journal, the changes of incomplete transactions are invalidated, and the recovery work is completed. When the recovery work is completed, the operation of the database management system is started (step S4).
4).

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上述し
た従来の技術には、次のような問題があった。即ち、デ
ータベースの媒体破壊が発生した場合の障害回復には、
データベース管理システムの運用を一旦終了してデータ
ベースファイルを複製することによりバックアップを行
なうことが必要である。また、そのバックアップ時から
のジャーナルを保存しておくことが必要である。ところ
が、連続運用を行なうデータベースシステムでは、運用
を中止することができないので、バックアップができな
いという問題がある。もしも、データベース管理システ
ムがデータベースを変更している最中にそのデータベー
スファイルを複製すると、すべてのページを同時に複製
することが不可能なために、複製されたファイルは整合
性がなくなる。また、論理ジャーナルでは、データベー
スの変更したレコード識別子とレコードの変更履歴の情
報しか記録しない。更に、データベース管理システムで
は、レコード変更を行なう場合に、レコード形式以外の
管理情報も変更する。これらの情報はジャーナルに記録
されない。このため、バックアップしたデータベースと
ジャーナルだけでは、データベースを障害発生時と同一
の状態にはできず、障害回復は不可能である。
However, the above-mentioned conventional technique has the following problems. In other words, to recover from a disaster when the database media is destroyed,
It is necessary to once complete the operation of the database management system and to make a backup by copying the database file. Also, it is necessary to save the journal from the time of the backup. However, in a database system that performs continuous operation, there is a problem that backup cannot be performed because operation cannot be stopped. If the database management system duplicates the database file while it is modifying the database, the duplicated file will be inconsistent because it is not possible to duplicate all pages at the same time. In addition, the logical journal records only the changed record identifier of the database and the record change history information. Further, in the database management system, when the record is changed, the management information other than the record format is also changed. This information is not recorded in the journal. Therefore, the database and the journal that have been backed up cannot bring the database into the same state as when the failure occurred, and failure recovery is impossible.

【0007】以上のように、ファイルコピー方式でデー
タベースのバックアップを作成するためには、目的のデ
ータベースを更新不可にしなければならない。即ち、デ
ータベースの更新中はバックアップを行なうことができ
ない。本発明は、以上の点に着目してなされたもので、
データベースのレコード単位に論理的にバックアップす
る論理バックアップ装置を追加することにより、論理ジ
ャーナル方式を用いたデータベース管理システムにおい
て、データベースファイルの変更中でもバックアップを
行ない、これにより障害発生時までの回復を行なうこと
を可能とするオンラインバックアップ及び障害回復方式
を提供することを目的とするものである。
As described above, in order to create a database backup by the file copy method, it is necessary to make the target database non-updatable. That is, backup cannot be performed while the database is being updated. The present invention has been made focusing on the above points,
By adding a logical backup device that logically backs up in database record units, in a database management system that uses the logical journal method, backup is performed even when the database file is changed, thereby recovering until a failure occurs. It is an object of the present invention to provide an online backup and a disaster recovery method that enables

【0008】[0008]

【課題を解決するための手段】本発明のオンラインバッ
クアップ及び障害回復方式は、論理レコードにより構成
されるテーブルから成るデータベースを、当該データベ
ースを格納するデータベースファイルと、当該データベ
ースの更新差分を格納するジャーナルファイルにより管
理する場合において、所定のオンラインバックアップ作
成装置が前記データベースの更新中に前記データベース
ファイルから前記論理レコードを検索するための索引レ
コードを除く、論理レコードにより構成されるテーブル
の識別子及び構成情報を格納するとともに、所定のバッ
クアップ格納ファイルに前記更新により削除されない論
理レコードの識別子及び内容のみを前記所定のバックア
ップ格納ファイルに格納することにより、前記所定のオ
ンラインバックアップ作成装置がオンライン動作中のデ
ータベースのバックアップを行ない、障害回復時は、所
定のファイル回復装置が当該バックアップされた論理レ
コードの識別子及び内容と、テーブルの識別子及び構成
情報とから前記テーブルを作成し、更に、作成されたテ
ーブルから各テーブルを検索する索引テーブルを作成し
て前記バックアップ時のデータベースファイルを再現す
ることを特徴とするものである。
According to the online backup and failure recovery method of the present invention, there is provided a database consisting of tables composed of logical records, a database file storing the database, and a journal storing update differences of the database. In the case of managing by files, the identifier and the configuration information of the table constituted by logical records, excluding the index record for the predetermined online backup creating apparatus to retrieve the logical record from the database file during updating of the database. By storing the identifier and the content of the logical record that is not deleted by the update in the predetermined backup storage file, the predetermined online backup file is stored. The backup creation device backs up the database that is operating online, and at the time of failure recovery, the specified file recovery device creates the table from the identifier and contents of the backed up logical record and the table identifier and configuration information. Furthermore, an index table for searching each table from the created table is created to reproduce the database file at the time of backup.

【0009】[0009]

【作用】本発明のオンラインバックアップ及び障害回復
方式においては、論理レコードにより構成されるテーブ
ルから成るデータベースをバックアップする場合に、各
テーブルについては、テーブル識別子及びテーブル長等
の構成情報のみを格納する。また、各レコードについて
は、レコード識別子及びレコード内容を格納する。この
場合、削除された、あるいは削除される可能性のあるレ
コードで実行中のトランザクションがあるもの及び削除
されないレコードについてのみ格納する。一方、データ
ベースファイルのディスク装置等の障害発生時は、バッ
クアップされたテーブル識別子及びテーブル長等の構成
情報から内容のない空のテーブルを作成し、バックアッ
プされたレコード識別子及びレコード内容から内容を作
成する。また、索引レコードを新たに作成し、索引テー
ブルを作成する。これにより、バックアップ時のデータ
ベースファイルを再現する。更に、ジャーナルファイル
から更新差分の情報を読み出し、障害発生時のデータベ
ースを再現する。
In the online backup and failure recovery method of the present invention, when backing up a database consisting of tables composed of logical records, only configuration information such as table identifier and table length is stored for each table. Further, for each record, a record identifier and record contents are stored. In this case, only those records that have been deleted or have a possibility of being deleted and have an ongoing transaction and records that are not deleted are stored. On the other hand, when a failure occurs in the disk device of the database file, an empty table with no contents is created from the backed up table identifier and configuration information such as table length, and the contents are created from the backed up record identifier and record contents. . Also, an index record is newly created and an index table is created. In this way, the database file at the time of backup is reproduced. Further, the update difference information is read from the journal file and the database at the time of failure is reproduced.

【0010】[0010]

【実施例】以下、本発明の実施例を図面を参照して詳細
に説明する。図1は、本発明の方式を適用したシステム
の一実施例のブロック図である。図示のように、論理ジ
ャーナル方式を用いたデータベース管理システム10
は、図2に示す従来のシステムと同様に、データベース
ファイル11、ジャーナルファイル12、リカバリ情報
ファイル13の3種の情報を管理している。データベー
スファイル11には、データベースのテーブル、索引テ
ーブルが格納されている。各テーブルは、レコードから
成る。ジャーナルファイル12は、データベース管理シ
ステム10の行なったデータベースファイル11への変
更レコードを一意に識別するレコード識別子、レコード
の変更動作、レコードの変更差分(ジャーナル)を格納
する。リカバリ情報ファイル13は、障害回復(リカバ
リ)の際に、ジャーナルファイル12に格納されたジャ
ーナルのどの位置から回復させるべきかの情報を格納し
ている。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram of an embodiment of a system to which the method of the present invention is applied. As shown, the database management system 10 using the logical journal method
Manages three types of information such as a database file 11, a journal file 12, and a recovery information file 13, as in the conventional system shown in FIG. The database file 11 stores database tables and index tables. Each table consists of records. The journal file 12 stores a record identifier for uniquely identifying a record changed to the database file 11 by the database management system 10, a record change operation, and a record change difference (journal). The recovery information file 13 stores information about from which position in the journal stored in the journal file 12 the recovery should be performed in case of failure recovery.

【0011】図示のシステムには、データベースファイ
ル11中のレコード単位にバックアップするため、オン
ラインバックアップ作成装置14が追加されている。オ
ンラインバックアップ作成装置14で作成されるバック
アップ格納ファイル16は従来のデータベースファイル
のコピーとは異なる。リカバリ情報ファイル13のバッ
クアップ方式は従来と同様である。ただし、データベー
ス管理システム10がリカバリ情報ファイル13を変更
中でないことが必要である。次に、オンラインバックア
ップ作成装置14がどのようにしてバックアップ格納フ
ァイル16を作成するかを図5を用いて説明する。
In the illustrated system, an online backup creating device 14 is added for backing up in record units in the database file 11. The backup storage file 16 created by the online backup creation device 14 is different from the conventional copy of the database file. The backup method of the recovery information file 13 is the same as the conventional one. However, it is necessary that the database management system 10 is not changing the recovery information file 13. Next, how the online backup creating device 14 creates the backup storage file 16 will be described with reference to FIG.

【0012】図5は、本発明によるオンラインバックア
ップ作成方法を説明するフローチャートである。オンラ
インバックアップ作成装置14は、データベースファイ
ルのデータ読み込みにデータベース管理システム10の
データベースバッファ18を用いず、データベースファ
イル11に書き込まれた内容を読む。即ち、データベー
スファイル11を格納したディスク装置から各テーブル
を読み込む。これは、以下の理由による。データベース
管理システム10の持つデータベースバッファには、ジ
ャーナルファイル12に変更履歴を書き込む前に変更さ
れたデータが存在する場合がある。このため、このよう
なデータをバックアップすると、その時まだジャーナル
の方には変更履歴が書かれていない。この結果、バック
アップ後の障害回復時にデータベースを正しく回復でき
なくなる。
FIG. 5 is a flow chart for explaining the online backup creating method according to the present invention. The online backup creation device 14 does not use the database buffer 18 of the database management system 10 to read the data of the database file, but reads the content written in the database file 11. That is, each table is read from the disk device storing the database file 11. This is for the following reason. The database buffer of the database management system 10 may contain data changed before writing the change history in the journal file 12. For this reason, when such data is backed up, the change history is not written in the journal at that time. As a result, the database cannot be properly recovered during disaster recovery after backup.

【0013】オンラインバックアップ作成装置14は、
すべてのデータベースファイルに存在する、すべてのテ
ーブルに対し、以下の処理を行なう(ステップS5
1)。対象テーブルが索引テーブルの場合は、テーブル
内容をバックアップしない(ステップS52)。この理
由は、索引テーブルは、対応するテーブルが存在すれば
そのテーブルから索引情報のみを抽出することによりリ
カバリできるので、最小限の情報のみバックアップしよ
うとするためである。テーブルが索引テーブルでない場
合、対象テーブルのテーブル識別子、及び管理情報をバ
ックアップする(ステップS53)。ここに、テーブル
識別子は、テーブルを識別するための番号等である。ま
た、管理情報は、対象テーブルの再作成に必要な情報で
ある。これは、具体的には、レコード長やレコードの属
性等である。ステップS53では、これらのテーブル構
成情報のみをバックアップ格納ファイル16に格納す
る。
The online backup creating device 14 is
The following processing is performed for all tables existing in all database files (step S5).
1). When the target table is the index table, the table contents are not backed up (step S52). The reason for this is that the index table can be recovered by extracting only the index information from the corresponding table if the corresponding table exists, so that only the minimum information is backed up. When the table is not the index table, the table identifier of the target table and the management information are backed up (step S53). Here, the table identifier is a number or the like for identifying the table. The management information is information necessary for recreating the target table. Specifically, this is a record length, a record attribute, or the like. In step S53, only the table configuration information is stored in the backup storage file 16.

【0014】次に、対象テーブル中のすべてのレコード
について以下の処理を行なう(ステップS54)。対象
レコードが削除されたか、あるいは削除される可能性の
あるレコードである場合は(ステップS55)、このレ
コードを更新中のトランザクションが存在するかを調べ
る(ステップS56)。これは、対象レコード中の削除
フラグ及びトランザクション中フラグを参照することに
より調べることができる。削除フラグがセットされてい
る場合は、当該レコードは削除された、あるいは削除さ
れる可能性のあるものであることを意味する。トランザ
クション中フラグがセットされている場合は、当該レコ
ードを更新中のトランザクションが存在することを意味
する。このようなトランザクションが存在する場合は、
削除が無効化する可能性がある。即ち、トランザクショ
ンが正常に完了せず、ロールバックする場合、当該レコ
ード中の削除フラグがリセットされ、トランザクション
中で一旦削除されたレコードが復活する。このため、こ
のようなレコードもバックアップする必要がある。反対
に、このようなトランザクションが存在しない場合は、
削除された後再利用されてもジャーナルにその記録が残
るため、バックアップの必要はない。
Next, the following process is performed for all the records in the target table (step S54). If the target record has been deleted or is likely to be deleted (step S55), it is checked whether there is a transaction updating this record (step S56). This can be checked by referring to the deletion flag and the in-transaction flag in the target record. When the deletion flag is set, it means that the record has been deleted or may be deleted. When the in-transaction flag is set, it means that there is a transaction that is updating the record. If such a transaction exists,
Deletion may invalidate. That is, when the transaction does not complete normally and rolls back, the deletion flag in the record is reset, and the record once deleted in the transaction is restored. For this reason, such records also need to be backed up. Conversely, if no such transaction exists,
There is no need to back up because the record remains in the journal even if it is reused after being deleted.

【0015】また、削除された、あるいは削除される可
能性のないレコードは、すべてバックアップする必要が
ある(ステップS55、S57)。従って、バックアッ
プが必要なレコードの、レコード識別子、レコード内容
をバックアップ格納ファイルに書き込む(ステップS5
7)。即ち、バックアップ格納ファイル用に設けられた
ディスク装置に論理レコード単位にデータ内容を書き込
み、これにより、バックアップを行なう。このようにし
て、すべてのテーブルに対するバックアップ処理が終了
すれば、オンラインバックアップは終了する。次に、媒
体破壊からのリカバリ方法を図6を用いて説明する。図
6は、本発明による媒体破壊からのリカバリ方法を説明
するフローチャートである。
Further, it is necessary to back up all the records that have been deleted or are not likely to be deleted (steps S55 and S57). Therefore, the record identifier and the record content of the record that needs to be backed up are written to the backup storage file (step S5).
7). That is, the data contents are written to the disk device provided for the backup storage file in logical record units, and thereby the backup is performed. In this way, when the backup processing for all the tables is completed, the online backup is completed. Next, a recovery method from medium destruction will be described with reference to FIG. FIG. 6 is a flowchart for explaining a recovery method from medium destruction according to the present invention.

【0016】従来と異なるのは、バックアップのリスト
ア方法である。従来は、ファイルコピーによりリストア
したが、本発明の方式では、以下の処理が必要である。
最初に媒体破壊されたデータベースファイルを再度作成
する(ステップS61)。即ち、障害が発生したディス
クを取り換え、新たなディスク中にデータベース領域を
確保する。ただし、ここで作成されたデータベースファ
イルにはデータは格納されていない状態でなければなら
ない。次に、バックアップ格納ファイル16中にバック
アップされたすべてのテーブルに対して以下の処理を行
なう(ステップS62)。まず、テーブル識別子、構成
情報により空のテーブルを作成する(ステップS6
3)。即ち、データ内容を含まないテーブル識別子及び
レコード長、レコード属性等のみのテーブルを作成す
る。この空のテーブルに対し、バックアップ格納ファイ
ル16に格納されているレコードをレコード識別子で示
された位置に格納し、テーブルを完成させる(ステップ
S64)。
What is different from the conventional method is a backup restoration method. Conventionally, restoration was performed by file copying, but the method of the present invention requires the following processing.
The database file in which the medium is destroyed first is created again (step S61). That is, the failed disk is replaced and the database area is secured in the new disk. However, the database file created here must not contain any data. Next, the following processing is performed on all the tables backed up in the backup storage file 16 (step S62). First, an empty table is created from the table identifier and the configuration information (step S6).
3). That is, a table is created that does not include data contents, but only has a table identifier, record length, record attributes, and the like. With respect to this empty table, the record stored in the backup storage file 16 is stored at the position indicated by the record identifier to complete the table (step S64).

【0017】すべてのテーブルに対して以上の処理を終
了した後、バックアップされていたリカバリ情報ファイ
ル13をリストアする(ステップS65)。即ち、リカ
バリ情報ファイルのコピー17から読み出したデータを
リカバリ情報ファイル13に書き込む。次に、リカバリ
を開始する(ステップS66)。ここでのリカバリは従
来方式とほぼ同様の方法で行なう。即ち、リストアした
リカバリ情報ファイル13からリカバリを開始すべきジ
ャーナルの位置をリードし、ジャーナルファイル12よ
りジャーナルを読み、各レコードを回復する。例外は、
破壊された索引テーブルのリカバリは行なわないことで
ある。破壊された索引テーブルは、リカバリ終了後、デ
ータベース中の索引構成テーブルにより、索引テーブル
を再作成する(ステップS67)。即ち、索引構成テー
ブルは以上のリカバリで正常な状態にされている。従っ
て、索引構成テーブル中の索引識別子、索引長、対応レ
コード識別子等を元に索引レコードを作成し、索引テー
ブルを再作成する。これで、すべてのテーブルがリカバ
リされる。この後、データベース管理システムの運用を
開始する(ステップS68)。
After the above processing is completed for all the tables, the backed up recovery information file 13 is restored (step S65). That is, the data read from the copy 17 of the recovery information file is written in the recovery information file 13. Next, recovery is started (step S66). The recovery here is carried out by a method substantially similar to the conventional method. That is, the position of the journal to start recovery is read from the restored recovery information file 13, the journal is read from the journal file 12, and each record is recovered. The exception is
The recovery of the corrupted index table is not performed. After the recovery is completed, the destroyed index table is recreated by the index configuration table in the database (step S67). That is, the index configuration table is in a normal state by the above recovery. Therefore, an index record is created based on the index identifier, index length, corresponding record identifier, etc. in the index configuration table, and the index table is recreated. This will recover all the tables. Then, the operation of the database management system is started (step S68).

【0018】[0018]

【発明の効果】以上説明したように、本発明のオンライ
ンバックアップ及び障害回復方式によれば、索引レコー
ドを含まない最小限のレコードを格納するためのデータ
構造を記憶する情報とレコード内容のみをバックアップ
し、ファイル回復するようにしたので、バックアップす
るデータ量を減少させることができ、高速にバックアッ
プすることができる。この結果、コミットメント制御に
論値ジャーナル方式を用いたデータベース管理システム
において、データベースのオンラインバックアップを行
なうことが可能となり、これを用いてデータベースをリ
カバリすることが可能となる。従って、データベースの
媒体破壊から短時間でデータベースを復旧することが可
能となる。
As described above, according to the online backup and failure recovery method of the present invention, only the information storing the data structure for storing the minimum records not including the index record and the record contents are backed up. Since the files are recovered, the amount of data to be backed up can be reduced and the data can be backed up at high speed. As a result, in a database management system that uses the logical-value journal method for commitment control, it is possible to perform online backup of the database and use this to recover the database. Therefore, it becomes possible to recover the database in a short time from the medium destruction of the database.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の方式を適用したシステムの一実施例の
ブロック図である。
FIG. 1 is a block diagram of an embodiment of a system to which the system of the present invention is applied.

【図2】従来のオンラインシステムの構成を示すブロッ
ク図である。
FIG. 2 is a block diagram showing a configuration of a conventional online system.

【図3】従来のバックアップ方法を説明するフローチャ
ートである。
FIG. 3 is a flowchart illustrating a conventional backup method.

【図4】従来の媒体破壊からのリカバリ方法を説明する
フローチャートである。
FIG. 4 is a flowchart illustrating a conventional recovery method from medium destruction.

【図5】本発明によるオンラインバックアップ作成方法
を説明するフローチャートである。
FIG. 5 is a flowchart illustrating an online backup creating method according to the present invention.

【図6】本発明による媒体破壊からのリカバリ方法を説
明するフローチャートである。
FIG. 6 is a flowchart illustrating a recovery method from medium destruction according to the present invention.

【符号の説明】[Explanation of symbols]

10 データベース管理システム 11 データベースファイル 12 ジャーナルファイル 13 リカバリ情報ファイル 14 オンラインバックアップ作成装置 15 ファイルコピーコマンド 16 バックアップ格納ファイル 17 リカバリ情報ファイルのコピー 10 Database Management System 11 Database File 12 Journal File 13 Recovery Information File 14 Online Backup Creation Device 15 File Copy Command 16 Backup Storage File 17 Copy Recovery Information File

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 論理レコードにより構成されるテーブル
から成るデータベースを、当該データベースを格納する
データベースファイルと、当該データベースの更新差分
を格納するジャーナルファイルにより管理する場合にお
いて、 所定のオンラインバックアップ作成装置が前記データベ
ースの更新中に前記データベースファイルから前記論理
レコードを検索するための索引レコードを除く、論理レ
コードにより構成されるテーブルの識別子及び構成情報
を所定のバックアップ格納ファイルに格納するととも
に、 前記所定のオンラインバックアップ作成装置が前記更新
により削除されない論理レコードの識別子及び内容のみ
を前記所定のバックアップ格納ファイルに格納すること
により、前記所定のオンラインバックアップ作成装置が
オンライン動作中のデータベースのバックアップを行な
い、 障害回復時は、所定のファイル回復装置が当該バックア
ップされた論理レコードの識別子及び内容と、テーブル
の識別子及び構成情報とから前記テーブルを作成し、 更に、作成されたテーブルから各テーブルを検索する索
引テーブルを作成して前記バックアップ時のデータベー
スファイルを再現することを特徴とするオンラインバッ
クアップ及び障害回復方式。
1. In a case where a database composed of a table composed of logical records is managed by a database file storing the database and a journal file storing the update difference of the database, a predetermined online backup creating device Excluding the index record for searching the logical record from the database file during updating of the database, the identifier of the table constituted by the logical record and the configuration information are stored in a predetermined backup storage file, and the predetermined online backup is performed. By storing in the predetermined backup storage file only the identifiers and contents of the logical records that are not deleted by the updating device by the updating device, the predetermined online backup creating device is online. When a failure recovery is performed, a prescribed file recovery device creates the table from the identifier and contents of the backed up logical record, the table identifier and the configuration information, and further creates the table. An online backup and failure recovery method is characterized in that an index table for searching each table is created from the created table and the database file at the time of the backup is reproduced.
JP4322391A 1992-11-06 1992-11-06 On-line backup and fault recovery system Pending JPH06149641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4322391A JPH06149641A (en) 1992-11-06 1992-11-06 On-line backup and fault recovery system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4322391A JPH06149641A (en) 1992-11-06 1992-11-06 On-line backup and fault recovery system

Publications (1)

Publication Number Publication Date
JPH06149641A true JPH06149641A (en) 1994-05-31

Family

ID=18143146

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4322391A Pending JPH06149641A (en) 1992-11-06 1992-11-06 On-line backup and fault recovery system

Country Status (1)

Country Link
JP (1) JPH06149641A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023007959A (en) * 2021-07-02 2023-01-19 Eaglys株式会社 Data management system, data management method, and data management program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023007959A (en) * 2021-07-02 2023-01-19 Eaglys株式会社 Data management system, data management method, and data management program

Similar Documents

Publication Publication Date Title
AU700681B2 (en) A method of operating a computer system
US7523276B1 (en) Synchronization of selected data from snapshots stored on different storage volumes
US20030163493A1 (en) System and method for restoring a file system from backups in the presence of deletions
US7631020B1 (en) Method and system of generating a proxy for a database
JPS5913783B2 (en) Duplicate file method
US7529973B2 (en) Method of and apparatus for taking back-up and checking alteration of data, and computer product
JPH06149641A (en) On-line backup and fault recovery system
JP2820352B2 (en) Image data filing equipment
JP2633614B2 (en) File protection device
JPH033046A (en) Log record control system
CN107402850B (en) Redundancy method and device for database data files
JPH08314784A (en) File management device
JPH06124169A (en) Duplex systematized optical disk device and automatic i/o error restoring method
JP3220182B2 (en) File copying machine
JPS63187347A (en) Data base file recovering system
JP2000207264A (en) Backup method and restoring method
JP2806342B2 (en) Database failure recovery method and device
JPH01237716A (en) Volume switching system
JPS63262737A (en) Data base updating and recording processing method
JP2746102B2 (en) One point backup method of business data file in case of magnetic disk device failure
JPH01140353A (en) System for maintaining data in data base
JPH04184641A (en) Data base restoring system
JPS63303442A (en) Data dictionary/directory restoring system
JPS6167153A (en) Partial trouble recovery processing system of direct access storage device
JPH0581103A (en) System for restoring duplexing film