Method for database assisted file system restore
AssigneeInternational Business Machines Corporation
InventorsHui-I Hsiao, Kiran Mehta, Inderpal Singh Narang
Life of this patent
Estimating the term…
Abstract
Recovery of a filesystem directory structure is performed to restore it to any point in time and also to synchronize a database restore and a filesystem restore to bring the two restores to a database consistent state. A database management system (DBMS) manages external files and hierarchical directory structures to enable recovery and reconciliation of the files and filesystems, under DBMS control, after filesystem crashes. First, a database table, which recorded previous directory creations and deletions, is used to rebuild a filesystem's directory structure to any previous database state and then external file link information is used to restore files to that same state.
Claims22
A method to restore a filesystem's directory structure to a point in time comprising the following steps:
- a. creating a database table;
- b. recording an entry in said table for each directory/subdirectory created in said filesystem, wherein each of said table entries comprises:
- a directory/subdirectory name,
- a filesystem identifier,
- a node identifier within said filesystem, and
- a parent directory's node identifier;
- c. updating an entry corresponding to a directory/subdirectory when said directory/subdirectory is modified;
- d. reconstructing said filesystem by applying at least one of said entries to restore said filesystem's directory structure to a previous state.
A method of rebuilding a subdirectory structure in a filesystem comprising the following steps:
- a. creating a database table;
- b. recording an entry in said table for each directory/subdirectory created in said filesystem;
- c. updating an entry corresponding to a directory/subdirectory when said directory/subdirectory is modified;
- d. identifying a target subdirectory to be rebuilt;
- e. finding an entry in said database table associated with said desired subdirectory and extracting a directory/subdirectory name from said entry;
- f. identifying a parent directory of said entry found in said previously executed step (i.e step e or g);
- g. finding an entry in said database table associated with said parent directory and extracting a directory/subdirectory name from said entry;
- h. recursively applying steps f and g until a parent directory is not identified in step f, and
- i. rebuilding a full directory path by concatenating all said extracted directory/subdirectory names using a last-found first-out order.
A method of restoring database managed external files to a restored filesystem's directory structure comprising the steps:
- a. identifying a desired previous database state;
- b. restoring a filesystem's directory structure to a state substantially similar to said filesystem's directory structure at said previous database state;
- c. identifying every one of said external files managed by said database;
- d. extracting at least one version of each of said identified external files and a corresponding database state identifier from an archival storage facility;
- e. if only one version of said external file is extracted, then selecting said version;
- f. if more than one version of said external file is extracted, then selecting said version which matches said desired previous database state;
- g. repeating steps d through f for each of said external files identified in step c, and
- h. restorin said selected versions of each of said identified external files to said filesystem's directory structure.
A method of using a database management system to maintain a record of directory operations on a filesystem which comprises the following steps:
- a. creating a managed database table;
- b. recording an entry in said table for each directory/subdirectory created in said filesystem, said entry comprising:
- a directory/subdirectory identifier;
- a status flag;
- a creation time-stamp identifier, and
- a modification time-stamp identifier;
- c. updating an entry corresponding to a directory/subdirectory when said directory/subdirectory is modified.
An article of manufacture comprising a computer medium having computer readable program code embodied therein which implements a restoring a filesystem's directory structure to a point in time comprising:
- a. creating a database table;
- b. recording an entry in said table for each directory/subdirectory created in said filesystem, wherein each of said table entries comprises:
- a directory/subdirectory name,
- a filesystem identifier,
- a node identifier within said filesystem, and
- a parent directory's node identifier;
- c. updating an entry corresponding to a directory/subdirectory when said directory/subdirectory is modified;
- d. reconstructing said filesystem by applying at least one of said entries to restore said filesystem's directory structure to a previous state.
A system for restoring a filesystem's directory structure to a point in time comprising:
- a filesystem comprising one or more directories;
- a database management system;
- a database table, managed by said database management system, comprising an entry associated with each of said directories in said filesystem;
- a database agent which updates said entry when said associated directory is modified;
- a restoration process which re-creates a directory in said filesystem according to said associated database table entry, and
- wherein at least one of said directories is re-created in order to restore said filesystem's directory structure to a previous state.
Dependencies are inferred from the claim text.