The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, however, both as to organization and method of practice, together with the further objects and advantages thereof, may best be understood by reference to the following description taken in connection with the accompanying drawings in which:
In accordance with one embodiment, the present invention employs three steps: the first to save the necessary attributes during the backup, the second to define the restore policy rules and the third to apply the restore policies to the file attributes during the actual restore operation to select the proper storage pool for the file's data.
The backup utility runs by scanning the file system, looking for new files or files that have changed. It then opens the file, obtains the attributes, permissions, and if the data has changed, it copies the data as well. The backup utility stores the information off-line, then continues scanning for additional files to be backed up. During this step, we collect the policy attributes and return them with each file, preferable as an opaque, extended attribute of the file or, alternatively, as the first bytes of data. Returning the policy attributes with the file attributes allows the backup utility to avoid copying the data each time the file migrates between on-line storage pools.
The restore rules are installed as part of the file system's configuration, but may be updated at any time. Each rule specifies a criteria that a file should meet to be selected for the designated pool. Typically, there is a “default” rule that matches all unselected files. The criteria may be based on file attributes, file content, current storage pool utilization, etc. Policy rules for restoring files differ from the original placement rules to allow for the wider range of attributes available during the restore operation, namely, the original file attributes. Other selection criteria may be used such as: current file attributes, current state of the file system, current storage pool utilization, current date and time, or even random assignments.
In its most typical use, the present invention performs restore operations based upon saved file attributes, but the restore rules are more general than this. In particular, the restore rules may also consider other factors, including attributes about the new file, the state of the current file system, the current time or even random numbers. Some of the restore criteria are therefore seen to possibly be outside a file's attributes per se; nonetheless, they are still usable in conjunction with the present invention.
The restore utility runs by starting with a list of files or directories that are to be restored to the on-line file system. This may be a complete restore, say after a hardware failure, or it may be a partial restore, say only the files for a single user. The file system is on-line and available for regular use while the files are being restored. The restore utility runs as root. For each file to be restored, the utility creates the file in the on-line file system, restores the file's attributes, then the file data and finally restores the file's timestamps. Before restoring the data, when the file attributes are restored, the policy attributes are parsed and the file is assign to the appropriate storage pool. This may involve using the installed policies to select the pool or simply assigning the file to its prior pool. Other file attributes, for reliability, performance or retention, may also be restored or selected via the installed policies. Once the pool is assigned, the file data is restored immediately to the proper location.
As described above it is seen that the focus of the save and restore operations is directed to storage pool identification. However, it is noted that the same method is also employable for saving and restoring other file indicia such as its replication factor (for reliability), its reliability factor or performance criteria. In particular, it is desirable to extend the attributes saved to include additional information on performance criteria to insure that a restored file has the same access performance as the original.
While the invention has been described in detail herein in accordance with certain preferred embodiments thereof, many modifications and changes therein may be effected by those skilled in the art. Accordingly, it is intended by the appended claims to cover all such modifications and changes as fall within the true spirit and scope of the invention.