JP2008171351A - Backup processor, backup processing method and program - Google Patents

Backup processor, backup processing method and program Download PDF

Info

Publication number
JP2008171351A
JP2008171351A JP2007006259A JP2007006259A JP2008171351A JP 2008171351 A JP2008171351 A JP 2008171351A JP 2007006259 A JP2007006259 A JP 2007006259A JP 2007006259 A JP2007006259 A JP 2007006259A JP 2008171351 A JP2008171351 A JP 2008171351A
Authority
JP
Japan
Prior art keywords
backup
session
storage medium
target data
data
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.)
Granted
Application number
JP2007006259A
Other languages
Japanese (ja)
Other versions
JP5056020B2 (en
Inventor
Eiji Minami
栄二 南
Harutoshi Wada
春俊 和田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007006259A priority Critical patent/JP5056020B2/en
Priority to US11/717,396 priority patent/US7698520B2/en
Publication of JP2008171351A publication Critical patent/JP2008171351A/en
Application granted granted Critical
Publication of JP5056020B2 publication Critical patent/JP5056020B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To secure already backed-up data even when failing in backup processing and not being able to continue processing. <P>SOLUTION: This backup processor 1 for backing up backup target data stored in a memory card 2 to a CD 3 calculates capacity of the CD 3 necessary when dividing the backup target data into a plurality of sessions and backing up them, and determines a session division number based on free capacity of the CD 3 and the calculated necessary capacity. The backup target data are divided into the session division number, and are copied to the CD 3 from the memory card 2. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、ある記録媒体に格納されているデータを他の記録媒体にバックアップするための技術に関し、特にバックアップに失敗したときのデータ損失リスクを低減するための技術に関する。     The present invention relates to a technique for backing up data stored in a certain recording medium to another recording medium, and more particularly to a technique for reducing the risk of data loss when backup fails.

電子式スチルカメラ(いわゆるデジタルカメラ)やデジタルビデオカメラなどで撮影した画像データは、まずカメラ内に格納されている半導体メモリなどに格納される。そして、ユーザは、この半導体メモリに格納されている画像データをCDあるいはDVDなどの他の記録媒体にバックアップした後、画像データを消去して、この半導体メモリを繰り返し利用する。   Image data taken by an electronic still camera (so-called digital camera), a digital video camera, or the like is first stored in a semiconductor memory or the like stored in the camera. Then, after the user backs up the image data stored in the semiconductor memory to another recording medium such as a CD or a DVD, the user erases the image data and repeatedly uses the semiconductor memory.

つまり、電子式スチルカメラやデジタルビデオカメラの普及により、一般ユーザが大容量データをバックアップする機会が急速に増加している。   In other words, with the widespread use of electronic still cameras and digital video cameras, opportunities for general users to back up large amounts of data are rapidly increasing.

例えば、CDなどにバックアップをするとともに、元データが格納されている記憶媒体から元データを消去する場合、バックアップの途中でエラーが発生し、バックアップ処理が完了しないときは、CDに書き込んだデータはすべて失われてしまう。   For example, when backing up to a CD or the like and erasing the original data from the storage medium storing the original data, if an error occurs during the backup and the backup process is not completed, the data written to the CD is All will be lost.

そこで、特許文献1には、このような場合にデータの論理的な整合を保つように、自動的にバックアップ処理を継続するためシステムが開示されている。
特開平9−305974号公報 特開2005−111943号公報
Therefore, Patent Document 1 discloses a system for automatically continuing the backup process so that the logical alignment of data is maintained in such a case.
JP-A-9-305974 JP 2005-111943 A

近年、バッテリー駆動可能な携帯型端末でバックアップ処理が可能なものが実用されている。この端末を用いた場合、バックアップ処理途中でのバッテリー切れ、あるいは外部からの衝撃等によるエラーが発生する確率が高くなる。このような場合は、特許文献1のようにバックアップ処理を継続することができない。   In recent years, battery-driven portable terminals capable of backup processing have been put into practical use. When this terminal is used, there is a high probability that an error will occur due to the battery running out in the middle of the backup process or an external impact. In such a case, the backup process cannot be continued as in Patent Document 1.

そこで、本発明の目的は、バックアップ処理に失敗し、処理を継続できないようなときであっても、既にバックアップしたデータを確保できるようにすることである。   Therefore, an object of the present invention is to ensure data that has already been backed up even when backup processing fails and processing cannot be continued.

本発明の別の目的は、バックアップが正常終了した場合でも、その後傷または汚れなどにより記録媒体が物理的に損傷したときでも、一部のデータの読み出しを可能とすることである。   Another object of the present invention is to make it possible to read a part of data even when the backup is completed normally or when the recording medium is physically damaged due to scratches or dirt.

上記目的を達成するための主たる発明は、
第1の記憶媒体に記憶されているバックアップ対象データを第2の記憶媒体へバックアップするためのバックアップ処理装置であって、
前記バックアップ対象データを複数のセッションに分割してバックアップする場合に必要な第2の記憶媒体の容量を算出し、当該算出された必要な容量と前記第2の記憶媒体の空き容量とに基づいてセッション分割数を決定する分割手段と、
前記バックアップ対象データを、前記セッション分割数に分けて、第1の記憶媒体から第2の記憶媒体へコピーするコピー手段と、
を備えるバックアップ処理装置である。
本発明の他の特徴については、本明細書及び添付図面の記載により明らかにする。
The main invention for achieving the above object is:
A backup processing device for backing up backup target data stored in a first storage medium to a second storage medium,
The capacity of the second storage medium required when the backup target data is divided into a plurality of sessions for backup is calculated, and based on the calculated required capacity and the free capacity of the second storage medium A dividing means for determining the number of session divisions;
A copy unit that divides the backup target data into the number of divided sessions and copies it from a first storage medium to a second storage medium;
Is a backup processing apparatus.
Other features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

本明細書及び添付図面の記載により、少なくとも、以下の事項が明らかとなる。
第1の記憶媒体に記憶されているバックアップ対象データを第2の記憶媒体へバックアップするためのバックアップ処理装置であって、
前記バックアップ対象データを複数のセッションに分割してバックアップする場合に必要な第2の記憶媒体の容量を算出し、当該算出された必要な容量と前記第2の記憶媒体の空き容量とに基づいてセッション分割数を決定する分割手段と、
前記バックアップ対象データを、前記セッション分割数に分けて、第1の記憶媒体から第2の記憶媒体へコピーするコピー手段と、
を備えるバックアップ処理装置。
このようにすることで、バックアップ処理に失敗し、処理を継続できないようなときであっても、既にバックアップしたデータを確保できるようにすることができる。
At least the following matters will become clear from the description of the present specification and the accompanying drawings.
A backup processing device for backing up backup target data stored in a first storage medium to a second storage medium,
The capacity of the second storage medium required when the backup target data is divided into a plurality of sessions for backup is calculated, and based on the calculated required capacity and the free capacity of the second storage medium A dividing means for determining the number of session divisions;
A copy unit that divides the backup target data into the number of divided sessions and copies it from a first storage medium to a second storage medium;
A backup processing apparatus comprising:
By doing so, it is possible to secure already backed up data even when the backup process fails and the process cannot be continued.

かかるバックアップ処理装置であって、前記第2の記憶媒体はバッテリー駆動される装置により制御され、前記バックアップ処理装置は、前記バッテリー駆動される装置のバッテリー残量を監視する監視手段をさらに備えることが望ましい。また、前記バッテリー残量が前記バックアップ対象データを前記第2の記憶媒体にバックアップするのに十分な残量であると前記監視手段によって判定されるときにおいて、前記分割手段は前記セッション分割数を0に決定することが望ましい。また、1つのセッションに対応するバックアップ対象データのコピーを完了するのに前記バッテリー残量が十分ではないと前記監視手段によって判定されるときにおいて、前記コピー手段は前記1つのセッションに対応するバックアップ対象データのコピーを行わないことが望ましい。また、前記監視手段は、あるセッションに対応するバックアップ対象データのコピーを完了した後、別のセッションに対応するバックアップ対象データのコピーを行う前に、前記別のセッションに対応するバックアップ対象データのコピーを完了するのに前記バッテリー残量が十分であるか否かについて判定することが望ましい。   In this backup processing apparatus, the second storage medium is controlled by a battery-driven device, and the backup processing device further includes monitoring means for monitoring a remaining battery level of the battery-driven device. desirable. In addition, when the monitoring unit determines that the remaining battery level is sufficient to back up the backup target data to the second storage medium, the dividing unit sets the session division number to 0. It is desirable to decide on. In addition, when the monitoring unit determines that the remaining battery level is not sufficient to complete the copy of the backup target data corresponding to one session, the copy unit determines that the backup target corresponding to the one session It is desirable not to copy data. In addition, the monitoring unit copies the backup target data corresponding to the other session after completing the copy of the backup target data corresponding to the certain session and before copying the backup target data corresponding to the other session. It is desirable to determine whether the battery level is sufficient to complete the process.

また、前記コピー手段は、コピーの完了した前記バックアップ対象データのセッションに関する情報を有し、前記バックアップ対象データのコピーがセッション単位で完了するごとに前記情報を更新することが望ましい。また、前記コピー手段は、前記第2の記憶媒体に前記バックアップ対象データをコピーする前に、前記第1の記憶媒体に記憶された前記バックアップ対象データの属性をリードオンリーに変更し、前記第2の記憶媒体への前記バックアップ対象データのコピーが完了した後に、前記第1の記憶媒体に記憶された前記バックアップ対象データの属性をセッション単位で消去可能な属性に変更することが望ましい。
このようにすることで、バックアップ処理に失敗し、処理を継続できないようなときであっても、既にバックアップしたデータを確保できるようにすることができる。
Further, it is preferable that the copy unit has information regarding a session of the backup target data that has been copied, and updates the information every time the copy of the backup target data is completed on a session basis. In addition, the copy unit changes the attribute of the backup target data stored in the first storage medium to read only before copying the backup target data to the second storage medium, and It is desirable to change the attribute of the backup target data stored in the first storage medium to an erasable attribute for each session after the copy of the backup target data to the storage medium is completed.
By doing so, it is possible to secure already backed up data even when the backup process fails and the process cannot be continued.

第1の記憶媒体に記憶されているバックアップ対象データを複数のセッションに分割してバックアップする場合に必要な第2の記憶媒体の容量を算出するステップと、
前記算出された必要な容量と前記第2の記憶媒体の空き容量とに基づいてセッション分割数を決定するステップと、
前記バックアップ対象データを、前記セッション分割数に分けて、前記第1の記憶媒体から前記第2の記憶媒体へコピーするステップと、
を含むバックアップ処理方法。
このようにすることで、バックアップ処理に失敗し、処理を継続できないようなときであっても、既にバックアップしたデータを確保できるようにすることができる。
Calculating the capacity of the second storage medium required when the backup target data stored in the first storage medium is divided into a plurality of sessions for backup;
Determining the number of session divisions based on the calculated required capacity and the free capacity of the second storage medium;
Copying the backup target data into the session division number and copying the data from the first storage medium to the second storage medium;
Backup processing method including.
By doing so, it is possible to secure already backed up data even when the backup process fails and the process cannot be continued.

バックアップ処理装置を動作させるためのプログラムであって、
第1の記憶媒体に記憶されているバックアップ対象データを複数のセッションに分割してバックアップする場合に必要な第2の記憶媒体の容量を算出するステップと、
前記算出された必要な容量と前記第2の記憶媒体の空き容量とに基づいてセッション分割数を決定するステップと、
前記バックアップ対象データを、前記セッション分割数に分けて、前記第1の記憶媒体から前記第2の記憶媒体へコピーするステップと、
を前記バックアップ処理装置に行わせるプログラム。
このようにすることで、バックアップ処理に失敗し、処理を継続できないようなときであっても、既にバックアップしたデータを確保できるようにすることができる。
A program for operating a backup processing apparatus,
Calculating the capacity of the second storage medium required when the backup target data stored in the first storage medium is divided into a plurality of sessions for backup;
Determining the number of session divisions based on the calculated required capacity and the free capacity of the second storage medium;
Copying the backup target data into the session division number and copying the data from the first storage medium to the second storage medium;
A program for causing the backup processing apparatus to execute
By doing so, it is possible to secure already backed up data even when the backup process fails and the process cannot be continued.

===第1実施形態===
以下、本発明の一実施形態に係るバックアップ処理装置について、図面を参照して説明する。
図1は、本実施形態に係るバックアップ処理装置1の機能構成図である。
すなわち、バックアップ処理装置1は、第1の記憶媒体に格納されているバックアップ対象データを、第2の記憶媒体へコピーしてデータバックアップを行う。本実施形態では、メモリカード2に格納されているデータをCDにバックアップする場合を例にあげて説明するが、第1及び第2の記憶媒体はこれら以外であってもよい。
=== First Embodiment ===
Hereinafter, a backup processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a functional configuration diagram of a backup processing apparatus 1 according to the present embodiment.
That is, the backup processing device 1 performs data backup by copying the backup target data stored in the first storage medium to the second storage medium. In the present embodiment, a case where data stored in the memory card 2 is backed up to a CD will be described as an example. However, the first and second storage media may be other than these.

また、バックアップ処理装置1は、例えば汎用的なコンピュータシステムにより構成され、以下に説明するバックアップ処理装置1内の個々の構成要素または機能は、例えば、コンピュータプログラムを実行することにより実現される。   The backup processing apparatus 1 is configured by, for example, a general-purpose computer system, and individual components or functions in the backup processing apparatus 1 described below are realized by executing, for example, a computer program.

さらに、バックアップ処理装置1は、この装置単体で実現することもできるし、プリンタ、デジタル複合機、ビューワなど他の装置に組み込み、その装置の一部の機能として実現することもできるし、電子式スチルカメラ、デジタルビデオカメラなどの一部機能を利用して、電子式スチルカメラ、デジタルビデオカメラと組み合わせて実現することもできる。   Further, the backup processing apparatus 1 can be realized as a single apparatus, or can be incorporated into another apparatus such as a printer, a digital multifunction peripheral, a viewer, and can be realized as a partial function of the apparatus. It can also be realized in combination with an electronic still camera or digital video camera by using a part of functions such as a still camera or a digital video camera.

図1に示すバックアップ処理装置1は、バックアップ管理部11と、メモリカードリーダ/ライタ12と、CDリーダ/ライタ13とを備える。
メモリカードリーダ/ライタ12は、メモリカード2に格納されているデータを読み出し、メモリカード2にデータを書き込む。
CDリーダ/ライタ13は、CD3に格納されているデータを読み出し、CD3にデータを書き込む。
バックアップ管理部11は、メモリカード2に格納されているバックアップ対象データを、CD3にバックアップするための処理を行う。例えば、バックアップ対象データの容量が大きく、バックアップ処理に時間がかかる場合には、バックアップ管理部11は、所定のルールに基づいてデータを分割する。そして、分割されたデータをそれぞれ一つの単位として、複数のセッションに分けてバックアップを行う。バックアップ対象データの分割については後述する。
The backup processing apparatus 1 shown in FIG. 1 includes a backup management unit 11, a memory card reader / writer 12, and a CD reader / writer 13.
The memory card reader / writer 12 reads data stored in the memory card 2 and writes data to the memory card 2.
The CD reader / writer 13 reads data stored in the CD 3 and writes data to the CD 3.
The backup management unit 11 performs processing for backing up the backup target data stored in the memory card 2 to the CD 3. For example, when the capacity of the backup target data is large and the backup process takes time, the backup management unit 11 divides the data based on a predetermined rule. Then, backup is performed by dividing the divided data into a plurality of sessions, each as a unit. The division of the backup target data will be described later.

図2は、メモリカード2に格納されているディレクトリ構造の一例を示す。
同図に示すように、メモリカード2には、ルートディレクトリ200直下の第1階層21にサブディレクトリである「DCIM」ディレクトリ211と「MISC」ディレクトリ212とが存在する。「DCIM」ディレクトリ211の配下の第2階層22には、さらにサブディレクトリである「100ABCDE」ディレクトリ221と「101ABCDE」ディレクトリ222とが存在する。そして、「100ABCDE」ディレクトリ221には、5つの画像ファイル251が存在し、「101ABCDE」ディレクトリ222には、2つの画像ファイル252が存在する。さらに、「MISC」ディレクトリ212には、一つのテキストファイル(「AUTPRINT.MRK」)253が存在する。
FIG. 2 shows an example of a directory structure stored in the memory card 2.
As shown in the figure, the memory card 2 has a “DCIM” directory 211 and a “MISC” directory 212 as subdirectories in the first hierarchy 21 immediately below the root directory 200. In the second hierarchy 22 under the “DCIM” directory 211, there are a “100ABCDE” directory 221 and a “101ABCDE” directory 222 which are subdirectories. Then, five image files 251 exist in the “100ABCDE” directory 221, and two image files 252 exist in the “101ABCDE” directory 222. Furthermore, one text file (“AUTPRINT.MRK”) 253 exists in the “MISC” directory 212.

図2に示すディレクトリ構造に含まれるデータをバックアップ対象データとしてCD3にバックアップしたときの、CD3のデータ構造を説明する。
図3は、図2に示すバックアップ対象データを一つのセッションでCD3にバックアップしたときのバックアップデータ30のデータ構造を示す。
CD3は、CD−ROMファイルシステムに従った構造になっている。従って、バックアップデータ30の先頭及び末尾に、CD−ROMファイルシステムに従う管理領域301,302が設けられている。
なお、本実施形態ではISO9660レベル1の規格に従うCDを例にして説明するが、本発明はこれを拡張した他の規格(例えば、ISO9660レベル2,Jolietなど)にも適用することが可能である。
The data structure of CD3 when the data included in the directory structure shown in FIG. 2 is backed up to CD3 as backup target data will be described.
FIG. 3 shows a data structure of the backup data 30 when the backup target data shown in FIG. 2 is backed up to the CD 3 in one session.
CD3 has a structure according to the CD-ROM file system. Therefore, management areas 301 and 302 according to the CD-ROM file system are provided at the beginning and end of the backup data 30.
In the present embodiment, a CD conforming to the ISO9660 level 1 standard will be described as an example. However, the present invention can be applied to other standards (for example, ISO9660 level 2, Joliet, etc.) that are expanded. .

バックアップデータ30は、先頭の管理領域301に引き続き、ルートディレクトリエントリ310と、サブディレクトリである「DCIM」ディレクトリ211、及び「MISC」ディレクトリ212のディレクトリエントリ311、312とが設けられている。   The backup data 30 is provided with a root directory entry 310, subdirectories “DCIM” directory 211, and “MISC” directory 212 directory entries 311 and 312 following the top management area 301.

「MISC」ディレクトリ212にはサブディレクトリが存在しないので、ディレクトリエントリ312に引き続いてテキストファイル253のデータ本体353が格納される。   Since there is no subdirectory in the “MISC” directory 212, the data body 353 of the text file 253 is stored following the directory entry 312.

これに引き続いて第2階層22の「100ABCDE」ディレクトリ221のディレクトリエントリ321及び「100ABCDE」ディレクトリ221内の画像ファイル251のデータ本体351、並びに「101ABCDE」ディレクトリ222のディレクトリエントリ322及び「101ABCDE」ディレクトリ222内の画像ファイル252のデータ本体352が格納される。   Subsequently, the directory entry 321 of the “100ABCDE” directory 221 and the data body 351 of the image file 251 in the “100ABCDE” directory 221, the directory entry 322 of the “101ABCDE” directory 222, and the “101ABCDE” directory 222 The data body 352 of the image file 252 is stored.

以上説明した範囲で、バックアップ対象データのディレクトリ及びデータ本体のすべてが含まれている。CD−ROMファイルシステムの場合、さらに、CD3に格納されている全データのディレクトリ構造を示すパステーブル330が設けられる。   In the range described above, all of the directory and data body of the backup target data are included. In the case of the CD-ROM file system, a path table 330 indicating the directory structure of all data stored in the CD 3 is further provided.

パステーブル330には、バックアップデータ30をCD3に格納する時点で、CD3に含まれる全データを図2に示すようなツリー構造で表現するためのものである。従って、例えば、新品のCD3にバックアップデータ30を書き込む場合は、パステーブル330は、図2に示すツリー構造を表現するものになっている。   The path table 330 is for representing all data included in the CD3 in a tree structure as shown in FIG. 2 when the backup data 30 is stored in the CD3. Therefore, for example, when the backup data 30 is written to a new CD 3, the path table 330 represents the tree structure shown in FIG.

図5から図9には、ルートディレクトリ,「DCIM」ディレクトリ,「MISC」ディレクトリ,「100ABCDE」ディレクトリ、「101ABCDE」ディレクトリのディレクトリエントリ310,311,312,321,322のデータ構造を示す。
それぞれのディレクトリエントリ310,311,312,321,322には、自分自身のセクタを指すポインタレコード3101、3111,3121,3211,3221と、親ディレクトリのセクタを指すポインタレコード3102、3112,3122,3212,3222とが含まれていて、これのデータ長はいずれも34バイト固定である。
FIGS. 5 to 9 show the data structures of the directory entries 310, 311, 312, 321, and 322 of the root directory, “DCIM” directory, “MISC” directory, “100ABCDE” directory, and “101ABCDE” directory.
Each directory entry 310, 311, 312, 321, 322 has a pointer record 3101, 3111, 3121, 3211, 3221 pointing to its own sector and a pointer record 3102, 3112, 3122, 3212 pointing to the sector of the parent directory. , 3222 are included, and the data length of each is fixed to 34 bytes.

さらに、それぞれのディレクトリエントリ310,311,312,321,322には、それぞれのディレクトリの直下にサブディレクトリがあるときは、サブディレクトリレコード3103,3113が含まれていて、それぞれのディレクトリの直下にファイルがあるときは、ファイルレコード3124,3214,3224が含まれている。   Furthermore, when each directory entry 310, 311, 312, 321, 322 includes a subdirectory directly under each directory, subdirectory records 3103, 3113 are included, and a file immediately below each directory is included. When there is, file records 3124, 3214, 3224 are included.

サブディレクトリレコード3103,3113には、そのサブディレクトリのディレクトリエントリが格納されているセクタを指すポインタとサブディレクトリ名が含まれていて、レコード長は可変長であり、最大46バイトである。
ファイルレコード3124,3214,3224には、ファイル本体が格納されているセクタを指すポインタとファイル名が含まれていて、レコード長は可変長であり、最大46バイトである。
Each of the subdirectory records 3103 and 3113 includes a pointer indicating a sector in which the directory entry of the subdirectory is stored and a subdirectory name. The record length is variable and has a maximum length of 46 bytes.
The file records 3124, 3214, and 3224 include a pointer and a file name that point to the sector in which the file body is stored, and the record length is variable and has a maximum length of 46 bytes.

例えば図5に示すルートディレクトリエントリ310では、「DCIM」ディレクトリ211のディレクトリレコード3103及び「MISC」ディレクトリ221のディレクトリレコード3103とが含まれている。図7に示す「MISC」ディレクトリのディレクトリエントリ312では、テキストファイル253のファイルレコード3124が含まれている。   For example, the root directory entry 310 shown in FIG. 5 includes a directory record 3103 of the “DCIM” directory 211 and a directory record 3103 of the “MISC” directory 221. The directory entry 312 of the “MISC” directory shown in FIG. 7 includes a file record 3124 of the text file 253.

図10は、パステーブル330のデータ構造を示す。
パステーブル330は、ルートディレクトリレコード3301と、サブディレクトリレコードごとにそれぞれの親ディレクトリを示すポインタ及びディレクトリ名を含むサブディレクトリレコード3303とを含む。
ルートディレクトリレコード3301は、10バイト固定であり、サブディレクトリレコード3303は可変長であり、最大18バイトである。
FIG. 10 shows the data structure of the path table 330.
The path table 330 includes a root directory record 3301 and a subdirectory record 3303 including a pointer and a directory name indicating each parent directory for each subdirectory record.
The root directory record 3301 is fixed to 10 bytes, and the subdirectory record 3303 has a variable length and a maximum of 18 bytes.

ここで、CD3の1セクタは2048バイトである。従って、各ディレクトリエントリ310,311,312,321,322及びパステーブル330に格納すべきデータ量が2048バイトに満たないときでも、一つのディレクトリエントリないしはパステーブルを格納するときは2048バイトの倍数で記憶領域が消費される。また、これはデータ本体を格納する場合も同様である。つまり、データ本体がCD3に格納されるときは、データ本体のサイズに応じて2048バイト単位で記憶領域が消費される。   Here, one sector of CD3 is 2048 bytes. Therefore, even when the amount of data to be stored in each directory entry 310, 311, 312, 321, 322 and path table 330 is less than 2048 bytes, when storing one directory entry or path table, it is a multiple of 2048 bytes. Storage space is consumed. This also applies to the case where the data body is stored. That is, when the data body is stored in the CD3, the storage area is consumed in units of 2048 bytes according to the size of the data body.

次に、図4は、図2に示すバックアップ対象データを二つのセッションに分けてCD3にバックアップしたときのバックアップデータ31,32のデータ構造を示す。

すなわち、ここでは、第1階層21の「DCIM」ディレクトリ211及びその配下のサブディレクトリ及びファイルを含む第1セッションと、「MISC」ディレクトリ212及びその配下のファイルを含む第2セッションとに分割し、2回に分けてバックアップを行った場合のバックアップデータ31,32のデータ構造を示す。
Next, FIG. 4 shows the data structure of backup data 31 and 32 when the backup target data shown in FIG. 2 is divided into two sessions and backed up to CD3.

That is, here, it is divided into a first session including the “DCIM” directory 211 of the first hierarchy 21 and its subdirectories and files, and a second session including the “MISC” directory 212 and its subordinate files, The data structure of backup data 31 and 32 when backup is performed in two steps is shown.

図4(a)は、第1セッションのバックアップを行った後のバックアップデータ31を示す。
バックアップデータ31は、図3に示すバックアップデータ30から「MISC」ディレクトリエントリ312及びテキストファイル本体353を除いた構成となっている。ただし、パステーブル330aは、その内容がバックアップデータ30のパステーブル330と異なる。すなわち、「MISC」ディレクトリ212がコピーされていないので、パステーブル330aには、図2に示すディレクトリ構造において、「MISC」ディレクトリ212及びその配下のテキストファイル253を除いたディレクトリ構造を示す情報が含まれている。
FIG. 4A shows the backup data 31 after the first session is backed up.
The backup data 31 is configured by removing the “MISC” directory entry 312 and the text file body 353 from the backup data 30 shown in FIG. However, the contents of the path table 330 a are different from the path table 330 of the backup data 30. That is, since the “MISC” directory 212 has not been copied, the path table 330a includes information indicating the directory structure excluding the “MISC” directory 212 and its subordinate text file 253 in the directory structure shown in FIG. It is.

図4(b)は、第1セッションに引き続き、第2セッションのバックアップを実行した場合のバックアップデータ32を示す。
バックアップデータ32には、このセッションのバックアップ対象である「MISC」ディレクトリ212のディレクトリエントリ312b及びテキストファイル本体353bが含まれている。これに加え、管理領域301b、302bとルートディレクトリエントリ310bと、パステーブル330bとが含まれている。
FIG. 4B shows the backup data 32 when the backup of the second session is executed following the first session.
The backup data 32 includes a directory entry 312b and a text file body 353b of the “MISC” directory 212 to be backed up in this session. In addition, management areas 301b and 302b, a root directory entry 310b, and a path table 330b are included.

ここで、パステーブル330bには、図2に示すディレクトリ構造を示す情報が含まれている。なぜならば、第1セッションで「DCIM」ディレクトリ211がバックアップされ、第2セッションで「MISC」ディレクトリ212がコピーされたので、CD3には図2に示すすべてのデータがコピーされた状態になっているからである。   Here, the path table 330b includes information indicating the directory structure shown in FIG. This is because the “DCIM” directory 211 was backed up in the first session and the “MISC” directory 212 was copied in the second session, so that all data shown in FIG. Because.

これより、同じデータをバックアップする場合でも、セッションを分けることにより全体で必要な容量が異なることがわかる。つまり、図4のようにセッションを複数に分けると、図3のようにセッションを分けずにバックアップした場合と比較して、管理領域301b、302b、ルートディレクトリエントリ310b、及びパステーブル330bの容量だけ多く必要になる。   As a result, even when the same data is backed up, it can be seen that the required capacity varies depending on the session. That is, if the session is divided into a plurality of as shown in FIG. 4, only the capacity of the management areas 301b and 302b, the root directory entry 310b, and the path table 330b is compared with the case where the backup is performed without dividing the session as shown in FIG. A lot is needed.

図11は、バックアップ管理部11が行う分割バックアップ処理の手順を示すフローチャートである。   FIG. 11 is a flowchart showing the procedure of the divided backup process performed by the backup management unit 11.

図12は、ディレクトリ構造及び分割パターンの関係を示す図である。
ここでは、図12に示すディレクトリ構造を有するバックアップ対象データを、図11に示すフローチャートに従ってバックアップする場合を例にして説明する。
FIG. 12 is a diagram showing the relationship between the directory structure and the division pattern.
Here, a case will be described as an example in which backup target data having the directory structure shown in FIG. 12 is backed up according to the flowchart shown in FIG.

まず、バックアップ管理部11は、分割パターンAとして分割数0とする(S11)。すなわち、バックアップ対象データを分割せずに、1セッションでバックアップする場合について検討する。
ここで、バックアップ管理部11は、バックアップ対象データの全容量がバックアップ先メディアであるCD3の空き容量よりも大きいか否かを判定する(S12)。バックアップ対象データの全容量がCD3の空き容量よりも大きいときは(S12:Yes)、CD3の容量が不足しているのでバックアップできないので、この時点で処理を終了する。
First, the backup management unit 11 sets the division number A as the division pattern A (S11). That is, consider a case where backup is performed in one session without dividing the backup target data.
Here, the backup management unit 11 determines whether or not the total capacity of the backup target data is larger than the free capacity of the CD 3 as the backup destination medium (S12). When the total capacity of the data to be backed up is larger than the free capacity of CD3 (S12: Yes), the capacity cannot be backed up because the capacity of CD3 is insufficient.

バックアップ対象データの全容量がCD3の空き容量よりも大きくないときは(S12:No)、バックアップ管理部11は、分割パターンBとして、第1階層のサブディレクトリ単位にセッション分割をする場合に必要なCD3の容量を計算する(S13)。
図12の例では、「DCIM」ディレクトリ211を第1セッション、「MISC」ディレクトリ212を第2セッションとする分割である。
上述したように、セッションを分割すると、管理領域等が増えるので、バックアップをするために全体として必要となる容量が増える。さらに、ディレクトリまたはファイルの数、ファイルのサイズなどに応じて、必要となるセクタ数も異なる場合がある。
When the total capacity of the backup target data is not larger than the free capacity of the CD3 (S12: No), the backup management unit 11 is necessary for dividing the session into sub-directory units of the first hierarchy as the division pattern B. The capacity of CD3 is calculated (S13).
In the example of FIG. 12, the “DCIM” directory 211 is a first session, and the “MISC” directory 212 is a second session.
As described above, when a session is divided, the management area and the like increase, so that the capacity required for backup as a whole increases. Furthermore, the required number of sectors may differ depending on the number of directories or files, the size of the file, and the like.

例えば、サブディレクトリごとにディレクトリエントリとして1セクタが必要である。また、各ディレクトリエントリ内では、ディレクトリレコードの最大長が46バイトであるから、1セクタには最大44ディレクトリレコードを格納可能である。つまり、あるディレクトリ直下のサブディレクトリ数に応じて、ディレクトリエントリとして必要なセクタ数が異なることがある。あるいは、パステーブル内では、ディレクトリレコードの最大長が18バイトであるから、1セクタには最大113ディレクトリレコードを格納可能である。つまり、1セッションに含まれる全ディレクトリ数に応じて、パステーブルに必要なセクタ数が異なることがある。
そこで、バックアップ管理部11は、各セッションに含まれるディレクトリ構造及びディレクトリ数に従って、バックアップに必要な全容量を算出する。
For example, one sector is required as a directory entry for each subdirectory. In each directory entry, the maximum length of the directory record is 46 bytes, so that a maximum of 44 directory records can be stored in one sector. That is, depending on the number of subdirectories directly under a certain directory, the number of sectors required as a directory entry may differ. Alternatively, since the maximum length of the directory record is 18 bytes in the path table, a maximum of 113 directory records can be stored in one sector. That is, the number of sectors required for the path table may differ depending on the total number of directories included in one session.
Therefore, the backup management unit 11 calculates the total capacity required for backup according to the directory structure and the number of directories included in each session.

次に、バックアップ管理部11は、分割パターンBで必要な全容量がバックアップ先メディアであるCD3の空き容量よりも大きいか否かを判定する(S14)。分割パターンBで必要な全容量がCD3の空き容量よりも大きいときは(S14:Yes)、分割パターンAが選択される(S15)。   Next, the backup management unit 11 determines whether or not the total capacity required for the division pattern B is larger than the free capacity of the CD 3 that is the backup destination medium (S14). When the total capacity required for the division pattern B is larger than the free capacity of the CD3 (S14: Yes), the division pattern A is selected (S15).

分割パターンBで必要な全容量がCD3の空き容量よりも大きくないときは(S14:No)、バックアップ管理部11は、分割パターンCとして第2階層のサブディレクトリ単位にセッション分割する場合に必要なCD3の容量を計算する(S16)。   When the total capacity required for the division pattern B is not larger than the free capacity of the CD3 (S14: No), the backup management unit 11 is necessary for dividing the session into sub-directory units of the second hierarchy as the division pattern C. The capacity of CD3 is calculated (S16).

図12の例では、「100ABCDE」ディレクトリ221と「101ABCDE」ディレクトリ222とをさらに別セッションに分割する。   In the example of FIG. 12, the “100ABCDE” directory 221 and the “101ABCDE” directory 222 are further divided into different sessions.

バックアップ管理部11は、分割パターンCで必要な全容量がバックアップ先メディアであるCD3の空き容量よりも大きいか否かを判定する(S17)。分割パターンCで必要な全容量がCD3の空き容量よりも大きいときは(S17:Yes)、分割パターンBが選択される(S18)。   The backup management unit 11 determines whether or not the total capacity required for the division pattern C is larger than the free capacity of the CD3 that is the backup destination medium (S17). When the total capacity required for the division pattern C is larger than the free capacity of the CD3 (S17: Yes), the division pattern B is selected (S18).

分割パターンCで必要な全容量がCD3の空き容量よりも大きくないときは(S17:No)、バックアップ管理部11は、分割パターンDとして、第2階層のサブディレクトリ内の複数のファイルを2つのグループに分割し、このときに必要なCD3の容量を計算する(S19)。   When the total capacity required for the division pattern C is not larger than the free capacity of the CD3 (S17: No), the backup management unit 11 sets two files in the subdirectory of the second hierarchy as two division patterns D. The data is divided into groups, and the capacity of CD3 required at this time is calculated (S19).

ここで、第3階層以下のサブディレクトリが存在する場合には、さらにサブディレクトリ単位に分割するようにしてもよい。ここでは、第3階層以下のサブディレクトリが存在しないので、最下位層である第2階層のサブディレクトリに多数存在するファイルを複数のグループに分割する。   Here, when there are subdirectories below the third hierarchy, they may be further divided into subdirectories. Here, since there are no sub-directories below the third layer, a large number of files existing in the sub-directory of the second layer which is the lowest layer are divided into a plurality of groups.

ここで、同一ディレクトリに存在する複数のファイルは、以下のようにして分割してもよい。例えば、ファイルの作成日付が同一のものを1グループとしたり、ファイル名が連番になっているときは、その連番が途切れたところで分割したり、画像ファイルに含まれる付帯情報(例えばExif形式のファイルに含まれる撮影情報など)に基づいて分割したりしてもよい。   Here, a plurality of files existing in the same directory may be divided as follows. For example, when the file creation date is the same as one group, or when the file name is a sequential number, the file is divided when the sequential number is interrupted, or additional information included in the image file (for example, Exif format) Or may be divided based on shooting information included in the file.

そして、バックアップ管理部11は、分割パターンDで必要な全容量がCD3の空き容量よりも大きいか否かを判定する(S20)。分割パターンDで必要な全容量がCD3の空き容量よりも大きいときは(S20:Yes)、分割パターンCが選択される(S21)。   Then, the backup management unit 11 determines whether or not the total capacity required for the division pattern D is larger than the free capacity of the CD 3 (S20). When the total capacity required for the division pattern D is larger than the free capacity of the CD3 (S20: Yes), the division pattern C is selected (S21).

分割パターンDで必要な全容量がCD3の空き容量よりも大きくないときは(S20:No)、分割パターンDが選択される(S22)。   When the total capacity required for the division pattern D is not larger than the free capacity of the CD3 (S20: No), the division pattern D is selected (S22).

そして、バックアップ管理部11は、上記の処理により選択された分割パターンに従って、バックアップ対象データをセッションごとにバックアップする(S23)。   And the backup management part 11 backs up backup object data for every session according to the division | segmentation pattern selected by said process (S23).

これにより、バックアップの途中でトラブルが生じた場合でも、全データを失うようなことはなく、より多くのデータをバックアップすることができる。   As a result, even if a trouble occurs during backup, all data is not lost, and more data can be backed up.

なお、上述の処理手順において、バックアップ対象データが単一のディレクトリ及びその配下のファイルであるときは、分割パターンB,Cはあり得ないので、これに関連する処理はスキップする。   In the above processing procedure, when the data to be backed up is a single directory and its subordinate files, there are no division patterns B and C, and the processing related to this is skipped.

===第2実施形態===
<プリンタの構成>
図13は、プリンタ401の全体構成を説明するための斜視図である。図14は、プリンタ401の全体構成のブロック図である。以下、プリンタ401の基本的な構成について説明する。
=== Second Embodiment ===
<Printer configuration>
FIG. 13 is a perspective view for explaining the overall configuration of the printer 401. FIG. 14 is a block diagram of the overall configuration of the printer 401. Hereinafter, the basic configuration of the printer 401 will be described.

プリンタ401は、コントローラ411、メモリカードリーダ/ライタ412、CDリーダ/ライタ413、印刷部414、インタフェース415、ハードディスクドライブ416、液晶ディスプレイ417、及び、操作パネル418を有する。プリンタ401は、メモリカードリーダ/ライタ412から読み込んだメモリカード2に記憶された画像データを、CDリーダ/ライタ413を使用してCD3(CD−R)、又は、ハードディスクドライブ416に書き込んだり、印刷部414を介して印刷したりすることができるようになっている。   The printer 401 includes a controller 411, a memory card reader / writer 412, a CD reader / writer 413, a printing unit 414, an interface 415, a hard disk drive 416, a liquid crystal display 417, and an operation panel 418. The printer 401 uses the CD reader / writer 413 to write image data stored in the memory card 2 read from the memory card reader / writer 412 to the CD3 (CD-R) or the hard disk drive 416, or to print the image data. Printing can be performed via the unit 414.

コントローラ411は、後述するメモリカードリーダ/ライタ412、CDリーダ/ライタ413、印刷部414、インタフェース415、ハードディスクドライブ416、液晶ディスプレイ417、及び、操作パネル418を制御する。コントローラ411には、プログラムを処理するための処理装置、及び、プログラムやデータを記憶するためのメモリが搭載されている。コントローラ411は、このメモリに記憶されているプログラムを実行する。プログラムを実行することによって、例えば後述するような、メモリカード2に記憶されているバックアップ対象データを、CD3にバックアップする処理を行う。   The controller 411 controls a memory card reader / writer 412, a CD reader / writer 413, a printing unit 414, an interface 415, a hard disk drive 416, a liquid crystal display 417, and an operation panel 418, which will be described later. The controller 411 includes a processing device for processing a program and a memory for storing the program and data. The controller 411 executes the program stored in this memory. By executing the program, for example, the backup target data stored in the memory card 2 as described later is backed up to the CD 3.

メモリカードリーダ/ライタ412には、メモリカードを挿入することができ、メモリカード2からのデータの読み出し及び書き込みができるようになっている。ここで使用されるメモリカード2のファイルシステムはFATファイルシステムである。FATファイルシステムは、各ファイルについてリードオンリーにするための属性を記憶する領域を確保している。そして、ディレクトリ単位、及び、ファイル単位で、属性をリードオンリー(読み込み専用の属性であり、ディレクトリ又はファイルの削除が不可)、又は、リードオンリー属性の解除(書き込み可能の属性であり、ディレクトリ又はファイル削除可能な属性)をすることができるようになっている。   A memory card can be inserted into the memory card reader / writer 412 so that data can be read and written from the memory card 2. The file system of the memory card 2 used here is a FAT file system. The FAT file system reserves an area for storing attributes for making each file read-only. The attribute is read-only (read-only attribute and directory or file cannot be deleted), or read-only attribute is canceled (writeable attribute, directory or file) for each directory and file. Deleteable attributes).

CDリーダ/ライタ413は、CD3にデータの書き込み、及び、CD3のデータの読み込みを行う。尚、この際、CD3にはISO9660レベル1に従うCD−ROMファイルシステムに従ってデータの書き込み及び読み込みができるようになっている。
印刷部414は、コントローラ411による制御により、画像データに基づいて画像を媒体に形成する。例えば、インク滴を吐出して用紙上に画像を印刷したりすることができるようになっている。
The CD reader / writer 413 writes data into CD3 and reads data from CD3. At this time, data can be written to and read from the CD 3 in accordance with a CD-ROM file system conforming to ISO9660 level 1.
The printing unit 414 forms an image on a medium based on the image data under the control of the controller 411. For example, an image can be printed on paper by ejecting ink droplets.

インタフェース415は、例えばUSBインタフェースのようなコンピュータ19に接続するためのインタフェースである。コンピュータに接続することで、コンピュータ19から画像データなどのデータを送受信することができるようになっている。
ハードディスクドライブ416は、メモリカード2又はCD3から読み込まれたデータの書き込み及び読み出しができるようになっている。尚、ここで使用されるハードディスクドライブ416のファイルシステムはFATファイルシステムである。
The interface 415 is an interface for connecting to the computer 19 such as a USB interface. By connecting to a computer, data such as image data can be transmitted and received from the computer 19.
The hard disk drive 416 can write and read data read from the memory card 2 or the CD 3. The file system of the hard disk drive 416 used here is a FAT file system.

液晶ディスプレイ417は、コントローラ411の制御により、ユーザに視覚的な情報を提供する。例えば、メモリカード2に記憶されている画像ファイルを表示したり、ユーザに対して処理の選択肢を示す。
操作パネル418は、ユーザからの指示を受け付けるためのものである。これを使用することにより、ユーザは、例えば、メモリカード2からハードディスクドライブ416にコピーする画像ファイルを選択したりする。
The liquid crystal display 417 provides visual information to the user under the control of the controller 411. For example, an image file stored in the memory card 2 is displayed or processing options are shown to the user.
The operation panel 418 is for receiving an instruction from the user. By using this, the user selects, for example, an image file to be copied from the memory card 2 to the hard disk drive 416.

図15は、プリンタ401の電源系統を示した回路図である。本実施形態におけるプリンタ1は、バッテリー駆動可能なプリンタである。
電源ラインVccは、プリンタ401の外部電源としての外付けのACアダプタ110及び着脱可能にプリンタ1に内蔵される「バッテリー」としてのリチウムイオン電池パック120(以下、電池パック120という)から電力供給される。ACアダプタ110は、交流電力(AC100V等)を直流電力(DC20V)にAC−DC変換する。ACアダプタ110が出力する直流電力は、ダイオードD1を介して電源ラインVccへ供給される。電池パック120は、複数のリチウムイオン電池を内蔵している。電池パック120が出力する直流電力は、ダイオードD2を介して電源ラインVccへ供給される。
FIG. 15 is a circuit diagram illustrating a power supply system of the printer 401. The printer 1 in this embodiment is a battery-driven printer.
The power line Vcc is supplied with power from an external AC adapter 110 as an external power source of the printer 401 and a lithium ion battery pack 120 (hereinafter referred to as a battery pack 120) as a “battery” detachably built in the printer 1. The The AC adapter 110 performs AC-DC conversion of AC power (such as AC100V) to DC power (DC20V). The DC power output from the AC adapter 110 is supplied to the power supply line Vcc via the diode D1. The battery pack 120 includes a plurality of lithium ion batteries. The DC power output from the battery pack 120 is supplied to the power supply line Vcc via the diode D2.

電源ラインVccには、電源スイッチ135が配設されており、電源スイッチ135の接点で電源ラインVccを直接接続/切断することで電子機器の電源ON/OFFを行うように構成されている。   The power supply line Vcc is provided with a power switch 135, and the power supply line Vcc is directly connected / disconnected at the contact point of the power switch 135 to turn on / off the electronic device.

充電回路121は、ACアダプタ110からダイオードD3を介して供給されるDC20Vの電力を利用して、電池パック120への充電を実行する。
電池パック120の電力残量を推測するための情報を取得可能であるA/D変換回路122は、電池パック120の出力電圧を所定の分圧比で分圧した後、デジタル信号の電圧値に変換してコントローラ411へ出力する。
The charging circuit 121 performs charging of the battery pack 120 using the DC 20V power supplied from the AC adapter 110 via the diode D3.
The A / D conversion circuit 122 that can acquire information for estimating the remaining amount of power of the battery pack 120 divides the output voltage of the battery pack 120 by a predetermined voltage division ratio, and then converts the voltage to a digital signal voltage value. And output to the controller 411.

電源検出回路123は、ACアダプタ110からの電力供給の有無及び電池パック120の着脱状態から電池パック120からの電力供給の有無をそれぞれ検出して、コントローラ411へそれぞれの検出状態(電源検出信号)を出力する。   The power supply detection circuit 123 detects the presence / absence of power supply from the battery pack 120 from the presence / absence of power supply from the AC adapter 110 and the attachment / detachment state of the battery pack 120, and detects the respective detection states (power supply detection signals) to the controller 411. Is output.

コントローラ411は、電源検出回路123におけるACアダプタ110からの電力供給及び電池パック120からの電力供給の検出状態(電源検出信号)から、供給されている電力がACアダプタ110なのか電池パック120なのかを判断する。また、コントローラ411は、A/D変換回路122の出力信号に基づいて、電池パック120の電力残量等を推測する。   The controller 411 determines whether the supplied power is the AC adapter 110 or the battery pack 120 based on the detection state (power supply detection signal) of the power supply from the AC adapter 110 and the power supply from the battery pack 120 in the power supply detection circuit 123. Judging. In addition, the controller 411 estimates the remaining power of the battery pack 120 based on the output signal of the A / D conversion circuit 122.

<データ構造及びディレクトリ構造>
第2実施形態におけるメモリカード2及びCD3のデータ構造及びディレクトリ構造は第1実施形態で説明したものと同様である。よって、説明を省略する。以下の説明において、データ構造及びディレクトリ構造を説明するための図2〜図10、及び図12が適宜参照される。尚、図5に示すようにリードイン、データ、及びリードアウトの3つの記憶部分をまとめた領域はセッションと呼ばれる。
<Data structure and directory structure>
The data structure and directory structure of the memory card 2 and the CD 3 in the second embodiment are the same as those described in the first embodiment. Therefore, the description is omitted. In the following description, FIGS. 2 to 10 and FIG. 12 for explaining the data structure and the directory structure are referred to as appropriate. Note that, as shown in FIG. 5, an area in which the three storage parts of lead-in, data, and lead-out are combined is called a session.

<CD3へのバックアップ処理>
図16及び図17は、メモリカード2のデータをCD3にバックアップするバックアップ処理の手順を示すフローチャートである。
<Backup processing to CD3>
16 and 17 are flowcharts showing the procedure of backup processing for backing up the data in the memory card 2 to the CD3.

まず、コントローラ411は、プリンタ401のバッテリー残量がメモリカード2のファイルをCD3にコピーするのに十分な残量であるか否かについて判定する(S505)。ここでバッテリー残量とは、複数のセッションに分割を行わずに1つのセッションでメモリカード2のデータをCD3に書き込むのに必要なバッテリー残量である。バックアップ対象のデータをCD3に書き込む前に書き込み用のイメージファイルをハードディスクドライブ416上に作成する場合には、このときに必要な電力も考慮に入れられる。   First, the controller 411 determines whether or not the remaining battery level of the printer 401 is sufficient to copy the file on the memory card 2 to the CD 3 (S505). Here, the remaining battery level is the remaining battery level required to write the data in the memory card 2 to the CD 3 in one session without dividing into a plurality of sessions. When an image file for writing is created on the hard disk drive 416 before writing the data to be backed up on the CD 3, the power required at this time is also taken into consideration.

ステップS505においてバッテリー残量が十分であると判定されるときには、複数のセッションに分割を行わないで1つのセッションでCD3に書き込むこととする(S508)。これは次のような理由からである。仮にセッションのクローズが未完となった場合には、そのセッションに含まれるデータをCD3から読み出すことができなくなる。ステップS511以降の処理では、全てのデータが読み出せなくなるリスクを減らすため、複数のセッションに分割して書き込みを行うこととしている。そうすることで、未完に終わったセッションより前に書き込まれたデータについてはCD3から読み出すことができるようになるからである。しかし、ここでは、ステップS505において、書き込みの途中でバッテリー切れが発生することが無いと判定されている。よって、1つのセッションで全てのファイルを書き込むべくステップS508においてセッション分割数を0(分割パターンA)としている。   If it is determined in step S505 that the remaining battery level is sufficient, the data is written to CD3 in one session without being divided into a plurality of sessions (S508). This is for the following reason. If the session is not completely closed, the data included in the session cannot be read from the CD 3. In the processing after step S511, in order to reduce the risk that all data cannot be read, writing is performed by dividing into a plurality of sessions. By doing so, data written before an incomplete session can be read from the CD 3. However, here, in step S505, it is determined that the battery will not run out during writing. Therefore, the number of session divisions is set to 0 (division pattern A) in step S508 to write all files in one session.

ステップS508が行われると、次に、コントローラ411は、バックアップ対象のデータの全容量がバックアップ先メディアであるCD3の空き容量よりも大きいか否かについて判定する(S510)。バックアップ対象のデータの全容量がCD3の空き容量よりも大きいときは(S510:Yes)、CDの容量が不足しておりバックアップできないので、この時点で処理を終了する。一方、バックアップ対象のデータの全容量がCD3の空き容量よりも大きくないときは(S510:No)、コントローラ411は、次にステップS526を実行する。   Once step S508 has been performed, the controller 411 next determines whether or not the total capacity of the backup target data is larger than the free capacity of the CD3 that is the backup destination medium (S510). If the total capacity of the data to be backed up is larger than the free capacity of CD3 (S510: Yes), the capacity of the CD is insufficient and cannot be backed up. On the other hand, when the total capacity of the data to be backed up is not larger than the free capacity of the CD3 (S510: No), the controller 411 next executes step S526.

ステップS505において、プリンタ401のバッテリー残量がメモリカード2のファイルをCD3にコピーするのに十分でないと判定されるときには、ステップS511以降の処理が行われる。   If it is determined in step S505 that the remaining battery level of the printer 401 is not sufficient to copy the file on the memory card 2 to the CD3, the processes in and after step S511 are performed.

ステップS511〜ステップS523の動作は、第1実施形態におけるステップS11〜ステップS23の動作と同様である。第2実施形態では、第1実施形態のステップ番号の3桁目に「5」を付すことで表現している。よって、第2実施形態におけるステップS511〜ステップS523の動作は、第1実施形態において既述であるため説明を省略する。   The operations in steps S511 to S523 are the same as the operations in steps S11 to S23 in the first embodiment. In the second embodiment, this is expressed by adding “5” to the third digit of the step number of the first embodiment. Therefore, since the operation | movement of step S511-step S523 in 2nd Embodiment has already been described in 1st Embodiment, description is abbreviate | omitted.

このようにして、ステップS523又はステップS508が行われると、分割パターンA〜分割パターンDのいずれかの分割パターンでセッションが分割されることになる。   In this way, when step S523 or step S508 is performed, the session is divided by any one of the division patterns A to D.

分割パターンが決定されると、セッションごとのイメージファイルがハードディスクドライブ16に作成される。このイメージファイルは、CD3に書き込まれるデータが暫定的に1つのファイルにまとめられたものである。例えば、図4(a)のデータをCD3に書き込む場合に、これらのデータが1つにまとめられたファイルが作成される。そしてこれを読み出し、CD3に書き込むことで、CDの書き込み速度に遅れることなく連続したデータを書き込むことができるようになっている。   When the division pattern is determined, an image file for each session is created in the hard disk drive 16. In this image file, data written to the CD 3 is provisionally collected into one file. For example, when the data shown in FIG. 4A is written to the CD 3, a file in which these data are collected into one is created. By reading this data and writing it to CD3, continuous data can be written without delaying the CD writing speed.

上述のいずれかの分割パターンで分割されると、残り何回のセッションでCD3に書き込みを行うかを示す書き込みセッション残数Nが決められる。   When divided by any one of the above-described division patterns, the remaining number N of write sessions indicating how many sessions are written to the CD 3 is determined.

次に、CD3に書き込むデータをリードオンリー属性に設定する(S526)。具体的には、メモリカード2においてCD3に書き込むファイルの属性をリードオンリー属性に設定する。また、ハードディスクドライブ16にセッション単位で作成されたイメージファイルについても属性をリードオンリー属性に設定する。   Next, data to be written to CD3 is set to a read-only attribute (S526). Specifically, the attribute of the file to be written to the CD 3 in the memory card 2 is set to the read only attribute. Also, the attribute is set to a read-only attribute for an image file created in the hard disk drive 16 for each session.

つぎに、コントローラ411は、「書き込み終了情報」を記録したファイルを作成する(S528)。書き込み終了情報には、書き込みセッション残数N、分割した各セッション内のデータ構造の情報(例えば、図4(a)(b)に示すようなデータ構造)、及び、各セッションについてCD3への書き込みが完了したか否かの情報が含まれている。この「書き込み終了情報」は、テキストファイル又はバイナリファイルでハードディスクドライブ16に所定のファイル名で作成される。   Next, the controller 411 creates a file in which “write end information” is recorded (S528). The write end information includes the number N of remaining write sessions, information on the data structure in each divided session (for example, the data structure as shown in FIGS. 4A and 4B), and writing to CD3 for each session. Contains information on whether or not is completed. This “write end information” is a text file or binary file and is created in the hard disk drive 16 with a predetermined file name.

次に、複数に分割されたセッションのうちの1つのセッションのイメージファイルについてCD3への書き込みを行う(S530)。そして、CD3に1つのセッション分の書き込みが完了しセッションのクローズを行うと、コントローラ411は、書き込んだセッションに含まれるファイルについてメモリカード2のリードオンリー属性を解除する(S532)。また、書き込んだセッションのイメージファイルのリードオンリー属性も解除する。そして、コントローラ411は、CD3に書き込んだセッションのイメージファイルを削除する。   Next, the image file of one session among the divided sessions is written to CD3 (S530). When the writing for one session is completed on the CD 3 and the session is closed, the controller 411 releases the read-only attribute of the memory card 2 for the file included in the written session (S532). In addition, the read-only attribute of the image file of the written session is also released. Then, the controller 411 deletes the session image file written to the CD 3.

次に、複数のセッションのうち、CD3に対する書き込みが完了したセッションと書き込みが完了していないセッションとを区別するために、書き込み終了情報について更新を行う(S534)。具体的には、書き込みが完了したセッションについて書き込みが完了した旨の情報を付加する。   Next, among the plurality of sessions, the write end information is updated in order to distinguish between the sessions for which writing to CD3 has been completed and the sessions for which writing has not been completed (S534). Specifically, information indicating that writing has been completed is added to a session for which writing has been completed.

次に、書き込み終了情報の書き込みセッション残数Nをデクリメントする(S536)。そして、コントローラ11は、書き込みセッション残数Nが0よりも大きいか否かについて判定する(S538)。ここで、書き込みセッション残数Nが0よりも大きくないとき(つまりN=0であるとき)は(S538:No)、これ以上、書き込むセッションはないので、本バックアップ処理を終了する。   Next, the write session remaining number N of the write end information is decremented (S536). Then, the controller 11 determines whether or not the remaining number N of write sessions is greater than 0 (S538). Here, when the remaining number N of write sessions is not larger than 0 (that is, when N = 0) (S538: No), since there are no more sessions to be written, this backup processing is terminated.

一方、書き込みセッション残数Nが0よりも大きいときは(S538:Yes)、コントローラ11は、バッテリー残量を取得する(S540)。コントローラ11内のメモリには、A/D変換回路122から送られる出力電圧信号に対応するバッテリー残量が記憶されている。よって、コントローラ11は、A/D変換回路からの出力電圧信号に基づいてバッテリー残量を得ることができる。そして、コントローラ11は、CDに1セッション分のイメージファイルを書き込むだけのバッテリー残量が十分にあるか否かについて判定する(S542)。   On the other hand, when the remaining number N of write sessions is greater than 0 (S538: Yes), the controller 11 acquires the remaining battery level (S540). The memory in the controller 11 stores the remaining battery level corresponding to the output voltage signal sent from the A / D conversion circuit 122. Therefore, the controller 11 can obtain the remaining battery level based on the output voltage signal from the A / D conversion circuit. Then, the controller 11 determines whether or not there is sufficient remaining battery charge to write an image file for one session on the CD (S542).

バッテリー残量が十分である場合には(S542:Yes)、CD3に他のセッションのイメージファイルを書き込むために、ステップS530に戻る。一方、バッテリー残量が十分でないときには(S542:No)、コントローラ11は、バッテリー残量が十分でないために残りのセッションをCD3に書き込むことができない旨を、液晶ディスプレイ17に表示することによってユーザに通知する(S544)。そして、このバックアップ処理を終了する。   If the remaining battery level is sufficient (S542: Yes), the process returns to step S530 to write the image file of another session to the CD3. On the other hand, when the remaining battery level is not sufficient (S542: No), the controller 11 displays to the user that the remaining session cannot be written to the CD 3 because the remaining battery level is insufficient, thereby displaying to the user the liquid crystal display 17. Notification is made (S544). Then, this backup process is terminated.

上述のように、次の1つのセッションを書き込むために十分なバッテリー残量があるか否かを判定しているのは、次のような理由からである。すなわち、セッションがクローズされる前にバッテリー切れなどの障害により書き込みが中断されると、このCD3には追記ができなくなるおそれがある。そうすると、そのCD3は追記ができる容量を残しつつも追記ができなくなり無駄が生じてしまう。よって、ここでは、セッションごとの書き込みを確実に完了させ、このような無駄を生じさせないために、十分なバッテリー残量があるか否かを判定することとしている。   As described above, the reason for determining whether or not there is a sufficient remaining battery charge for writing the next one session is as follows. That is, if writing is interrupted due to a failure such as battery exhaustion before the session is closed, there is a possibility that additional writing cannot be performed on this CD3. As a result, the CD 3 cannot be additionally recorded while leaving a capacity for additional recording, resulting in waste. Therefore, here, in order to reliably complete writing for each session and not cause such waste, it is determined whether or not there is a sufficient remaining battery level.

また、ステップS544において、バッテリー残量が十分でないために残りのセッションをCD3に書き込むことができない旨をユーザに通知している。この際、それでもなお残りのセッションについての書き込みを行わせるかについてユーザに問うこととしてもよい。これは、バッテリー残量の推定が正確ではない場合があり、残りのセッションを書き込めてしまうことがあるからである。このようにして、ユーザにCD3へのセッションの書き込み判断の自由度を与えることもできる。   In step S544, the user is notified that the remaining session cannot be written to CD3 because the remaining battery level is not sufficient. At this time, the user may be asked whether or not the remaining session is still written. This is because the estimation of the remaining battery capacity may not be accurate and the remaining sessions may be written. In this way, the user can be given a degree of freedom in determining whether to write a session to CD3.

また、ステップS538において全てのセッションについての書き込みが完了したと判定されたとき、メモリカード2における選択されたファイルについて削除することとしてもよい。この場合、ファイルが安全にメモリカード2からCD3に「移動」されることとなる。   Further, when it is determined in step S538 that writing for all the sessions has been completed, the selected file in the memory card 2 may be deleted. In this case, the file is safely “moved” from the memory card 2 to the CD 3.

このように、CD3への書き込みが行われる前に、コピーするデータの属性がメモリカード2においてリードオンリーに書き換えられる。そして、メモリカード2において、コピーが完了したセッションに含まれるファイルについてのリードオンリー属性が解除される。このようにすることで、コピーが適切に完了したセッションのファイルをメモリカード2において削除することができる一方で、CD3への書き込みが適切に完了しなかったセッションのファイルについては削除されることがないようにすることができる。尚、この場合、メモリカード2が第1の記憶媒体に対応し、CD3が第2の記憶媒体に対応するものとみることができる。   As described above, the attribute of the data to be copied is rewritten to read-only in the memory card 2 before writing to the CD 3 is performed. Then, in the memory card 2, the read-only attribute for the file included in the session for which copying has been completed is cancelled. By doing so, it is possible to delete the file of the session that has been properly copied in the memory card 2, while the file of the session that has not been properly written to the CD 3 may be deleted. Can not be. In this case, it can be considered that the memory card 2 corresponds to the first storage medium and the CD 3 corresponds to the second storage medium.

例えば、複数のファイルをCD3にバックアップするために、3つのセッションに分けられたものとする。これらのセッションを第1セッション、第2セッション、及び、第3セッションと呼ぶ。そして、第1セッションのバックアップが完了し、第2セッションのバックアップの途中でバッテリー切れを起こしたとする。その場合、第1セッションに含まれるファイルについては、メモリカード2においてリードオンリー属性が解除されている。一方、第2セッション、及び、第3セッションに含まれるファイルについては、メモリカード2において属性がリードオンリー属性となっている。   For example, it is assumed that a plurality of files are divided into three sessions in order to back up a plurality of files to CD3. These sessions are referred to as a first session, a second session, and a third session. It is assumed that the backup of the first session is completed and the battery runs out during the backup of the second session. In that case, the read-only attribute is canceled in the memory card 2 for the file included in the first session. On the other hand, for the files included in the second session and the third session, the attribute in the memory card 2 is a read-only attribute.

このような状況下において、ユーザはこれらの3つのセッションに分けられて行われようとしたバックアップのうち第1セッションのバックアップしか行われなかったことを何らかの事情により忘れてしまうことがありうる。そうした場合、ユーザがメモリカード2のファイルを全て削除しようとすることが考えられる。ここで全てのファイルが削除できることとなると、バックアップされていない第2セッション及び第3セッションに含まれるファイルまで失われてしまうこととなってしまう。しかしながら、本実施形態では、バックアップが完了していない第2セッション及び第3セッションに含まれるファイルについては、メモリカード2においてリードオンリー属性が保たれている。よって、ユーザが誤って削除しようとしても、バックアップが完了していない第2セッション及び第3セッションに含まれるファイルについては削除されず保護される。   Under such circumstances, the user may forget for some reason that only the backup of the first session was performed among the backups that were divided into these three sessions. In such a case, it is conceivable that the user tries to delete all the files on the memory card 2. If all the files can be deleted, the files included in the second session and the third session that are not backed up will be lost. However, in the present embodiment, the read-only attribute is maintained in the memory card 2 for files included in the second session and the third session that have not been backed up. Therefore, even if the user tries to delete the file by mistake, the files included in the second session and the third session that have not been backed up are protected without being deleted.

また、セッション単位の書き込みが完了するごとに、書き込みが完了したセッションのイメージファイルについてはハードディスク16においてリードオンリー属性が解除される。また、どのセッションについての書き込みが完了したかの情報を含む「書き込み終了情報」が更新されている。よって、リードオンリー属性が解除されたセッションのイメージファイルについては削除することができるが、書き込みが適切に完了しなかったセッションのイメージファイルについては削除されることはない。このようにすることで、プリンタ1の再起動後、「書き込み終了情報」を再度参照することで、書き込みが適切に完了しなかったセッションについて、ハードディスクドライブ16に残されたイメージファイルを用いてCDへの書き込みを再開させることができる。尚、この場合、ハードディスクドライブ16が第1の記憶媒体に対応し、CD3が第2の記憶媒体に対応するものとみることができる。   Further, every time writing for each session is completed, the read-only attribute is canceled in the hard disk 16 for the image file of the session for which writing has been completed. In addition, “write end information” including information on which session has been written is updated. Therefore, the image file of the session for which the read-only attribute has been canceled can be deleted, but the image file of the session for which writing has not been properly completed is not deleted. In this way, after restarting the printer 1, by referring to the “writing end information” again, a session that has not been properly written can be used to record the CD using the image file left on the hard disk drive 16. Writing to can be resumed. In this case, it can be considered that the hard disk drive 16 corresponds to the first storage medium and the CD 3 corresponds to the second storage medium.

尚、ここでは、イメージファイルを使用してCD3へのデータの書き込みを行ったが、イメージファイルを作成せず、リードイン、ファイルデータ、及び、リードアウトなどを直接的にCD3に書き込むこととしてもよい。このようにイメージファイルを作成しない場合には、前述の「書き込み終了情報」内の各セッションのデータ構造が適宜参照され、ファイル本体以外のデータが作成されつつデータの書き込みが行われる。   In this example, data is written to CD3 using an image file. However, it is also possible to directly write lead-in, file data, lead-out, etc. to CD3 without creating an image file. Good. When the image file is not created in this way, the data structure of each session in the “write end information” described above is referred to as appropriate, and data is written while data other than the file body is created.

また、イメージファイルを作成しない場合であっても「書き込み終了情報」は適宜更新されている。そして、この「書き込み終了情報」には、どのセッションまでの書き込みが完了したか、及び、各セッションのデータ構造が記録されている。よって、イメージファイルを作成しない場合であって、全てのセッションについてCD3に書き込みが完了しなかった場合であっても、書き込み終了情報を参照して、書き込みが完了しなかったセッションの書き込みを再開することができる。   Even when the image file is not created, the “write end information” is updated as appropriate. In this “write end information”, up to which session writing is completed and the data structure of each session are recorded. Therefore, even when the image file is not created and writing to the CD 3 is not completed for all sessions, the writing of the session that has not been written is resumed with reference to the writing end information. be able to.

また、メモリカード2をメモリカードリーダ/ライタ412に挿入する前から、メモリカード2のファイルがリードオンリーの属性になっている場合がある。この場合には、バックアップを行う前に、リードオンリーの属性になっているファイル名がコントローラ411のメモリに記憶される。そして、バックアップ完了後、これら始めからリードオンリー属性であったファイルについては削除を行わず、リードオンリー属性のままメモリカード2に残されるものとする。   Further, before the memory card 2 is inserted into the memory card reader / writer 412, the file on the memory card 2 may have a read-only attribute. In this case, the file name having the read-only attribute is stored in the memory of the controller 411 before performing the backup. Then, after the backup is completed, the files having the read-only attribute from the beginning are not deleted and are left in the memory card 2 with the read-only attribute.

===その他の実施の形態===
上記の実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれることは言うまでもない。特に、以下に述べる実施形態であっても、本発明に含まれるものである。
=== Other Embodiments ===
The above-described embodiments are for facilitating the understanding of the present invention, and are not intended to limit the present invention. The present invention can be changed and improved without departing from the gist thereof, and it is needless to say that the present invention includes equivalents thereof. In particular, the embodiments described below are also included in the present invention.

===まとめ===
(1)より詳細な実施形態である第2実施形態におけるバックアップ処理装置としてのプリンタ401は、メモリカード2(第1の記憶媒体)に記憶されているバックアップ対象のファイル(バックアップ対象データ)をCD3(第2の記憶媒体)へバックアップするためのバックアップ処理装置である。
=== Summary ===
(1) The printer 401 serving as the backup processing apparatus in the second embodiment, which is a more detailed embodiment, stores a backup target file (backup target data) stored in the memory card 2 (first storage medium) on a CD3. This is a backup processing device for backing up to (second storage medium).

プリンタは、分割手段とコピー手段とからなる。分割手段は、コントローラ411によって構成される。コピー手段は、少なくともコントローラ411とメモリカードリーダ/ライタ412とCDリーダ/ライタ413とからなる。また、必要に応じてハードディスクドライブ416がコピー手段に含まれる。   The printer includes a dividing unit and a copying unit. The dividing means is constituted by a controller 411. The copy means includes at least a controller 411, a memory card reader / writer 412 and a CD reader / writer 413. Further, a hard disk drive 416 is included in the copying means as necessary.

分割手段は、バックアップ対象のファイルを複数のセッションに分割してバックアップする場合に必要なCD3の容量を算出し、この算出された必要な容量とCD3の空き容量とに基づいてセッション分割数を決定する。
コピー手段は、バックアップ対象のファイルをセッション分割数に分けて、メモリカード2からCD3へコピーする。
The dividing means calculates the capacity of the CD3 required when the backup target file is divided into a plurality of sessions for backup, and determines the number of divided sessions based on the calculated required capacity and the free capacity of the CD3. To do.
The copy means divides the backup target file into the number of divided sessions and copies it from the memory card 2 to the CD 3.

仮に、複数に分割せず1つのセッションで全てのファイルをCD3に書き込もうとし、途中で書き込みが失敗した場合には全てのファイルが読み込みできなくなってしまう。一方、本実施形態のように複数のセッションに分けてCD3に書き込むようにすると、途中で書き込みが失敗した場合であっても、失敗する前に書き込まれたセッションのファイルについてはCD3から読み込むことが可能となる。このようにして、既にバックアップしたデータを確保できるようになっている。
尚、ここでは、第2の記憶媒体としてCD3を例示したが、DVDとすることもできる。
If all files are written to CD3 in one session without being divided into a plurality of files, and writing fails in the middle, all files cannot be read. On the other hand, when writing into the CD3 by dividing into a plurality of sessions as in the present embodiment, even if the writing fails in the middle, the file of the session written before the failure can be read from the CD3. It becomes possible. In this way, already backed up data can be secured.
Here, CD3 is exemplified as the second storage medium, but a DVD may be used.

(2)また、CD3はバッテリー駆動されるCD−Rドライブにより書き込みが制御される。尚、CD−Rドライブは、プリンタ201に内蔵されているものであってもよいし、外付けのものであってもよい。
また、プリンタ201は、CD−Rドライブ又はCD−Rドライブを内蔵するプリンタ201のバッテリー残量を監視する監視手段をさらに備える。監視手段は、コントローラ411とA/D変換回路122とによって構成される。
このようにすることで、バッテリー残量を監視しつつ、CD3へのデータの書き込みを行うことができる。
(2) CD3 is controlled for writing by a battery-driven CD-R drive. The CD-R drive may be built in the printer 201 or may be externally attached.
The printer 201 further includes monitoring means for monitoring the remaining battery level of the printer 201 incorporating the CD-R drive or the CD-R drive. The monitoring means includes a controller 411 and an A / D conversion circuit 122.
In this way, data can be written to the CD 3 while monitoring the remaining battery level.

(3)また、バッテリー残量がバックアップ対象のファイルをCD3にバックアップするのに十分であると監視手段によって判定されるときにおいて、コントローラ411はセッション分割数を0に決定する。
このようにすることで、バッテリー残量が十分であるときには、1つのセッションで全てのバックアップ対象のファイルをCD3に書き込むことができる。
(3) In addition, when the monitoring unit determines that the remaining battery capacity is sufficient to back up the file to be backed up to CD3, the controller 411 determines the number of divided sessions to be zero.
In this way, when the remaining battery capacity is sufficient, all files to be backed up can be written to CD3 in one session.

(4)また、1つのセッションに対応するバックアップ対象のファイルのコピーを完了するのにバッテリー残量が十分ではないと監視手段によって判定されるときにおいて、コピー手段はその1つのセッションに対応するバックアップ対象のファイルのコピーを行わない。
このようにすることで、バッテリー切れによりセッションのクローズが適正に行われないことを防止し、クローズが適正に行われなかったことによって追記ができなくなるという事態を回避することができる。
(4) When the monitoring unit determines that the remaining battery level is not enough to complete copying of the backup target file corresponding to one session, the copy unit performs backup corresponding to the one session. Do not copy the target file.
In this way, it is possible to prevent the session from being properly closed due to battery exhaustion, and to avoid a situation in which additional writing cannot be performed because the closing has not been performed properly.

(5)また、前述の監視手段は、あるセッションに対応するバックアップ対象のファイルのコピーを完了した後、別のセッションに対応するバックアップ対象のファイルのコピーを行う前に、この別のセッションに対応するバックアップ対象のファイルのコピーを完了するのにバッテリー残量が十分であるか否かについて判定する。
このようにすることで、1つのセッションを書き込むためにバッテリー残量が十分であるか否かについて判定できるので、バッテリー切れによりセッションのクローズが適正に行われないことを防止することができる。尚、セッションのクローズが適正に行われないと、そのCDには追記ができなくなるおそれがある。そうすると、そのCDは、追記ができる容量を残しつつも追記ができなくなり無駄を生じてしまう。本実施形態では、上述のような手法で、セッションのクローズを適正に終えるようにしている。
(5) In addition, the monitoring unit described above supports a different session after copying a backup target file corresponding to a certain session and before copying a backup target file corresponding to another session. It is determined whether or not the remaining battery capacity is sufficient to complete the copy of the file to be backed up.
In this way, it is possible to determine whether or not the remaining battery capacity is sufficient to write one session, so that it is possible to prevent the session from being properly closed due to battery exhaustion. Note that if the session is not properly closed, there is a possibility that additional recording cannot be performed on the CD. As a result, the CD cannot be additionally written while leaving a capacity for additional writing, resulting in waste. In the present embodiment, the session is properly closed by the method described above.

(6)また、前述のコピー手段は、コピーの完了したバックアップ対象のファイルのセッションに関する「書き込み終了情報」を有し、バックアップ対象のファイルのコピーがセッション単位で完了するごとにこの「書き込み終了情報」を更新する。
バッテリーが十分でないなどの理由により、全てのセッションについてCD3に書き込みが完了しない場合がある。このような場合であっても、更新された「書き込み終了情報」を参照することができ、この情報に基づいてセッションの書き込みを再開することができる。
(6) Further, the above copy means has “write end information” regarding the session of the backup target file that has been copied, and this “write end information” every time the copy of the backup target file is completed in session units. ”Is updated.
Due to reasons such as insufficient battery, writing to CD3 may not be completed for all sessions. Even in such a case, the updated “write end information” can be referred to, and the session write can be resumed based on this information.

(7)また、前述のコピー手段は、CD3にバックアップ対象のファイルをコピーする前に、メモリカード2に記憶されたバックアップ対象のファイルの属性をリードオンリーに変更する。また、コピー手段は、CD3へのバックアップ対象のファイルのコピーが完了した後に、メモリカード2に記憶されたバックアップ対象のファイルの属性をセッション単位で消去可能な属性に変更する。
このようにすることで、CD3にコピーが完了していないデータがメモリカード2から誤って削除されてしまうことのないようにすることができる。
(7) Further, the above-described copying unit changes the attribute of the backup target file stored in the memory card 2 to read only before copying the backup target file to the CD 3. Further, the copy means changes the attribute of the backup target file stored in the memory card 2 to an erasable attribute for each session after the copying of the backup target file to the CD 3 is completed.
In this way, it is possible to prevent data that has not been copied to the CD 3 from being accidentally deleted from the memory card 2.

(8)また、次のようなバックアップ処理方法があることはいうまでもない。すなわち、このバックアップ処理方法は、メモリカード2に記憶されているバックアップ対象のファイルを複数のセッションに分割してバックアップする場合に必要なCD3の容量を算出するステップを含む。また、このバックアップ処理方法は、算出された必要な容量とCD3の空き容量とに基づいてセッション分割数を決定するステップを含む。さらに、このバックアップ処理方法は、バックアップ対象のファイルを、決定されたセッション分割数に分けて、メモリカード2からCD3へコピーするステップを含む。
本実施形態のように複数のセッションに分けてCD3に書き込むことで、途中で書き込みが失敗した場合であっても、失敗する前に書き込まれたセッションのファイルについてはCD3から読み込みが可能となる。このようにして、既にバックアップしたデータを確保できるようになっている。
(8) Needless to say, there is the following backup processing method. That is, this backup processing method includes a step of calculating the capacity of the CD 3 required when the backup target file stored in the memory card 2 is divided into a plurality of sessions for backup. The backup processing method includes a step of determining the number of divided sessions based on the calculated necessary capacity and the free capacity of the CD3. Further, this backup processing method includes a step of copying the file to be backed up into the determined number of session divisions and copying it from the memory card 2 to the CD 3.
By writing to the CD 3 divided into a plurality of sessions as in this embodiment, even if the writing fails in the middle, the file of the session written before the failure can be read from the CD 3. In this way, already backed up data can be secured.

(9)また、上述のバックアップ処理方法をバックアップ処理装置に行わせるためのプログラムがあることはいうまでもない。 (9) Needless to say, there is a program for causing the backup processing apparatus to perform the above-described backup processing method.

本発明の一実施形態に係るバックアップ処理装置1の機能構成図である。It is a functional lineblock diagram of backup processing device 1 concerning one embodiment of the present invention. メモリカード2に格納されているディレクトリ構造の一例を示す。An example of the directory structure stored in the memory card 2 is shown. 1セッションでCD3にバックアップしたときのデータ構造を示す。The data structure when backing up to CD3 in one session is shown. 2セッションに分けてCD3にバックアップしたときのデータ構造を示す。The data structure when backing up to CD3 in two sessions is shown. ルートディレクトリエントリのデータ構造を示す。The data structure of the root directory entry is shown. 「DCIM」ディレクトリエントリのデータ構造を示す。The data structure of the “DCIM” directory entry is shown. 「MISC」ディレクトリエントリのデータ構造を示す。The data structure of the “MISC” directory entry is shown. 「100ABCDE」ディレクトリエントリのデータ構造を示す。The data structure of the “100ABCDE” directory entry is shown. 「101ABCDE」ディレクトリエントリのデータ構造を示す。The data structure of the “101ABCDE” directory entry is shown. パステーブルのデータ構造を示す。The data structure of a path table is shown. 分割バックアップ処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a division | segmentation backup process. ディレクトリ構造及び分割パターンの関係を示す図である。It is a figure which shows the relationship between a directory structure and a division | segmentation pattern. プリンタ401の全体構成を説明するための斜視図である。FIG. 2 is a perspective view for explaining the overall configuration of the printer 401. プリンタ401の全体構成のブロック図である。2 is a block diagram of an overall configuration of a printer 401. FIG. プリンタ401の電源系統を示した回路図である。3 is a circuit diagram illustrating a power supply system of a printer 401. FIG. メモリカード2のデータをCD3にバックアップするバックアップ処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the backup process which backs up the data of the memory card 2 to CD3. メモリカード2のデータをCD3にバックアップするバックアップ処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the backup process which backs up the data of the memory card 2 to CD3.

符号の説明Explanation of symbols

1 バックアップ処理装置、2 メモリカード、3 CD、11 バックアップ管理部、12 メモリカードリーダ/ライタ、13 CDリーダ/ライタ、19 コンピュータ、
30、31,32 バックアップデータ、
110 ACアダプタ、120 電池パック、121 充電回路、
122 A/D変換回路、123 電源検出回路、130 DC−DCコンバータ、
135 スイッチ、301,302 管理領域、
310 ルートディレクトリエントリ、311 「DCIM」ディレクトリエントリ、
312 「MISC」ディレクトリエントリ、
321 「100ABCDE」ディレクトリエントリ、
322 「101ABCDE」ディレクトリエントリ、330 パステーブル
401 プリンタ、411 コントローラ、412メモリカードリーダ/ライタ、
413 CDリーダ/ライタ、414 印刷部、415 インタフェース、
416 ハードディスクドライブ、417 液晶ディスプレイ、418 操作パネル
DESCRIPTION OF SYMBOLS 1 Backup processing apparatus, 2 Memory card, 3 CD, 11 Backup management part, 12 Memory card reader / writer, 13 CD reader / writer, 19 Computer,
30, 31, 32 Backup data,
110 AC adapter, 120 battery pack, 121 charging circuit,
122 A / D conversion circuit, 123 power supply detection circuit, 130 DC-DC converter,
135 switch, 301, 302 management area,
310 Root directory entry, 311 “DCIM” directory entry,
312 “MISC” directory entry,
321 “100ABCDE” directory entry,
322 “101ABCDE” directory entry, 330 path table 401 printer, 411 controller, 412 memory card reader / writer,
413 CD reader / writer, 414 printing unit, 415 interface,
416 hard disk drive, 417 liquid crystal display, 418 operation panel

Claims (9)

第1の記憶媒体に記憶されているバックアップ対象データを第2の記憶媒体へバックアップするためのバックアップ処理装置であって、
前記バックアップ対象データを複数のセッションに分割してバックアップする場合に必要な第2の記憶媒体の容量を算出し、当該算出された必要な容量と前記第2の記憶媒体の空き容量とに基づいてセッション分割数を決定する分割手段と、
前記バックアップ対象データを、前記セッション分割数に分けて、第1の記憶媒体から第2の記憶媒体へコピーするコピー手段と、
を備えるバックアップ処理装置。
A backup processing device for backing up backup target data stored in a first storage medium to a second storage medium,
The capacity of the second storage medium required when the backup target data is divided into a plurality of sessions for backup is calculated, and based on the calculated required capacity and the free capacity of the second storage medium A dividing means for determining the number of session divisions;
A copy unit that divides the backup target data into the number of divided sessions and copies it from a first storage medium to a second storage medium;
A backup processing apparatus comprising:
前記第2の記憶媒体はバッテリー駆動される装置により制御され、
前記バックアップ処理装置は、前記バッテリー駆動される装置のバッテリー残量を監視する監視手段をさらに備える、請求項1に記載のバックアップ処理装置。
The second storage medium is controlled by a battery-powered device;
The backup processing apparatus according to claim 1, further comprising a monitoring unit that monitors a remaining battery level of the battery-driven apparatus.
前記バッテリー残量が前記バックアップ対象データを前記第2の記憶媒体にバックアップするのに十分な残量であると前記監視手段によって判定されるときにおいて、前記分割手段は前記セッション分割数を0に決定する、請求項2に記載のバックアップ装置。   When the monitoring unit determines that the remaining battery capacity is sufficient to back up the backup target data to the second storage medium, the dividing unit determines the session division number to be 0. The backup device according to claim 2. 1つのセッションに対応するバックアップ対象データのコピーを完了するのに前記バッテリー残量が十分ではないと前記監視手段によって判定されるときにおいて、前記コピー手段は前記1つのセッションに対応するバックアップ対象データのコピーを行わない、請求項2又は3に記載のバックアップ装置。   When the monitoring unit determines that the remaining battery level is not sufficient to complete the copy of the backup target data corresponding to one session, the copy unit stores the backup target data corresponding to the one session. The backup device according to claim 2, wherein no copying is performed. 前記監視手段は、あるセッションに対応するバックアップ対象データのコピーを完了した後、別のセッションに対応するバックアップ対象データのコピーを行う前に、前記別のセッションに対応するバックアップ対象データのコピーを完了するのに前記バッテリー残量が十分であるか否かについて判定する、請求項4に記載のバックアップ装置。   The monitoring unit completes copying of backup target data corresponding to another session after copying backup target data corresponding to one session and before copying backup target data corresponding to another session. The backup device according to claim 4, wherein it is determined whether or not the remaining battery capacity is sufficient to perform the operation. 前記コピー手段は、コピーの完了した前記バックアップ対象データのセッションに関する情報を有し、前記バックアップ対象データのコピーがセッション単位で完了するごとに前記情報を更新する、請求項1〜5のいずれかに記載のバックアップ装置。   The copy unit has information on a session of the backup target data that has been copied, and updates the information every time the copy of the backup target data is completed on a session basis. The backup device described. 前記コピー手段は、前記第2の記憶媒体に前記バックアップ対象データをコピーする前に、前記第1の記憶媒体に記憶された前記バックアップ対象データの属性をリードオンリーに変更し、
前記第2の記憶媒体への前記バックアップ対象データのコピーが完了した後に、前記第1の記憶媒体に記憶された前記バックアップ対象データの属性をセッション単位で消去可能な属性に変更する、請求項1〜6のいずれかに記載のバックアップ処理装置。
The copy unit changes the attribute of the backup target data stored in the first storage medium to read-only before copying the backup target data to the second storage medium,
The attribute of the backup target data stored in the first storage medium is changed to an attribute that can be deleted on a session basis after the copy of the backup target data to the second storage medium is completed. The backup processing apparatus in any one of -6.
第1の記憶媒体に記憶されているバックアップ対象データを複数のセッションに分割してバックアップする場合に必要な第2の記憶媒体の容量を算出するステップと、
前記算出された必要な容量と前記第2の記憶媒体の空き容量とに基づいてセッション分割数を決定するステップと、
前記バックアップ対象データを、前記セッション分割数に分けて、前記第1の記憶媒体から前記第2の記憶媒体へコピーするステップと、
を含むバックアップ処理方法。
Calculating the capacity of the second storage medium required when the backup target data stored in the first storage medium is divided into a plurality of sessions for backup;
Determining the number of session divisions based on the calculated required capacity and the free capacity of the second storage medium;
Copying the backup target data into the session division number and copying the data from the first storage medium to the second storage medium;
Backup processing method including.
バックアップ処理装置を動作させるためのプログラムであって、
第1の記憶媒体に記憶されているバックアップ対象データを複数のセッションに分割してバックアップする場合に必要な第2の記憶媒体の容量を算出するステップと、
前記算出された必要な容量と前記第2の記憶媒体の空き容量とに基づいてセッション分割数を決定するステップと、
前記バックアップ対象データを、前記セッション分割数に分けて、前記第1の記憶媒体から前記第2の記憶媒体へコピーするステップと、
を前記バックアップ処理装置に行わせるプログラム。
A program for operating a backup processing apparatus,
Calculating the capacity of the second storage medium required when the backup target data stored in the first storage medium is divided into a plurality of sessions for backup;
Determining the number of session divisions based on the calculated required capacity and the free capacity of the second storage medium;
Copying the backup target data into the session division number and copying the data from the first storage medium to the second storage medium;
A program for causing the backup processing apparatus to execute
JP2007006259A 2006-03-10 2007-01-15 Backup processing apparatus, backup processing method, and program Expired - Fee Related JP5056020B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2007006259A JP5056020B2 (en) 2007-01-15 2007-01-15 Backup processing apparatus, backup processing method, and program
US11/717,396 US7698520B2 (en) 2006-03-10 2007-03-12 Method for processing backup, devices for backup processing, and storage mediums for storing a program for operating a backup processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007006259A JP5056020B2 (en) 2007-01-15 2007-01-15 Backup processing apparatus, backup processing method, and program

Publications (2)

Publication Number Publication Date
JP2008171351A true JP2008171351A (en) 2008-07-24
JP5056020B2 JP5056020B2 (en) 2012-10-24

Family

ID=39699362

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007006259A Expired - Fee Related JP5056020B2 (en) 2006-03-10 2007-01-15 Backup processing apparatus, backup processing method, and program

Country Status (1)

Country Link
JP (1) JP5056020B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210430A (en) * 1994-01-26 1995-08-11 Mitsubishi Electric Corp Backup device for distributed file
JPH11254792A (en) * 1998-03-16 1999-09-21 Ricoh Co Ltd Printing device
JP2001175518A (en) * 1999-12-20 2001-06-29 Nec Ic Microcomput Syst Ltd System and method for preparing backup, and recording medium
JP2004206611A (en) * 2002-12-26 2004-07-22 Hitachi Computer Peripherals Co Ltd Backup system
JP2005293519A (en) * 2004-04-06 2005-10-20 Hitachi Ltd Calculator and method of controlling calculator
JP2007241790A (en) * 2006-03-10 2007-09-20 Seiko Epson Corp Data backup processing unit and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210430A (en) * 1994-01-26 1995-08-11 Mitsubishi Electric Corp Backup device for distributed file
JPH11254792A (en) * 1998-03-16 1999-09-21 Ricoh Co Ltd Printing device
JP2001175518A (en) * 1999-12-20 2001-06-29 Nec Ic Microcomput Syst Ltd System and method for preparing backup, and recording medium
JP2004206611A (en) * 2002-12-26 2004-07-22 Hitachi Computer Peripherals Co Ltd Backup system
JP2005293519A (en) * 2004-04-06 2005-10-20 Hitachi Ltd Calculator and method of controlling calculator
JP2007241790A (en) * 2006-03-10 2007-09-20 Seiko Epson Corp Data backup processing unit and method

Also Published As

Publication number Publication date
JP5056020B2 (en) 2012-10-24

Similar Documents

Publication Publication Date Title
US7698520B2 (en) Method for processing backup, devices for backup processing, and storage mediums for storing a program for operating a backup processing device
US6473569B1 (en) Camera and information processing apparatus
JP2009282752A (en) Storage device and recording method of file system
US20070050577A1 (en) Information processing apparatus, information processing apparatus control program, and information processing apparatus control method
CN105354109A (en) Backup method and apparatus for video monitoring index data
US20080155319A1 (en) Methods and systems for managing removable media
CN101515258A (en) Recording control apparatus, one-time recording medium, recording system, and recording medium control method and program
US20140089263A1 (en) File recording apparatus, file system management method, and changer drive
JP5056020B2 (en) Backup processing apparatus, backup processing method, and program
US20070112722A1 (en) File system and file information processing method
US20140089733A1 (en) File recording apparatus, file system management method, file recovery method, and changer drive
JP4481226B2 (en) Image management device
JP4508137B2 (en) Data backup processing apparatus and method
JP2008059007A (en) Semiconductor storage device
JP2008171352A (en) Copy device for data, copy method for data, and program
JP2005166166A (en) Format management system
JP2006133923A (en) Data recording/reproducing device, recording/reproducing method, program and data recording medium
US8032009B2 (en) Backup management apparatus
JP2008171484A (en) Information recording/reproducing device
JP4612816B2 (en) Recording / reproducing apparatus and control method
JP4490375B2 (en) Data recording device
JP2859205B2 (en) Data recording device and data recording method for flash memory of portable information processing system
JP2007164376A (en) Power source controller, power source control method, power source control program and recording medium
JP4982990B2 (en) Copy apparatus and method
JP2008269726A (en) Recording and reproducing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111021

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111025

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111220

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: 20120703

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120716

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150810

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees