HK1014594B - Incremental backup system - Google Patents
Incremental backup system Download PDFInfo
- Publication number
- HK1014594B HK1014594B HK98115859.1A HK98115859A HK1014594B HK 1014594 B HK1014594 B HK 1014594B HK 98115859 A HK98115859 A HK 98115859A HK 1014594 B HK1014594 B HK 1014594B
- Authority
- HK
- Hong Kong
- Prior art keywords
- file
- modification
- data
- backup
- database
- Prior art date
Links
Description
This invention relates to a method of operating a computer system to provide 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 problems. However, a large multi-user database may have large files, often being larger than 1 Gigabyte. 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.
Our International Patent Application WO91/01026 describes a system in which a copy of every change made to a storage medium is written to a backup storage medium as the change occurs. European Patent Application EP-A-0 332 210 describes a system in which backup is made by reference to an indicator flag set for each disc region, e.g. cylinder, which is changed.
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 portions 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 portions. On backup, the database is interrogated and just those portions 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 portions of the same file. If the database contains data sets relating to the same portions then only the latest one is relevant and earlier ones can be discarded. If several data sets relate to partially overlapping or contiguous portions then they may be concatenated into a single data set covering all the portions formerly covered by the several data sets. In this way, the size of the database 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 portions 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 portions of which files have been modified, and this information may then be used to permit the backing up of only modified portions 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 portions 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 portions 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 portions are in the modification file, reading the backed up modification file, and subsequently writing backed up data to appropriate portions of files according to the modification data sets backed up as part of or with the modification file.
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;
- Figures 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.
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 portions of the file system have been modified, and hence which portions 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 portions of a file that have been modified rather than a whole file. As will clearly be appreciated, these portions will be of variable length. 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 an application 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 (variable) length of write are extracted. This data set uniquely identifies a 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 portions 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 a portion of a file that has subsequently been overwritten. Earlier data sets are therefore discarded. Similarly if several modification data sets relate to overlapping portions of a file, these may be concatenated into a single modification data set relating to all the portions 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 file portions 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 portions 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 portion 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 portions 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 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 portions 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, the backup application is not fed data from the phantom-file but is instead fed redirected data which corresponds to that which 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 portions. 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 portions of which files are contained in the modification file. The respective portions 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 (22)
- A method of operating a microprocessor-based computer system to provide backup copies of data, the computer system including a random access memory (14), a central processing unit (12), and long-term storage means (16), the method comprising the step of:providing application program instructions stored in the random access memory (14) to the central processing unit (12), the instructions comprising generating a write request to cause the central processing unit (12) to write data from time to time to at least one file stored in the long-term storage means (16);wherein the write request issued by the application program comprises a modification data set which represents a portion of the file less than the whole file modified by the write request; the modification data set includes identification means for identifying the file, a starting position in the file, and a length value corresponding to the variable quantity of data to be written to the file; and including the steps of extracting the modification data set from each write request, and building an auxiliary database containing the modification data sets extracted from the write requests and not containing the actual data of the modified file portion; and further comprising at a subsequent time the step of creating a backup copy on a backup medium by backing up data stored in the long-term storage means using information from the auxiliary database to indicate which data to backup.
- 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.
- The method of claim 1, further comprising the subsequent step of interrogating the database to establish which portions of which files have been modified.
- The method of claim 1, wherein the step of creating the backup copy comprises the steps of:creating a modification file containing the portion of each file represented by each modification data set,storing the modification file on the storage means, andinstructing a backup application program to make a backup copy of the modification file.
- The method of claim 4, further comprising the steps of:reading a modification data set from the database,reading the respective portion from the modification file, andwriting the portion to the file specified in the modification data set.
- The method of claim 1, 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,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, andpassing the requested portion to the backup application in response to the read request.
- The method of claim 6, wherein the step of monitoring read requests 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.
- The method of claim 6, wherein the step of monitoring read requests further comprises the step of creating a file containing redundant data having a size corresponding to the expected size of the modification file.
- The method of claim 1, wherein the method is performed as an integral part of the operation of a backup application program.
- The method of claim 1, wherein the method is performed as an integral part of the operation of a computer operating system.
- The method of claim 1, including subsequently restoring backed-up data by the steps of:interrogating the auxiliary database to establish which portions of the file have been modified; andrestoring data from the modification data file to the main long-term storage means using information from the database to indicate which data to restore.
- A microprocessor-based computer system for use in the method of claim 1 and including a random access memory (14), a central processing unit (12), and long-term storage means (16), the system comprising means for:providing application program instructions stored in the random access memory (14) to the central processing unit (12), the instructions comprising a write request to cause the central processing unit (12) to write data from time to time to at least one file stored in the long-term storage means (16);wherein the write request issued by the application program comprises a modification data set which represents a portion of the file less than the whole file modified by said write request, the modification data set includes identification means for identifying the file, a starting position in the file and a length value corresponding to the variable quantity of data to be written to the file; and including means (22,24) for extracting the modification data set from each write request, and building a database containing the modification data sets extracted from the write requests and not containing the actual data of the modified file portion; and further comprising means (32) for at a subsequent time creating a backup copy on a backup medium by backing up data stored in the long-term storage means using information from the auxiliary database to indicate which data to backup.
- The system of claim 12, 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.
- The system of claim 12, further comprising means (30) for subsequently interrogating the database to establish which portions of which files have been modified.
- The system of claim 12, wherein the means for creating the backup copy comprises means for:creating a modification file containing the portion of each file represented by each modification data set,storing the modification file on the long-term storage means, andinstructing a backup application program to make a backup copy of the modification file.
- The system of claim 15, further comprising means for:reading a modification data set from the database,reading the respective portion from the modification file, andwriting the portion to the file specified in the modification data set.
- The system of claim 12, 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,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, andpassing the requested portion to the backup application in response to the read request.
- The system of claim 17, wherein the means for monitoring read requests 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.
- The system of claim 17, wherein the means for monitoring read requests further comprises means for creating a file containing redundant data having a size corresponding to the expected size of the modification file.
- The system of claim 12, wherein the system forms an integral part of the operation of a backup application program.
- The system of claim 12, wherein the system forms an integral part of the operation of a computer operating system.
- The system of claim 12, including means for subsequently restoring backed-up data comprising:means (34,38) for interrogating the auxiliary database to establish which portions of the file have been modified; andmeans for restoring data from the modification data file to the main long-term storage means (16) using information from the database to indicate which data to restore.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16538293A | 1993-12-10 | 1993-12-10 | |
US08/165,382 | 1993-12-10 | ||
PCT/GB1994/002631 WO1995016237A1 (en) | 1993-12-10 | 1994-12-01 | Incremental backup system |
Publications (2)
Publication Number | Publication Date |
---|---|
HK1014594A1 HK1014594A1 (en) | 1999-09-30 |
HK1014594B true HK1014594B (en) | 2000-05-05 |
Family
ID=
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0733235B1 (en) | Incremental backup system | |
US8005797B1 (en) | File-level continuous data protection with access to previous versions | |
JP3410899B2 (en) | How to recover a multivolume data set | |
US5086502A (en) | Method of operating a data processing system | |
US8296264B1 (en) | Method and system for file-level continuous data protection | |
AU710755B2 (en) | Storage of computer data | |
US6158019A (en) | System and apparatus for merging a write event journal and an original storage to produce an updated storage using an event map | |
US6898688B2 (en) | Data management appliance | |
US6816941B1 (en) | Method and system for efficiently importing/exporting removable storage volumes between virtual storage systems | |
EP1461700B1 (en) | Appliance for management of data replication | |
US7340645B1 (en) | Data management with virtual recovery mapping and backward moves | |
US7783848B2 (en) | Method and apparatus for backup and recovery using storage based journaling | |
US6915315B2 (en) | Self archiving log structured volume with intrinsic data protection | |
US20070208918A1 (en) | Method and apparatus for providing virtual machine backup | |
US20030167380A1 (en) | Persistent Snapshot Management System | |
US20070061540A1 (en) | Data storage system using segmentable virtual volumes | |
EP0483174B1 (en) | A method of operating a data processing system | |
HK1014594B (en) | Incremental backup system |