INCREMENTAL BACKUP SYSTEM

Abstract: In a method and system for operating a computer system, in particular a microprocessor-based computer system, modified areas of one or more files on a hard disk are monitored (22), and an auxiliary database is constructed (24) containing modification data sets relating to the location of those modified areas. On backup, the database is interrogated (30) and just those areas of files which have been modified are backed up (32) as a modification file. In this way the size of the backup may be reduced. Subsequently data may be restored by interrogating the auxiliary data to identify which file areas are in the modification file, and selectively overwriting the data on the hard disk with backed-up data read from the modification file. The method and system may be incorporated in a dedicated backup application and/or operating system, or may interact with a conventional file-by-file backup application.

Description: INCREMENTAL BACKUP SYSTEM BACKGROUND OF THE INVENTION This invention relates to a method of operating a computer system, and in particular to a method of providing backup copies of data to guard against data becoming corrupted or lost. The invention is particularly concerned with the provision of backups for personal computers (PCs) . Using current computer systems, file backup can be a time consuming operation. As long as a file to be backed up is fairly small, such as a word-processing file for example, then there are no major little problems. However, a large multi-user database may have large files, often being larger than 1 Gigaby e. Currently, a fast tape drive is capable of a sustained data transfer rate of about 20 Megabytes/minute. A 1 Gigabyte file therefore takes a minimum of 51.2 minutes to back up. If backup copies of the database are to be kept up-to-date, then a single change in this file means that the whole file must be backed up. Furthermore, whilst the backup is in progress, no other user can modify the file without rendering the backup useless. Even if data is backed up overnight, for example, typically the backup window will only be 12 hours long, which is sufficient for only 14 Gigabytes to be backed up at these transfer rates. This assumes that a tape drive having an autochanger for replacing full tapes is available. Large-scale file servers have already reached the point where the length of the backup window is insufficient and/or the volume of data to be backed up is too great for a conventional backup system having only one tape drive. The current approach to this problem is to build faster tape drives, typically by streaming data to two or more tape drives in parallel. However, the technical limitations of tape drive mechanisms suggest that, at least in the near future, data rates exceeding 1 to 2 Megabytes/second and approaching those of hard disk systems are unlikely to be attainable. We have appreciated that since technical developments in storage systems are producing a rate of increase in hard disk capacity which exceeds the rate of increase in tape drive data transfer rates, the problem of backing up large quantities of data will not be solved by building faster tape drives . SUMMARY OF THE INVENTION The invention in its various aspects is defined in the independent claims . Advantageous features are set forth in the appendant claims . A preferred embodiment of the invention is described in detail below with reference to the drawings. In this embodiment, modified areas of one or more files on a hard disk are monitored, and an auxiliary database is constructed containing modification data sets relating to the location of those modified areas. On backup, the database is interrogated and just those areas of files which have been modified are backed up as a modification file. In this way the size of the backup may be reduced. Preferably, the auxiliary database is optimised by analysing the data sets to establish, whether any of them relate to the same or similar areas of the same file. If the database contains data sets relating to the same area then only the latest one is relevant and earlier ones can be discarded. If several data sets relate to partially overlapping or contiguous areas then they may be concatenated into a single data set covering the total area formerly covered by the several data sets . In this way, the size of the data base may be reduced and the number of accesses to a particular file during backing up and restoring may be reduced. The auxiliary database, once created, contains a record of all modified areas of files modified since the 'last database was created (probably since the last backup depending whether incremental, differential or full backups are being performed) . The database may be interrogated to establish which areas of which files have been modified, and this information may then be used to permit the backing up of only modified areas of a file rather than the whole file. In order to perform a backup using a conventional file-by-file backup application, a modification file is preferably created which contains the contents of the database and the data from the areas of the files referred to in the database. This file may then be backed up using a conventional backup application program. Alternatively, the modification file may not actually exist as a file saved on the storage means, but may instead be simulated in such a way that the backup application interacts with it as though it were a file which does exist. This technique can be used to save time and/or storage space on the storage means. A first preferred technique for simulating the modification file is to create a file on the storage means that is the same size as the modification file will be when it contains the auxiliary database and the associated areas of modified files. The simulated file contains redundant information and is only provided as an entity with which the backup application interacts as though it were a file of that size. Read requests from the backup application are monitored and, when the application attempts to read the simulated file, the data requested by the application is generated in real time and passed to the application instead of data from the file on the storage means. In this way, time is saved by not needing to write the modification file to the storage means and subsequently reading it back to pass it to the backup application. A second preferred technique is to monitor directory read requests from the backup , application and to add details of the simulated modification file to the information returned by the operating system in such a way that the directory appears to include the modification file although no such file exists. When the backup application attempts to read the file, data is substituted in the same way as in the first technique. This technique saves space on the storage means by not requiring a file to be created on the storage means at all. The method may be incorporated in an independent program which interacts with a separate operating system and/or backup application or it may form an integral part of one or both of these. The method preferably includes a restoration phase which may be implemented as an independent program or as an integral part of an operating system and/or a backup application. The restoration phase may comprise interrogating the database to identify which areas are in the modification file, reading the backed up modification file, and subsequently writing backed up data to appropriate areas of files according to the modification data sets backed up as part of or with the modification file. BRIEF DESCRIPTION OF THE DRAWINGS The invention will now be described by way of example, with reference to the drawings, in which: Figure 1 is a block diagram of a personal computer and a tape drive; Ficrures 2A and 2B are diagrams illustrating a system memory map at the operating system level of a conventional personal computer, and a computer modified to operate in accordance with the method of the invention, respectively; Figure 3 is a flowchart of a file write process in accordance with the invention; Figure 4 is a flowchart of a backup process in accordance with a first embodiment of the invention; Figure 5 is a flowchart of a backup process in accordance with a second embodiment of the invention; and Figure 6 is a flowchart of a backup process in accordance with a third embodiment of the invention. DESCRIPTION OF THE PREFERRED EMBODIMENT OF THE INVENTION With reference to Figure 1 of the drawings, a personal computer (PC) 10 typically comprises a central processing unit (CPU) 12, a random access memory (RAM) 14, and a storage device in the form of a hard disk drive 16. In this example, for the purpose of providing backup storage means, a tape unit 18 is coupled to the computer 10. In order to reduce the volume of data that is required to be backed up on such a system, in accordance with this invention the size of the smallest entity that can be backed up (currently a single file) is reduced. Currently, all file-by-file backup applications rely on the computer operating system to record which areas of the file system have been modified, and hence which areas require backing up. In all present PC based and Local Area Network (LAN) based operating systems, information relating to modified files is provided using a so-called "archive" flag, associated with each file, which is set when the file is modified. Each operating system also provides means by which the flag may be cleared when the file has been backed up. In a preferred embodiment of the invention, means are provided for identifying particular areas of a file that have been modified rather than a whole file. In this way a backup may be performed which is more efficient in its usage of backup storage capacity and time. In a preferred embodiment, the system does not form part of an operating system or backup application. Once the system has been activated to record modifications to files or to a particular subset of files, calls to the operating system to write to files are intercepted. With reference to Figures 2A and 2B, whenever a program wishes to access a file, it calls a standard routine which writes data to the disk. This routine, which in the case of the DOS operating system is known as Interrupt 21 hex (INT21h) , is an integral part of the operating system. The action performed by the routine depends on the parameters passed to the routine upon entry. This routine is shown in Figure 2A as INT21h forming part of the operating system in a system memory map, the INT21h entry point being shown by an arrow. To carry out a preferred method in accordance with the invention, additional program code is added at the operating system interface level as shown in Figure 2B. In practice, in a DOS environment, this can be loaded into the computer as a device driver using the CONFIG.SYS file. The added software has the effect that an instruction to write data is replaced or supplemented by an alternative set of instructions. A similar technique may be used to intercept an instruction to read data from the disk and to replace or supplement this also with an alternative set of instructions. With reference to the flowchart of Figure 3, when an application performs step 20 to write data to a file, this is intercepted at the operating system interface level and steps 22 and 24 are inserted before the file write requested by the application is performed in step 26. In step 22, using the information passed to the operating system as part of step 20, the file to be written to is identified and a modification data set comprising the starting point or offset and the length of write are extracted. This data set uniquely identifies an area or portion of a particular file. In step 24, this data set is stored in an auxiliary database. Control is then passed back to the write routine so that the write operation requested by the application is performed in the normal way (step 26) . This sequence is repeated for each write request received by the operating system. In this way a database is constructed which contains a record of the location of all modified areas of files (although not of the data actually written to the files) . If the auxiliary database is suitably indexed, step 24 may also include a consolidation operation which ensures that the database does not contain redundant information. For example, there is little point in the database retaining a modification data set relating to an area of a file that has subsequently been overwritten. Earlier data sets are therefore discarded. Similarly if several modification data sets relate to overlapping areas of a file, these may be concatenated into a single modification data set relating to the total area associated with the several data sets. The several data sets may then be discarded. Furthermore, the data sets may be ordered so that they form a sequential list related, for example, to the order of storage of the files on the storage means. Since only the location of modifications and not the modifications themselves are stored in the database, the impact on the performance of the computer system is minimal. Having established the auxiliary database, there are several ways of backing up the areas represented by it. In a first embodiment, a dedicated backup application is written or modified to take account of the database created according to the flowchart of Figure 3. The operation of this arrangement is shown in Figure 4. In step 28, the backup process is begun. In step 30, the backup application interrogates or queries the auxiliary database to establish which areas of which files have changed. At this point, the backup application may filter out those files which it is not wished to backup according, for example, to whether a particular file is included in a list of directory structure which has previously been specified by the user, in a conventional manner. In step 32, a file which has been identified as modified is opened, and the data in the modified area identified by the database is copied to the backup media 18. Steps 30 and 32 are repeated until all files recorded in the database have been considered by the backup application and the modified areas recorded on the backup media 18. In addition to the data from the files, a copy of the database is also recorded, by the backup application so that the backed up data may be identified during restoration. The information from the database may be distributed throughout the backup or may be recorded separately at the beginning or end of the backup, for example. Since this is the only data that need be backed up to keep an up-to-date backup copy, and since typical users only modify very small parts or areas of a file, it will be appreciated that this backup copy will be significantly smaller than a backup comprising all the data in each file that has been modified. Three alternative embodiments which do not require a dedicated backup application program are described below. Conventional backup applications are arranged to backup a complete file. In the first of the three alternatives, a modification file is created and stored on the hard disk 16. This file contains the database information and the data stored in the file areas referred to in the database. A conventional backup application is then caused to backup the modification file and in so doing, backs up sufficient information to enable modifications made since the last backup to be restored. The two further alternatives are based around a phantom or simulated file. In a second alternative, before the backup application is caused to backup the modification file as described above, a simulated or phantom file is created which has the same size as that of the modification file were it to be created. No useful data is stored in this file and its purpose is to provide an entry in the directory structure which can be interrogated by the backup application. By causing the backup application to attempt to backup this phantom file, the application will generate a series of read requests which can be intercepted at the operating system interface level as described above. With reference to Figure 5, in step 34, each read request is intercepted to check whether an attempt to read from the phantom file is being made and if so, the requested data is redirected in real-time. The redirection operation is performed in step 36. In this step, che backup application is nor fed data from the phantom file but is instead fed redirected data which corresponds to that that would be read from the position in the modification file which corresponds to the requested position in the phantom file; i.e. it is fed the database information and the modified file areas. In this way, although disk space is taken up by the phantom file (which contains redundant data) the time taken to create and subsequently read the modification file is saved. In the third alternative embodiment, no phantom file is created on the hard disk 16. With reference to Figure 6, instead of creating a phantom file to provide an entry in the directory structure, the directory read request generated by the backup application is intercepted (step 38) in the same manner as the file read and write requests. In step 40, information relating to a non-existent phantom file is added to the directory list returned by the operating system to the backup application. By intercepting file open requests and file read requests at the operating system interface level, the remainder of the backup procedure proceeds as described above for the second alternative. In this way, the waste of disk space caused by the creation of a phantom file containing redundant data is avoided. In order to restore the backed up data, a modification data file that has previously been backed up is read. The auxiliary database is thereby extracted to identify which areas of which files are contained in the modification file. The respective areas on the hard disk 16 may then all or selectively be overwritten with the backed up data. It will be appreciated that the embodiments described above may form an integral part of a backup application and/or of an operating system.

Claims: CLAIMS 1. A method of operating a microprocessor-based computer system including a random access memory, a central processing unit, and storage means, the method comprising the step of: providing instructions stored in the memory to the central processing unit to cause the central processing unit to write data periodically to at least one file stored in the storage means by generating a write request; wherein the write request comprises a modification data set which represents an area of the file modified by the write request; and wherein the modification data set includes identification means for identifying the file, a starting position in the file, and a length value corresponding to the quantity of data to be written to the file, the method further comprising the steps of: extracting the modification data set from each write request, and building an auxiliary database containing at least one said modification data set. 2. The method of claim 1, further comprising the step of analysing a plurality of modification data sets in the auxiliary database, and for each group of modification data sets relating to overlapping or contiguous write requests, replacing each group with a single respective new modification data set. 3. The method of claim 1, further comprising the step of interrogating the database to establish which areas of which files have been modified. 4. The method of claim 1, further comprising the step of creating a backup copy by backing up data stored in the storage means using information from the auxiliary database to indicate which data to backup. 5. The method of claim 4 wherein the step of creating the backup copy comprises the steps of: creating a modification file containing the area of each file represented by each modification data set, storing the modification file on the storage means, and instructing a backup application program to make a backup copy of the modification file. 6. The method of claim 4, wherein the step of creating the backup copy comprises the steps of: instructing a backup application program to make a backup copy of a modification file, and simulating the modification file, the simulated modification file containing the area of each file represented by each modification data respective set. 7. The method of claim 6, wherein the step of simulating the modification file comprises the steps of: monitoring read requests generated by the backup application, responding to each read request which corresponds to the modification file by redirecting at least the requested portion of the modification file in real-time, and passing the requested portion to the backup application in response to the read request. 8. The method of claim 7, wherein the step of simulating the modification file further comprises the step of : monitoring directory read requests from the backup application and adding details of the modification file to the information returned by the operating system in response to each directory read request . 9. The method of claim 7, wherein the step of simulating the modification file further comprises the step of creating a file containing redundant data having a size corresponding to the expected size of the modification file. 10. The method of claim 1, wherein the method is performed as an integral part of the operation of a backup application program. 11. The method of claim 1, wherein the method is performed as an integral part of the operation of a computer operating system. 12. The method of claim 5 comprising the steps of: reading a modification data set from the modification file, reading the respective area from the modification file, and writing the area to the file specified in the modification data set. 13. A microprocessor-based computer system including a random access memory, a central processing unit, and storage means, the system comprising means for: providing instructions stored in the memory to the central processing unit to cause the central processing unit to write data periodically to at least one file stored in the storage means by generating a write request, wherein the write request comprises a modification data set which represents an area of the file modified by said write request, and wherein the modification data set includes identification means for identifying the file, a starting position in the file and a length value corresponding to the quantity of data to be written to the file, the system further comprising means for: extracting the modification data set from each write request, and building a database containing at least one the modification data set. 14. The system of claim 13, further comprising means for analysing a plurality of the modification data sets in the auxiliary database and for each group of modification data sets relating to overlapping or contiguous write requests to replace each group with a single respective new modification data set. 15. The system of claim 13, further comprising means for interrogating the database to establish which areas of which files have been modified. 16. The system of claim 13, further comprising means for creating a backup copy by backing up data stored in the storage means using information from the auxiliary database to indicate which data to backup. 17. The system of claim 16, wherein the means for creating the backup copy comprises means for: creating a modification file containing the area of each file represented by each modification data set, storing the modification file on the storage means, and instructing a backup application program to make a backup copy of the modification file. 18. The system of claim 16, wherein the means for creating the backup copy comprises means for: instructing a backup application program to make a backup copy of a modification file, and simulating the modification file, the simulated modification file containing the area of each file represented by each modification data set. 19. The system of claim 18, wherein the means for simulating the modification file comprises means for: monitoring read requests generated by the backup application, responding to each read request which corresponds to the modification file by redirecting at least the requested portion of the modification file in real-time, and passing the requested portion to the backup application in response to the read request. 20. The system of claim 19, wherein the means for simulating the modification file further comprises means for: monitoring directory read requests from the backup application, and adding details of the modification file to the information returned by the operating system in response to each directory read request. 21. The system of claim 19, wherein the means for simulating the modification file further comprises means for creating a file containing redundant data having a size corresponding to the expected size of the modification file. 22. The system of claim 13, wherein the system forms an integral part of the operation of a backup application program. 23. The system of claim 13, wherein the system forms an integral part of the operation of a computer operating system. 24. The system of claim 17 comprising means for: reading a modification data set from the modification file, reading the respective area from the modification file, and writing the area to the file specified in the modification data set. 25. A method of operating a microprocessor-based computer system including a random access memory, a central processing unit, and storage means, the method comprising the steps of: providing an auxiliary database containing modification data sets which represent areas of a file on the storage means that have been modified by a write request, each modification data set including identification means for identifying a starting position in the file, and a length value corresponding to the quantity of data to be written to the file; and providing instructions stored in the random access memory to the central processing unit to command the following operations : interrogating the auxiliary database to establish which areas of the file has been modified; and creating a backup copy by backing up data stored in the storage means, using information from the database to indicate which data to backup. 26. Apparatus for operating a microprocessor-based computer system which includes a random access memory, a central processing unit, and storage means, comprising: an auxiliary database containing modification data sets which represent areas of a file on the storage means that have been modified by a write request, each modification data set including identification means for identifying a starting position in the file, and a length value corresponding to the quantity of data to be written to the file; means for providing instructions stored in the random access memory to the central processing unit; means for interrogating the auxiliary database to establish which areas of the file have been modified; and means for creating a backup copy by backing up data stored in the storage means, using information from the database to indicate which data to backup. 27. A method of accessing data in a microprocessor-based computer system including a random access memory, a central processing unit, main storage means, and backup storage means, the method comprising the step of: providing an auxiliary database containing modification data sets which represent areas of a file on the storage means that have been modified, each modification data set including identification means for identifying a starting position in the file, and a length value corresponding to the quantity of data to be written to the file; providing a modification data file containing areas of the file represented by each modification data set; and providing instructions stored in the random access memory to the central processing unit to command the following operations: interrogating the auxiliary database to establish which areas of the file have been modified; and restoring data from the modification data file to the main storage means using information from the database to indicate which data to restore. 28. Apparatus for accessing data in a microprocessor-based computer system including a random access memory, a central processing unit, main storage means, and backup storage means, comprising: an auxiliary database containing modificati.on data sets which represent areas of a file on the storage means that have been modified, each modification data set including identification means for identifying a starting position in the file, and a length value corresponding to the quantity of data to be written to the file; a modification data file containing areas of the file represented by each modification data set; means for providing instructions stored in the random access memory to the central processing unit;means for interrogating the auxiliary database to establish which areas of the file have been modified; and means for restoring data from the modification data file to the main storage means using information from the database to indicate which data co restore.

Inventors: MALCOLM PETER BRYAN, MALCOLM, PETER, BRYAN
Applicants: INTELLIGENCE QUOTIENT INT, INTELLIGENCE QUOTIENT INTERNATIONAL LIMITED
Application year: 1994
Main classification: G06F11
IPC codes: G06F11, G06F12, G06F17