JPH04184641A - Data base restoring system - Google Patents

Data base restoring system

Info

Publication number
JPH04184641A
JPH04184641A JP2315374A JP31537490A JPH04184641A JP H04184641 A JPH04184641 A JP H04184641A JP 2315374 A JP2315374 A JP 2315374A JP 31537490 A JP31537490 A JP 31537490A JP H04184641 A JPH04184641 A JP H04184641A
Authority
JP
Japan
Prior art keywords
data
database
file
journal
tape
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
JP2315374A
Other languages
Japanese (ja)
Inventor
Yuzo Nagao
永尾 雄三
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.)
Renesas Semiconductor Manufacturing Co Ltd
Kansai Nippon Electric Co Ltd
Original Assignee
Renesas Semiconductor Manufacturing Co Ltd
Kansai Nippon Electric 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 Renesas Semiconductor Manufacturing Co Ltd, Kansai Nippon Electric Co Ltd filed Critical Renesas Semiconductor Manufacturing Co Ltd
Priority to JP2315374A priority Critical patent/JPH04184641A/en
Publication of JPH04184641A publication Critical patent/JPH04184641A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To reduce the consumption of a magnetic tape and at the same time to restore a data base at a high speed by reducing the quantity of data which are stored in an external store medium like the magnetic tape, etc., from an external temporary medium like a magnetic disk, etc., and furthermore reducing the quantity of data which are processed when the data base is restored from the external store medium. CONSTITUTION:When an operation is started, the initial state of an old data base 1 is saved to a data base saving tape 7. Thereafter the data on the updated part are successively generated and written into a disk file 3. When the file 3 is filled with the data, the data are called out of the file 3 by a journal collecting means 4 in the order opposite to the writing order and stored in a magnetic tape 5. Thus the quantity of data to be produced to the tape 5 is extremely reduced, and a file area is secured in a new data base 8 when a data base having a fault is restored with use of a produced journal. Then the faulty data base is restored from the tape 7 and the data on each file are read out by a restorage processing means 6 in the order opposite to the writing order.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータベース復旧方式に関し、特に大規模また
は中規模のデータベースを有し、データベースを更新し
つつ処理を行う情報処理システムにおいて、障害が発生
したとき緊急にデータベースを復旧するデータベース復
旧方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a database recovery method, and is particularly applicable to an information processing system that has a large or medium-sized database and performs processing while updating the database. This invention relates to a database recovery method for emergency database recovery in the event of an emergency.

〔従来の技術〕[Conventional technology]

障害で破壊されたデータベースを障害の発生前の状態に
復旧するためには、データベースの更新が行われるごと
にジャーナルデータとして更新部分の更新後データを磁
気ディスク等の一時外部媒体に格納し、この−時外部媒
体が一杯になると磁気テープ等の保存外部媒体に収集し
て保存しておく、障害が回復してデータベースを復旧す
るときには、まず保存外部媒体に格納保存されている運
転開始時のデータをデータベースに読み込み、保存外部
媒体に収集したジャーナルデータを用いてこれを更新す
ることによって障害発生前のデータベースを復旧する。
In order to restore a database destroyed by a failure to the state before the failure occurred, each time the database is updated, the updated data of the updated part is stored as journal data in a temporary external medium such as a magnetic disk, and this data is stored in a temporary external medium such as a magnetic disk. - When the external medium becomes full, the data is collected and saved on an external storage medium such as magnetic tape. When a failure is recovered and the database is restored, the data at the start of operation that is stored on the external storage medium is first stored. The database is restored to the state before the failure occurred by loading the data into the database and updating it using the journal data collected on the storage external medium.

従来のデータベース復旧方式では、磁気ディスクから磁
気テープに更新後データを収集して保存用のジャーナル
を作成する際に、磁気ディスクから時系列順にファイル
中のすべてのデータを磁気テープに読み込んで収集して
いる。そして、データベースを初期状態から障害の発生
前の状態に更新する際には、磁気テープに蓄積されたす
べてのデータを先頭から順に読み、データベースに書き
出して復旧していくのが一般的である。
In conventional database recovery methods, when creating a journal for storage by collecting updated data from a magnetic disk onto a magnetic tape, all data in a file is read from the magnetic disk in chronological order onto the magnetic tape and collected. ing. When updating a database from its initial state to the state before a failure occurred, it is common to read all the data stored on the magnetic tape in order from the beginning and write it to the database for recovery.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のデータベース復旧方式では、すべての更
新後データを磁気テープに収集しジャーナルを作成する
ので、格納するデータ量が多く、従って磁気テープの使
用量も多くなるという欠点がある。更に、データベース
を復旧する際には、磁気テープに蓄積されたすべてのジ
ャーナルデータを先頭から書き出してデータベースを時
系列的に復旧していくので非常に時間がかかるという欠
点がある。
In the conventional database recovery method described above, all updated data is collected on a magnetic tape and a journal is created, so there is a drawback that the amount of data to be stored is large, and therefore the amount of magnetic tape used is also large. Furthermore, when restoring a database, all the journal data stored on the magnetic tape is written from the beginning and the database is restored in chronological order, which is a disadvantage in that it takes a very long time.

本発明の目的は、磁気テープ等の保存外部媒体に収集す
るジャーナルのデータ量が少なく、データベースの復旧
を高速で行えるデータベース復旧方式を提供することで
ある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a database recovery method that reduces the amount of journal data collected on an external storage medium such as a magnetic tape and allows database recovery to be performed at high speed.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のデータベース復旧方式は、データベースを更新
するごとに更新部分の更新後データを磁気ディスク等の
一時外部媒体に格納するデータベース更新手段と、前記
一時外部媒体上のデータを時系列的に最後のデータから
逆読みし且つ同一ファイル同一ブロックのデータは最新
時刻のデータのみを磁気テープ等の保存外部媒体上のジ
ャーナルファイルに収集するジャーナル収集手段と、障
害が回復しデータベースを復旧するとき前記ジャーナル
ファイルを作成された時系列順とは逆順で各ジャーナル
ファイルの先頭から順読みし且つ同一ファイル同一ブロ
ックのデータは最新の時刻のデータのみをデータベース
に書き込む復旧処理手段とを備えて構成されている。
The database recovery method of the present invention includes a database update means that stores the updated data of the updated part in a temporary external medium such as a magnetic disk every time the database is updated, and a database update unit that stores the updated data of the updated part in a temporary external medium such as a magnetic disk, and A journal collection means that reads backwards from the data and collects only the latest time data of the same file and the same block into a journal file on a storage external medium such as a magnetic tape, and when the database is restored after a failure, the journal file is stored. The system is configured to include a recovery processing means that sequentially reads each journal file from the beginning in the reverse order of the chronological order in which it was created, and writes only the latest time data of the same block of the same file to the database.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例の構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

第1図において、■は障害が発生する以前の旧データベ
ースであり、ファイルAとファイルBとで構成されてい
る。2はデータベース更新手段、3は更新ごとに更新後
データを蓄積するディスクファイル、4はジャーナル収
集手段、5はジャーナルファイルを収集する磁気テープ
、6は復旧処理手段、7は運転開始時の旧データベース
1の内容を保存しているデータベース退避テープ、8は
復旧後の新データベースである。
In FIG. 1, ■ is the old database before the failure occurred, and is composed of file A and file B. 2 is a database update means, 3 is a disk file that stores updated data for each update, 4 is a journal collection means, 5 is a magnetic tape that collects journal files, 6 is a recovery processing means, 7 is an old database at the time of starting operation The database backup tape 8 stores the contents of 1, and the new database after recovery.

第2図は本実施例におけるデータ処理手順の説明図であ
る。図中、31〜33はそれぞれデータベース更新手段
2によりディスクファイル3に蓄積されたディスクジャ
ーナルデータで、それぞれ時系列的に1〜3番目に蓄積
されたものである。
FIG. 2 is an explanatory diagram of the data processing procedure in this embodiment. In the figure, numerals 31 to 33 indicate disk journal data accumulated in the disk file 3 by the database updating means 2, and are the first to third accumulated in chronological order, respectively.

51〜53はジャーナル収集手段4によって磁気テープ
5のジャーナルファイルに収集されたテープジャーナル
データ、81は復旧処理手段6による新データベース8
の復旧順序を示す更新ジャーナルデータである。
51 to 53 are tape journal data collected in the journal file of the magnetic tape 5 by the journal collection means 4, and 81 is a new database 8 created by the recovery processing means 6.
This is update journal data indicating the recovery order.

以下、第1図および第2図を参照しデータベースの復旧
動作を説明する。
The database recovery operation will be described below with reference to FIGS. 1 and 2.

運転開始に当たり、まず、旧データベース1の初期状態
をデータベース退避テープ7に退避させておく、以後、
データベース更新手段2は、データベースの更新を行う
ごとに更新した部分の更新後データをディスクファイル
3に発生順に書き込み、第2図に示すディスクジャーナ
ルデータ31〜33が得られる。第2図中の■、■等の
丸で囲んだ数字は書き込んだ順番を、A2,85等の記
号はデータベースのファイルAブロック番号2゜ファイ
ルBブロック番号5の更新後データが格納されることを
表している9 ディスクファイル3が一杯になると、ジャーナル収集手
段4が、書込みの時とは逆の順番でディスクファイル3
のデータを読み出して磁気テープ5へ格納する。すなわ
ち、第2図に示すディスクジャーナルデータ31〜33
の先頭からすべてのデータを読み出すのではなく、最後
のデータから時系列と逆に読み出していく。更に、磁気
テープ5に書き込むとき、同一ファイル同一ブロック番
号のデータは先に見つかったデータのみを書き出す。こ
の結果、同一ファイル同一ブロック番号のデータは発生
時刻の最も遅いデータのみ書き込まれ、それより前の時
刻のデータは書き込まれず、ディスクジャーナルデータ
31〜33はそれぞれテープジャーナルデータ51〜5
3となる。
Before starting operation, first save the initial state of the old database 1 to the database save tape 7.
Every time the database is updated, the database updating means 2 writes the updated data of the updated portion into the disk file 3 in the order of occurrence, thereby obtaining the disk journal data 31 to 33 shown in FIG. 2. In Figure 2, the circled numbers such as ■ and ■ indicate the order in which they were written, and the symbols such as A2 and 85 indicate that the updated data of file A block number 2 and file B block number 5 in the database is stored. 9 When the disk file 3 becomes full, the journal collection means 4 writes the disk file 3 in the reverse order of writing.
The data is read out and stored on the magnetic tape 5. That is, the disk journal data 31 to 33 shown in FIG.
Instead of reading all the data from the beginning, it reads from the last data in reverse chronological order. Furthermore, when writing to the magnetic tape 5, only the data found earlier in the same file and the same block number is written. As a result, for data in the same file with the same block number, only the data with the latest generation time is written, and data with earlier times are not written, and disk journal data 31-33 are replaced by tape journal data 51-55, respectively.
It becomes 3.

すなわち、ジャーナル収集手段4によって磁気テープ5
に作成されるジャーナルは、データ量が大幅に削減され
ることとなる。
That is, the magnetic tape 5 is collected by the journal collecting means 4.
The amount of data in the journals created will be significantly reduced.

次に、このようにして作成したジャーナルを用いて障害
の発生したデータベースを復旧する手順を説明する。
Next, a procedure for restoring a failed database using the journal created in this way will be explained.

まず、新データベース8上にファイルA、Hのファイル
領域を確保し、データベース退避テープ7から運転開始
時のデータベースを復元する。次に復旧処理手段6はジ
ャーナルを作成した際とは逆の順序で各ジャーナルファ
イルのデータを読み出す、すなわち、最初に第2図のテ
ープジャーナルデータ53を読み、次にテープジャーナ
ルデータ52,51の順で読んでいく、テープジャーナ
ルデータは既に時系列とは逆の順番で書き込まれている
ので、各テープジャーナルデータの先頭のデータから読
み出してデータベースの該当ファイルの該当ブロックを
書き直す。このとき、テープジャーナルデータ53によ
り更新されたものと同一ファイル同一ブロックのデータ
が後で処理するテープジャーナルデータ51.52に存
在してし)ても、そのデータではデータベースの更新は
行わない、このようにして実際にデータベースを更新す
る順番を示したのが更新データジャーナル81である。
First, file areas for files A and H are secured on the new database 8, and the database at the start of operation is restored from the database backup tape 7. Next, the recovery processing means 6 reads the data of each journal file in the reverse order of creating the journal, that is, first reads the tape journal data 53 in FIG. 2, and then reads the tape journal data 52 and 51. The tape journal data, which is read in order, has already been written in the reverse chronological order, so the data is read from the beginning of each tape journal data and the corresponding block of the corresponding file in the database is rewritten. At this time, even if data of the same file and the same block as that updated by the tape journal data 53 exists in the tape journal data 51 and 52 to be processed later, the database will not be updated with that data. The update data journal 81 shows the order in which the database is actually updated in this way.

上述のようにしてテープジャーナルデータ51〜53を
全部読み出し、データベースへの更新ジャーナルデータ
81の書出しが終わると、データベースの復旧は完了す
る。
When all the tape journal data 51 to 53 are read out as described above and writing of the updated journal data 81 to the database is completed, the database restoration is completed.

以上述べたように、復旧処理手段6は最新時刻の更新後
データによりデータベースを更新し、同一ファイル同一
ブロックのデータは再度処理する必要がないので、実際
にデータベースを書き直す処理量は少なくて済み、それ
だけ処理時間も削減されることとなる。
As described above, the recovery processing means 6 updates the database with updated data at the latest time, and there is no need to process data in the same file and block again, so the amount of processing to actually rewrite the database is small. The processing time will be reduced accordingly.

なお、ディスクファイル3から磁気テープ5に書き込む
データ量が大幅に削減されているので、−本のテープ上
に複数のジャーナルファイルを作成することもできるが
、書き込む際にテープの後の部分から使用するようにす
ると、読み出す際に便利で復旧処理が一層速く行える。
Note that since the amount of data written from the disk file 3 to the magnetic tape 5 has been significantly reduced, it is possible to create multiple journal files on a single tape, but when writing, the data will be used starting from the later part of the tape. By doing so, it is convenient to read out and the recovery process can be performed even faster.

〔発明の効果〕〔Effect of the invention〕

以上詳細に説明したように、本発明は、磁気ディスク等
の一時外部媒体から磁気テープ等の保存外部媒体に蓄積
するデータ量を削減し、更に保存外部媒体からデータベ
ースを復旧する際のデータ処理量も削減しているので、
磁気テープの使用量が少なく、しかもデータベースの復
旧を高速で行える効果がある。
As explained in detail above, the present invention reduces the amount of data accumulated from a temporary external medium such as a magnetic disk to an external storage medium such as a magnetic tape, and furthermore reduces the amount of data processed when restoring a database from the external storage medium. We are also reducing
This has the effect of reducing the amount of magnetic tape used and allowing database recovery to be performed at high speed.

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図は本実施例におけるデータ処理手順の説明図である
。 1・・・・・・旧データベース、2・・・・・・データ
ベース更新手段、3・・・・・・ディスクファイlし、
4・・・・・−ジャーナル収集手段、5・・・・・−磁
気テープ、6・・・・・・復1日処理手段、7・・・・
・・データベース退避テープ、8・・・・・・新データ
ベース、31〜33・・・・・・ディスクジャーナルデ
ータ、51〜53・・・・・・テープジャーナルデータ
、81・・・・・・更新ジャーナIレデータ。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, and FIG. 2 is an explanatory diagram of a data processing procedure in this embodiment. 1... old database, 2... database update means, 3... disk file,
4...-Journal collection means, 5...-Magnetic tape, 6...Return day processing means, 7...
...Database backup tape, 8...New database, 31-33...Disk journal data, 51-53...Tape journal data, 81...Update Jhana I Redata.

Claims (1)

【特許請求の範囲】[Claims]  データベースを更新するごとに更新部分の更新後デー
タを磁気ディスク等の一時外部媒体に格納するデータベ
ース更新手段と、前記一時外部媒体上のデータを時系列
的に最後のデータから逆読みし且つ同一ファイル同一ブ
ロックのデータは最新時刻のデータのみを磁気テープ等
の保存外部媒体上のジャーナルファイルに収集するジャ
ーナル収集手段と、障害が回復しデータベースを復旧す
るとき前記ジャーナルファイルを作成された時系列順と
は逆順で各ジャーナルファイルの先頭から順読みし且つ
同一ファイル同一ブロックのデータは最新の時刻のデー
タのみをデータベースに書き込む復旧処理手段とを備え
たことを特徴とするデータベース復旧方式。
A database updating means stores the updated data of the updated part in a temporary external medium such as a magnetic disk each time the database is updated, and reads the data on the temporary external medium backward in chronological order starting from the last data and reads the data in the same file. For the data of the same block, there is a journal collection means that collects only the latest time data into a journal file on an external storage medium such as a magnetic tape, and when the database is restored after recovery from a failure, the journal file is stored in the chronological order in which it was created. A database recovery method characterized by comprising a recovery processing means that reads each journal file in reverse order from the beginning and writes only the latest time data of the same block of the same file to the database.
JP2315374A 1990-11-20 1990-11-20 Data base restoring system Pending JPH04184641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2315374A JPH04184641A (en) 1990-11-20 1990-11-20 Data base restoring system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2315374A JPH04184641A (en) 1990-11-20 1990-11-20 Data base restoring system

Publications (1)

Publication Number Publication Date
JPH04184641A true JPH04184641A (en) 1992-07-01

Family

ID=18064639

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2315374A Pending JPH04184641A (en) 1990-11-20 1990-11-20 Data base restoring system

Country Status (1)

Country Link
JP (1) JPH04184641A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08161211A (en) * 1994-12-09 1996-06-21 Nec Corp Method and device for restoring file by logging
WO1996027157A1 (en) * 1995-02-28 1996-09-06 Ntt Data Communications Systems Corporation Cooperative distributed system, and journal and recovery processings therein
JP2007183953A (en) * 2006-01-05 2007-07-19 Samsung Electronics Co Ltd System and method for managing log information
US8255367B2 (en) 2009-06-08 2012-08-28 Fujitsu Limited File management apparatus, method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08161211A (en) * 1994-12-09 1996-06-21 Nec Corp Method and device for restoring file by logging
WO1996027157A1 (en) * 1995-02-28 1996-09-06 Ntt Data Communications Systems Corporation Cooperative distributed system, and journal and recovery processings therein
US6052695A (en) * 1995-02-28 2000-04-18 Ntt Data Communications Systems Corporation Accurate completion of transaction in cooperative type distributed system and recovery procedure for same
JP2007183953A (en) * 2006-01-05 2007-07-19 Samsung Electronics Co Ltd System and method for managing log information
US8255367B2 (en) 2009-06-08 2012-08-28 Fujitsu Limited File management apparatus, method, and program

Similar Documents

Publication Publication Date Title
JP2718031B2 (en) History information acquisition method
US7197665B2 (en) Physical incremental backup using snapshots
JPH05233382A (en) Transaction matching resources restoring method
JPH04184641A (en) Data base restoring system
JPH07152627A (en) File recovery system
JPS62224843A (en) Database medium content maintaining system
JPH08212142A (en) Data backup system for data base
JPS63187347A (en) Data base file recovering system
JPS5856142B2 (en) Online recovery control method
JPS63217441A (en) Journal collecting system
JPH0385650A (en) Disk volume restoration system
JP2822869B2 (en) Library file management device
JPH01140353A (en) System for maintaining data in data base
JP2001188690A (en) Computer system and checkpoint information preserving method
JPS63262737A (en) Data base updating and recording processing method
JPH04209044A (en) Data base control system
JPH01125631A (en) System fault recovering system
JP2001337857A (en) Database restoration system
JPH04250539A (en) Journal acquisition system
JPH0259837A (en) Data recovery processing system
JP2000347918A (en) Data storage system and data backup method
CN118012669A (en) File metadata recovery system and method for distributed file system
JPH0350648A (en) Fault restoration method for data base
JPH06149641A (en) On-line backup and fault recovery system
JPH07262069A (en) Failure recovery method