JPH0259838A - File restoring system applying optimization of storing position for file restoring information - Google Patents

File restoring system applying optimization of storing position for file restoring information

Info

Publication number
JPH0259838A
JPH0259838A JP63209487A JP20948788A JPH0259838A JP H0259838 A JPH0259838 A JP H0259838A JP 63209487 A JP63209487 A JP 63209487A JP 20948788 A JP20948788 A JP 20948788A JP H0259838 A JPH0259838 A JP H0259838A
Authority
JP
Japan
Prior art keywords
file
log file
log
restoring
information
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
JP63209487A
Other languages
Japanese (ja)
Inventor
Tadatsugu Asano
浅野 只嗣
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP63209487A priority Critical patent/JPH0259838A/en
Publication of JPH0259838A publication Critical patent/JPH0259838A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To start the restoration at and after the latest log file and to shorten the restoring time when a file fault occurs by preparing a restoring file information part, a restoring file information retrieving part, a restoring file update request part, a log file swap event deciding part, and a log file swap event informing part. CONSTITUTION:A file restoring information output part 10 includes a restoring file information control part 11, a restoring file information retrieving part 12 and a restoring file update request part 13. A log file access control part 20 includes a log file control part 21, a log file swap event deciding part 22, a log file writing part 23 and a log file swap event informing part 24. A file access control part 30 includes a file updating part 31 and a log file writing request part 32. Then a log file 40 is added. When a file #1 has a fault, the record address updated in the file #1 and an update record image are extracted out of a log file #2. Then the file #1 is updated with the update record image. Thus the file #1 is restored and this restoring time is shortened.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、ファイル障害発生時におけるファイル復旧方
式に関し、特に復旧情報格納位置を最適化するファイル
復旧方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a file recovery method when a file failure occurs, and particularly to a file recovery method that optimizes the storage location of recovery information.

[従来の技術] 従来、この種のファイル復旧方式は、あらかじめ、ファ
イルが更新される前のファイル格納情報をセーブしてお
き、プログラムより当該ファイルが更新された時に、更
新された情報をロギングしている。そして、当該ファイ
ルに障害が発生した時、正常にアクセス可能な磁気ディ
スクへファイルを設定し、そのファイルへ事前にセーブ
された情報を格納し、障害が発生した時点までのファイ
ル更新情報を格納することにより、ファイルを更新の状
態に復旧していた。
[Prior art] Conventionally, this type of file recovery method saves file storage information before the file is updated, and then logs the updated information when the file is updated by a program. ing. Then, when a failure occurs in the file, the file is set on a normally accessible magnetic disk, the previously saved information is stored in that file, and the file update information up to the time the failure occurs is stored. By doing so, the file was restored to an updated state.

[考案が解決しようとする課題] 上述した従来のファイル復旧方式では、ファイルの格納
情報をセーブした時点から、ファイル障害発生時までの
ファイル更新情報の全てを使用してファイルの復旧を行
なっているので、ファイル更新情報の量が多くなるほど
、ファイル復旧の時間が長くなるという欠点がある。
[Problem that the invention aims to solve] In the conventional file recovery method described above, files are recovered using all of the file update information from the time the file storage information was saved until the time a file failure occurred. Therefore, the disadvantage is that the larger the amount of file update information, the longer it takes to restore the file.

[課題を解決するための手段] 本発明のファイル復旧情報格納位置の最適化によるファ
イル復旧方式は、プログラムよりファイルの書込み、参
照要求があった時、当該レコードをファイルへ書込み、
またはファイルより読込み、当該レコードの情報をログ
ファイルに書込み要求を行うファイルアクセス制御手段
と、上記ファイルアクセス制御手段よりログファイルへ
書込み要求があった時、ログファイルへデータを書込み
、ログファイルが満杯になった時にあるプログラムへ満
杯になった事象を通知するログファイルアクセス制御手
段と、上記ログファイルアクセス制御手段よりログファ
イルに書込み要求があった時にデータを格納、蓄積する
ログファイルと、上記ログファイルアクセス制御手段よ
りログファイルが満杯になった場合に、満杯となった事
象を受付けて次のログファイルに復旧すべきファイルの
復1日情報を格納するため当該ファイルを一旦読込み、
そのイメージで書込み要求を上記ファイルアクセス制御
手段に指示するファイル復旧情報出力手段とを有してい
る。
[Means for Solving the Problems] The file recovery method of the present invention by optimizing the storage location of file recovery information writes the record to the file when a file write or reference request is received from the program.
Or a file access control means that reads from a file and requests to write information of the record to a log file, and when a write request is received from the file access control means to the log file, writes data to the log file and the log file becomes full. a log file access control means that notifies a certain program of a full event when the log file becomes full; a log file that stores and accumulates data when there is a write request to the log file from the log file access control means; When a log file becomes full due to the file access control means, the file is read once in order to accept the full event and store the recovery information of the file to be restored in the next log file.
and file recovery information output means for instructing the file access control means to issue a write request based on the image.

[実施例] 次に、本発明について図面を参照して説明する。[Example] Next, the present invention will be explained with reference to the drawings.

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

本発明によるファイル復旧方式は、復旧ファイル情報管
理部11と復旧ファイル情報検索部12と復旧ファイル
更新要求部13とからなるファイル復旧情報出力部10
と、ログファイル管理部21とログファイルスワップ事
象判定部22とログファイル書込み部23とログファイ
ルスワップ事象通知部24とからなるログファイルアク
セス制御部20と、ファイル更新部31とログファイル
書込み要求部32とからなるフフルイルアクセス制御部
30と、ログファイル40とから構成される。
The file recovery method according to the present invention includes a file recovery information output section 10 that includes a recovery file information management section 11, a recovery file information search section 12, and a recovery file update request section 13.
, a log file access control unit 20 consisting of a log file management unit 21, a log file swap event determination unit 22, a log file write unit 23, and a log file swap event notification unit 24, a file update unit 31, and a log file write request unit. 32, and a log file 40.

第2図を2照すると、復旧ファイル情報管理部11は、
復旧対象のファイル毎にファイル名と当該ファイル中で
復旧すべきレコードのアドレスか設定されている。本例
では、ファイル#1.#2゜#3が復旧対象のファイル
であり、ファイル#1ではal レコード、ファイル#
2ではbルコード、ファイル#3では、C1と02レコ
ードが復旧対象レコードとなっていることを示したもの
である。
Referring to FIG. 2, the recovery file information management unit 11:
For each file to be restored, the file name and the address of the record to be restored in the file are set. In this example, file #1. #2゜#3 is the file to be restored, file #1 has an al record, file #
2 indicates the b code, and file #3 indicates that the C1 and 02 records are the records to be recovered.

第3図を参照すると、ログファイル管理部21は、ログ
ファイル毎にファイル名と各ログファイルの容量、ログ
ファイルの書込み可能容量、ログファイルの書込み可能
な開始アドレスが設定されている。
Referring to FIG. 3, in the log file management section 21, a file name, capacity of each log file, writable capacity of the log file, and start address at which the log file can be written are set for each log file.

第4図はログファイル40のレコードフォーマットを示
したものであり、更新のあったファイル情報と、更新さ
れたレコードのアドレスと、更新されたレコードのイメ
ージより構成される。本例では、ファイル#1のa、レ
コードが更新されたことを示したものである。
FIG. 4 shows the record format of the log file 40, which is composed of updated file information, the address of the updated record, and an image of the updated record. This example shows that record a of file #1 has been updated.

第1図に戻って、復旧ファイル情報検索部12は、ある
ログファイル40が満杯となった時に、ログファイルア
クセス制御部20よりその旨の通知を受付け、復旧ファ
イル情報管理部11を参照して復旧対象のファイルと当
該ファイルで復旧すべきレコードのアドレスを得る機能
を持つ。復旧ファイル更新要求部13は、復旧ファイル
情報検索部12で得たレコードアドレスに格納されてい
るレコードを読込み、当該レコードのイメージをログフ
ァイル40へ格納するため、同じアドレスでファイルに
書込む要求を行う機能を持つ。
Returning to FIG. 1, when a certain log file 40 becomes full, the recovery file information search unit 12 receives a notification to that effect from the log file access control unit 20, and refers to the recovery file information management unit 11. It has a function to obtain the file to be restored and the address of the record to be restored in the file. The recovery file update request unit 13 reads the record stored at the record address obtained by the recovery file information search unit 12, and sends a request to write to the file at the same address in order to store the image of the record in the log file 40. have the ability to do so.

ファイル更新部31は、ファイルに対して更新要求があ
ると、該当するファイルを認識して、指示のあったアド
レスへレコードを格納する機能を持つ。ログファイル書
込み要求部32は、ファイルに対して更新を行なった時
にその更新レコードのイメージをログファイル40へ書
込み要求を行う機能を持つ。
The file update unit 31 has a function of recognizing the corresponding file when there is an update request for a file and storing the record at the specified address. The log file write request unit 32 has a function of requesting to write an image of the updated record to the log file 40 when a file is updated.

ログファイルスワップ事象判定部22は、ログファイル
40に対して書込み要求があった時、ログファイル管理
部21を参照して書込み可能なログファイルを判断し、
書込み要求のあったレコードの大ぎさと当該ログファイ
ルの書込み可能な容量とを比較して、書込み可能であれ
ば書込み可能開始アドレスを得る。また、書込み不可能
であれば、スワップ事象判定部22は、当該ログファイ
ルは書込み不可能の旨をログファイル管理部21の書込
み可能フラグに設定し、当該ログファイルが満杯になっ
たことをログファイルスワップ事象通知部24へ通知す
るとともに、他の書込み可能なログファイルを認識して
そのログファイルの書込み可能アドレスを得る機能を持
つ。ログファイル書込み部23は、ログファイルスワッ
プ事象判定部21より得たログファイル書込み可能開始
アドレスへ書込み要求のあったレコードを該当するログ
ファイルに格納し、当該ログファイルの書込み可能な容
量より書込んだレコードの大きさを引き、書込み可能開
始アドレスを書込んだレコードの次のレコードアドレス
を差すように変更する機能を持つ。ログファイルスワッ
プ事象通知部24は、ログファイルスワップ事象判定部
21よりログファイルが満杯になったことか通知される
と、その旨の事象を渡すべきプログラムを判定し、当該
プログラムへ通知する機能を持つ。
When a write request is made to the log file 40, the log file swap event determination unit 22 refers to the log file management unit 21 and determines a writable log file,
The size of the record requested for writing is compared with the writable capacity of the log file, and if writable, a writable start address is obtained. If the log file is not writable, the swap event determination unit 22 sets the writable flag of the log file management unit 21 to the effect that the log file is not writable, and indicates to the log file that the log file is full. It has the function of notifying the file swap event notification unit 24, and also recognizing other writable log files and obtaining the writable address of the log file. The log file writing unit 23 stores the record requested to be written to the log file writable start address obtained from the log file swap event determination unit 21 in the corresponding log file, and writes from the writable capacity of the log file. It has a function that subtracts the size of the record and changes the writable start address to the next record address of the written record. When the log file swap event notification unit 24 is notified by the log file swap event determination unit 21 that the log file is full, it determines the program to which the event should be passed and notifies the program. have

次に、このように構成された本実施例のファイル復旧情
報格納位置の最適化によるファイル復旧方式の動作につ
いて説明する。
Next, the operation of the file recovery method by optimizing the file recovery information storage location of this embodiment configured as described above will be described.

ファイルに対して更新要求があると、ファイル更新部3
1は指示されたアドレスへ該当するレコードを更新する
とともに、ログファイル書込み要求部32に対してファ
イルが更新されたことを通知する。ログファイル書込み
要求部32は、更新されたファイル情報と更新レコード
アドレスと更新レコードイメージをログファイル40に
格納するため、ログファイルアクセス制御部20に対し
て書込み要求を出す。
When there is an update request for a file, the file update unit 3
1 updates the corresponding record at the specified address and notifies the log file write request unit 32 that the file has been updated. The log file write request unit 32 issues a write request to the log file access control unit 20 in order to store the updated file information, updated record address, and updated record image in the log file 40.

ログファイルスワップ事象判定部22は、ログファイル
管理部21を参照し、格納可能なログファイル#1と書
込むべきログファイルのアドレスを得て、当該アドレス
にログファイル書込み部23がファイル更新情報を書込
む。この様にしてつぎつぎとファイルの更新要求があり
、ログファイルスワップ事象判定部22がログファイル
#1に書込むことができなくなったことを認識すると、
ログファイル書込み部23に対して書込み可能なログフ
ァイル#2へ書込み指示を出すとともに、ログファイル
スワップ事象通知部24ヘログフアイル#1が満杯とな
ったことを通知する。
The log file swap event determination unit 22 refers to the log file management unit 21, obtains the addresses of the storable log file #1 and the log file to be written, and the log file writing unit 23 writes the file update information to the addresses. Write. In this way, there are file update requests one after another, and when the log file swap event determination unit 22 recognizes that it is no longer possible to write to log file #1,
It instructs the log file writing unit 23 to write to the writable log file #2, and notifies the log file swap event notification unit 24 that the log file #1 is full.

当該通知をログファイルスワップ事象通知部24が受付
けると、その旨の事象をファイル復旧情報出力部10に
通知する。
When the log file swap event notification unit 24 receives the notification, it notifies the file recovery information output unit 10 of the event.

復旧ファイル情報検索部12は、ログファイル#1が満
杯となった事象を受付けると、復旧ファイル情報管理部
11を参照し、復旧すべきファイルのレコードアドレス
を得て、復旧ファイル更新要求部13に対して当該レコ
ードの更新指示を出す。復旧ファイル更新要求部13は
、当該レコードをファイルから読込み、同じアドレスに
読込んだレコードイメージをそのままファイルに書戻す
要求を出す。
Upon receiving the event that log file #1 is full, the recovery file information search unit 12 refers to the recovery file information management unit 11, obtains the record address of the file to be recovered, and sends the request to the recovery file update request unit 13. An instruction is issued to update the record. The recovery file update request unit 13 reads the record from the file and issues a request to write the read record image back to the file as is at the same address.

ファイルアクセス制御部30は、当該レコードをファイ
ルに書くとともに、ログファイルアクセス制御部20に
対して更新されたファイル情報と更新レコードアドレス
と更新レコードイメージをログファイルに書込む要求を
出す。
The file access control unit 30 writes the record in the file, and issues a request to the log file access control unit 20 to write the updated file information, update record address, and update record image in the log file.

ログファイルアクセス制御部20は、書込み要求のあっ
たレコードをログファイル#2に書込む。
The log file access control unit 20 writes the record requested to be written to the log file #2.

したがって、ログファイル#1が満杯となると、ログフ
ァイル#2に復旧すべきファイルのレコード情報が全て
書込まれることになる。
Therefore, when log file #1 becomes full, all the record information of the file to be restored will be written to log file #2.

この状態でファイル#1が障害となった時のファイル復
旧手段を第5図を参照して説明する。
A file recovery method when file #1 becomes a failure in this state will be explained with reference to FIG.

まず、正常にアクセスできる位置へファイル#1を確保
(100)L、ファイル#1が更新される前の内容を事
前に保存媒体130に格納しておき、その保存媒体13
0の内容を一旦フアイル#1に格納(110)する。
First, secure file #1 in a location where it can be accessed normally (100). Store the contents of file #1 before it is updated in the storage medium 130 in advance, and
The contents of 0 are temporarily stored in file #1 (110).

次に、ファイル#1で更新のあったレコードを最新のイ
メージに復旧するため、ログファイル#2よりファイル
#1で更新のあったレコードアドレスと、更新レコード
イメージを抽出し、ファイル#1に対して当該更新レコ
ードイメージで更新(120)することにより、ファイ
ル#1が復旧できる。
Next, in order to restore the updated record in file #1 to the latest image, extract the record address updated in file #1 and the updated record image from log file #2, and restore it to file #1. File #1 can be restored by updating (120) with the updated record image.

[発明の効果] 以上説明したように本発明は、復旧7アイ情報部と、復
旧ファイル情報検索部と、復旧ファイル更新要求部と、
ログファイルスワップ事象判定部と、ログファイルスワ
ップ事象通知部を設けたことにより、ファイル障害が発
生しても最新の書込まれたログファイルからファイルを
復旧することができ、復旧時間の短縮が計れるという効
果がある。
[Effects of the Invention] As explained above, the present invention includes a recovery 7-eye information section, a recovery file information search section, a recovery file update request section,
By providing a log file swap event determination section and a log file swap event notification section, even if a file failure occurs, the file can be recovered from the latest written log file, reducing recovery time. There is an effect.

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

第1図は本発明の一実施例の構成を示すブロック、図、
第2図は第1図中に示した復旧ファイル情報管理部の構
成を示し、第3図は第1図中に示したログファイル管理
部の構成を示し、第4図は第1図中に示したログファイ
ルのレコードフォーマットの構成を示し、第5図はファ
イル#1が障害となった場合のファイル復旧手段を説明
するための図である。 10・・・ファイル復旧情報出力部、11・・・復旧フ
ァイル情報管理部、12・・・復旧ファイル情報検索部
、13・・・復旧ファイル更新要求部、20・・・ログ
ファイルアクセス制御部、21・・・ログファイル管理
部、22・・・ログファイルスワップ事象判定部、23
・・・ログファイル書込み部、24・・・ログファイル
スワップ事象通知部、30・・・ファイルアクセス制御
部、31・・・ファイル更新部、32・・・ログファイ
ル書込み要求部、40・・・ログファイル。 第2図 第3図 口 朱子各納レコード 第4図 n
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.
Figure 2 shows the configuration of the recovery file information management unit shown in Figure 1, Figure 3 shows the configuration of the log file management unit shown in Figure 1, and Figure 4 shows the configuration of the recovery file information management unit shown in Figure 1. The structure of the record format of the log file shown in FIG. 5 is shown, and FIG. 5 is a diagram for explaining file recovery means when file #1 becomes a failure. 10... File recovery information output unit, 11... Recovery file information management unit, 12... Recovery file information search unit, 13... Recovery file update request unit, 20... Log file access control unit, 21...Log file management unit, 22...Log file swap event determination unit, 23
...Log file writing unit, 24...Log file swap event notification unit, 30...File access control unit, 31...File update unit, 32...Log file write request unit, 40... logfile. Figure 2 Figure 3 Kuchi Shuko each payment record Figure 4 n

Claims (1)

【特許請求の範囲】[Claims] 1、プログラムよりファイルの書込み、参照要求があっ
た時、当該レコードをファイルへ書込みまたはファイル
より読込み、当該レコードの情報をログファイルに書込
み要求を行うファイルアクセス制御手段と、該ファイル
アクセス制御手段よりログファイルへ書込み要求があっ
た時、ログファイルへデータを書込み、ログファイルが
満杯になった時にあるプログラムへ満杯になった事象を
通知するログファイルアクセス制御手段と、該ログファ
イルアクセス制御手段よりログファイルに書込み要求が
あった時にデータを格納、蓄積するログファイルと、上
記ログファイルアクセス制御手段より、ログファイルが
満杯になった場合に満杯となった事象を受付けて次のロ
グファイルに復旧すべきファイルの復旧情報を格納する
ため当該ファイルを一旦読込み、そのイメージで書込み
要求を上記ファイルアクセス制御手段に指示するファイ
ル復旧情報出力手段とを有することを特徴とするファイ
ル復旧情報格納位置の最適化によるファイル復旧方式。
1. A file access control means for writing or reading the record to or from the file and requesting writing information of the record to a log file when there is a file write or reference request from the program; A log file access control means that writes data to the log file when there is a write request to the log file, and notifies a certain program of the full event when the log file becomes full; The log file stores and accumulates data when there is a write request to the log file, and the above log file access control means accepts the full event and restores to the next log file when the log file becomes full. and a file recovery information output means for once reading the file in order to store the recovery information of the file to be restored, and instructing the file access control means to write a write request using the image. File recovery method by .
JP63209487A 1988-08-25 1988-08-25 File restoring system applying optimization of storing position for file restoring information Pending JPH0259838A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63209487A JPH0259838A (en) 1988-08-25 1988-08-25 File restoring system applying optimization of storing position for file restoring information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63209487A JPH0259838A (en) 1988-08-25 1988-08-25 File restoring system applying optimization of storing position for file restoring information

Publications (1)

Publication Number Publication Date
JPH0259838A true JPH0259838A (en) 1990-02-28

Family

ID=16573640

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63209487A Pending JPH0259838A (en) 1988-08-25 1988-08-25 File restoring system applying optimization of storing position for file restoring information

Country Status (1)

Country Link
JP (1) JPH0259838A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5522037A (en) * 1993-09-20 1996-05-28 Fujitsu Limited Backup control apparatus and method of data processing system
CN104053521A (en) * 2011-11-09 2014-09-17 林肯环球股份有限公司 Apparatus and method for pulse welding with AC waveform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5522037A (en) * 1993-09-20 1996-05-28 Fujitsu Limited Backup control apparatus and method of data processing system
CN104053521A (en) * 2011-11-09 2014-09-17 林肯环球股份有限公司 Apparatus and method for pulse welding with AC waveform

Similar Documents

Publication Publication Date Title
US6557073B1 (en) Storage apparatus having a virtual storage area
US6311193B1 (en) Computer system
RU2182360C2 (en) Method for computer system stored data access, method for data filing, and computer system for implementing these methods
JP4199993B2 (en) How to get a snapshot
US7991749B2 (en) Database recovery method applying update journal and database log
US5086502A (en) Method of operating a data processing system
US20110022811A1 (en) Information backup/restoration processing apparatus and information backup/restoration processing system
JP2003280964A (en) Method for acquiring snapshot, storage system and disk device
CN102262568B (en) Power-down prevention Linux system startup method
JP5984151B2 (en) Data recovery method, program, and data processing system
US20050262316A1 (en) Backup acquisition method and disk array apparatus
JP3136258B2 (en) Disk update log recording method
US20050262033A1 (en) Data recording apparatus, data recording method, program for implementing the method, and program recording medium
JP4394467B2 (en) Storage system, server apparatus, and preceding copy data generation method
JPH0259838A (en) File restoring system applying optimization of storing position for file restoring information
JP4390618B2 (en) Database reorganization program, database reorganization method, and database reorganization apparatus
CN115033425A (en) Method for improving success rate of data backup
JP2001290686A (en) System and method for backup in disk shared filing system
JPH033046A (en) Log record control system
CN114880277B (en) Block device snapshot method, system and storage medium
JP2587417B2 (en) File backup and restoration method
JPS63187347A (en) Data base file recovering system
CN116483284B (en) Method, device, medium and electronic equipment for reading and writing virtual hard disk
JPH02257228A (en) File control system for data base system
JP2005316697A (en) Disk array system and method for data backup