1. Field of Invention
The present invention relates to a snapshot mechanism. More particularly, the present invention relates to a snapshot mechanism adopting a rollforward and a many-to-one management method, which is adaptive to a remote snapshot mechanism.
2. Description of Related Art
To backup data for security, selection of a backup technique should take possible disasters, such as natural disasters, physical damage to the storage hardware and data corruption (including human errors, software errors, viruses, hacker invasion) into consideration. Only generating copies of the original data cannot solve the problem of data corruption. Thus, to correctly recover the data, the concept of version control should be adopted, and a snapshot technique meets the requirement.
The first advantage of the snapshot technique is that a current service will not be interrupted, by which the service level of the company will be improved. The second advantage is that a backup window is shortened, so frequently conducting snapshoot and backup the important data can be easily achieved. As such, a data loss window can be effectively shortened to reduce the estimated amount of data loss when disasters occur. The third advantage is that snapshot can solve the problem of data corruption. The above-mentioned backup window refers to the time needed for executing backup. The backup window is usually defined by the time needed for operating a backup process. For example, if data is needed from 8 a.m. to midnight, the window can be used to fabricate backup copies from midnight to 8 a.m. of the next day. However, to obtain consistent backup, data cannot be varied when being backed up. Therefore, in some circumstances, the backup window is also a time interval in which data and application programs cannot be used.
Copy-on-write (CoW) is the mainstream of practical snapshot manners, as it has good flexibility, scalability and can be practiced at a block level. Besides, the efficiency of snapshot at a block level is higher than at a file system level. As the CoW is independent from the file system in design, the dependency thereof to the file system does not need to be considered. In the snapshot of copy-on-write, when CoW occurs, the write action is suspended till the CoW action is finished. As for a remote snapshot, the time needed to suspend a write process will add double transmission time, the application performance is affected and weakened significantly.
In the development of snapshot techniques, LSI Logic Corporation Company proposed a snapshot technique in the U.S. Pat. No. 6,771,843 titled “Data Timeline Management Using Snapshot Volumes” published on Aug. 3, 2004. As shown in FIG. 1, the data loss window is shortened to reduce loss and avoid accidents caused by man-made improper operations. The snapshot technique of rollforward is achieved by reserving the snapshot data after the time point for rollback plus timeline management skills.
As shown in FIG. 1, according to the technique, snapshot volumes 110, 120, 130, 140 respectively reserve data at one o'clock, two o'clock, three o'clock and four o'clock on one day afternoon. When rolled back to the status reserved by the snapshot volume 120, the data is checked sequentially by an algorithm provided by the LSI Company, and the data required to be reserved is replicated into one or several appropriate volumes. Thus, to roll forward, the snapshot volume 130 or the snapshot volume 140 can be used to roll forward to the status at three o'clock or four o'clock. When system administrator makes an improper operation, the system can be recovered to the point-in-time before improper operation happened. To rollback to the snapshot volume 120, for example, the data of the snapshot volume 120 will be cleared, and Copy-on-Write (CoW) must be performed again for rolling forward, thus prolonging the recovery window in such a situation. Another disadvantage is that the block of the CoW may need to be replicated into a plurality of snapshot images, which results in the waste of resources.
In addition, LSI Logic Corporation Company proposed another snapshot technique in the U.S. Pat. No. 6,594,744 titled “Managing a snapshot volume or one or more checkpoint volumes with multiple point-in-time images in a single repository” published on Jul. 15, 2003, which supports a single snapshot volume to store a plurality of snapshot images. As shown in FIG. 2, all the snapshots belonging to the same target volume are stored in a big snapshot volume. For example, each snapshot of a target volume 210 is respectively stored in a snapshot volume 220 in sequence, for example, snapshots A, B, C and D are respectively stored in images A, B, C and D of the same snapshot volume 220. Similarly, each snapshot of the target volume 230 is respectively stored in a snapshot volume 240 in sequence, for example, snapshots E, F, G and H are respectively stored in images E, F, G and H in the same snapshot volume 240. That is, different target volumes respectively have the corresponding snapshot volumes.