Providing an information processing apparatus and information processing method that prevent the occurrence of inconsistencies between restored files and other files, thereby improving ease of use. When restoring a backup virtual tree, the owner of each file and directory belonging to the backup virtual tree is identified; and when it is found, based on the identification result, that the owner of any of the files or directories is not a target user and the update time and/or version of the backup file or directory is older than that of the corresponding present file or directory, the backup file or directory is restored back into a special directory accessible for the target user with the tree structure of the original virtual tree intact.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application relates to and claims priority from Japanese Patent Application No. 2007-138931, filed on May 25, 2007, the entire disclosure of which is incorporated herein by reference.

BACKGROUND

1. Field of the Invention

The invention relates to an information processing apparatus and information processing method and is suitable for use in, for example, a storage system.

2. Description of Related Art

Conventionally, creating a file with a link to another file made public by a different user by using the link function of HTML (HyperText Markup Language) or Word (Microsoft registered trademark) is commonly performed.

When a link source file having a link to another file, such as the one described above, is backed up and later restored, the version of the link source file may be older than the version of the link destination file and so there may be an inconsistency between them. For example, there is a problem that, if the link source file and the link destination file are source codes, when the link destination file is changed due to a version change of a source program, the compiler cannot compile the source code.

To solve the above problem, when backing up a file in a file system, a file made public by a different user may also be backed up using NDMP (Network Data Management Protocol) tar commands or the technique described in JP2006-323999 A.

Note that tar commands are ordinary commands used for backing up files to tapes. JP2006-322999 A also discloses a technique for separately managing physical storage locations and logical storage locations so that users can use files without paying attention to the storage destinations of the files.

However, the following problem exists. For example, Windows (Microsoft trademark), which is broadly used as an OS (operating system) in clients, has a function called ABE (Access-Based Enumeration) for obscuring files and directories that a target user does not have access rights for when the target user access trees. As a result of this function, when using the tar commands, directories are obscured unless the target user has access rights for them, so if a public file belonging to a different user exists below the obscured directories, that file cannot be backed up.

Furthermore, with the technique described in JP2006-323999 A, there is a problem that, when a user who is accessing a logical storage location in a file attaches a link to a logical storage location in another file, the user cannot access the other file with a user program for accessing physical storage areas. This problem occurs with, for example, include of headers of program sources and images for HTMLs.

This invention has been devised in light of the above points and it is an object of this invention to provide an information processing apparatus and information processing method that prevent the occurrence of inconsistencies between restored files and other files, thereby improving ease of use.

SUMMARY

In order to achieve the above object, this invention provides an information processing apparatus including: an identification unit for identifying the owner of each file and directory belonging to a virtual tree when restoring a backup of the virtual tree, the virtual tree being a virtual file system tree composed of, from among one or more files and directories forming a file system, only the files and directories accessible for a target user; and a restoration unit for comparing, when it is found, based on the result of the identification by the identification unit, that the owner of any of the files and directories is not the target user, the update time and/or version of the backup file or directory with that of the corresponding present file or directory, and when the update time and/or version of the backup file or directory is older than that of the corresponding present file or directory, restoring the backup file or directory back into a special directory accessible by the target user while maintaining the tree structure of the original virtual tree.

Accordingly, with this information processing apparatus, regarding a file or directory that a target user does not have ownership for and that has already been updated, its backup file or directory is restored back into a special directory with its original tree structure intact. In the restored virtual tree, the access destination for that file or directory is switched from the present file or directory to the restored file or directory in the special directory, so inconsistencies between the file of the target user and the file of another user can be effectively avoided.

This invention also provides an information processing method including: a first step of identifying the owner of each file and directory belonging to a virtual tree when restoring the backup of the virtual tree, the virtual tree being a virtual file system tree composed of, from among one or more files and directories forming a file system, only the files and directories accessible for a target user; and a second step of comparing, when it is found, based on the result of the identification by the identification unit, that the owner of any of the files and directories is not the target user, the update time and/or version of the backup file or directory with that of the corresponding present file or directory, and when the update time and/or version of the backup file or directory is older than that of the corresponding present file or directory, restoring the backup file or directory back into a special directory accessible by the target user while maintaining the tree structure of the original virtual tree.

Accordingly, with this information processing method, regarding a file or directory that a target user does not have ownership for and that has already been updated, its backup file or directory is restored back into a special directory with its original tree structure intact. In the restored virtual tree, the access destination for that file or directory is switched from the present file or directory to the restored file or directory in the special directory, therefore, so inconsistencies between the file of the target user and the file of another user can be effectively avoided.

According to this invention, it is possible to realize an information processing apparatus and information processing method that prevent the occurrence of inconsistencies between restored files and other files, thereby improving ease of use.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Embodiments of this invention will be described below with reference to the attached drawings.

(1-1) Entire Configuration of Storage System

FIG. 1shows an entire storage system according to Embodiment 1. In this storage system1, one or more clients2are connected to a file server4via a network3, the file server4also being connected to a storage subsystem5. A management computer6and a backup server7are also connected to the network3and the backup server7is also connected to a tape apparatus8.

Clients2are terminals for users to make file access requests to the server4and they are, for example, personal computers, work stations, or mainframes. As shown inFIG. 2, each client2is composed of information processing resources such as a CPU (Central Processing Unit)10, a memory11, and a network interface12.

The memory11stores a file sharing client13as a control program and the CPU10runs this file sharing client13so that the clients2can access files stored in the storage subsystem5. The network interface20enables communication between the clients2and the file server4and management computer6via the network3.

The file server4provides a file access service to the clients2in response to file access requests and is, for example, an NFS (Network File System) server, CIFS (Common Internet File System) server, or similar. As shown inFIG. 1, the file server4is composed of a network interface20, CPU21, memory22, and storage interface23. The connections between the network interface20and CPU21, between the CPU21and storage interface23, and between the CPU21and memory22are made via buses24, enabling communication.

The network interface20and storage interface23are each structured from network interface cards such as SCSI (Small Computer System Interface) cards, LAN (Local Area Network) interface cards, or FC (Fibre channel) interface cards; and are used as data I/O adapters for connecting the file server4to the clients2and storage subsystem5.

The CPU21is the processor in charge of controlling operations in the entire file server4and performs various control processing based on various programs stored in the memory22. The memory22is used mainly for storing various programs and management tables. As shown inFIG. 3, a virtual tree providing program30(explained later), file system monitoring program31and backup agent32as well as virtual directory entries33(33A-33n) (explained later), which are provided for each user, and path mapping table34are stored in the memory22.

The storage subsystem5is composed of a plurality of memory devices40and a controller41for controlling those memory devices40.

The memory devices40are, for example, expensive disk drives such as FC disks, inexpensive disk drives such as SATA (Serial AT Attachment) disks or optical disk drives, or semiconductor memories. A predetermined number of (for example, four) memory devices40make up one RAID (Redundant Array of Inexpensive Disks) group. The memory devices40forming one RAID group together provide a memory region, and one or more logical volumes VOL are defined for this memory region. Data in a file system42is stored in these volumes VOL.

The controller41includes hardware resources such as a CPU and a memory. In response to a request from a client2, it executes control processing to read/write data from/to a designated volume VOL in the storage subsystem5.

The management computer6is for the maintenance and management of the storage system1and is, for example, a personal computer, work station, or mainframe. As shown inFIG. 4, the management computer6is composed of a CPU50, memory51, network interface52, and display53.

The memory51stores a management program54as a control program and the CPU runs this management program54to perform various processing such as collecting required information from the storage subsystem5, displaying the collected information on the display53, and setting designated parameters for the storage subsystem5and file server4. The network interface52is the same as the network interface12(FIG. 2) in the client2. The display53is structured with a CRT (Cathode-Ray Tube), liquid crystal panel, etc.

The backup server7performs control processing, such as reading the data stored in the storage subsystem5to back it up to a magnetic tape loaded in the tape apparatus8, as well as restoring the data backed up in the magnetic tape back onto the storage subsystem5. As shown inFIG. 5, the backup server7is composed of information processing resources such as a CPU60, memory61, network interface62, and device interface63.

The memory61stores a backup program64as a control program and the CPU60runs this backup program64so that the backup server7performs control processing for the aforementioned backup and restoration. The network interface62is the same as the network interface12(FIG. 2) in the client2. The device interface63is for the transmission of data and commands with the tape apparatus8.

The tape apparatus8is a recording/playback apparatus for reading/writing data from/to a magnetic tape, and is composed of a tape drive70, controller71, and device interface72. The tape drive70has a drive mechanism for recording/playing back data to/from a loaded magnetic tape as well as fast-forwarding or rewinding a magnetic tape, under the control of the controller71. The controller71has information processing resources such as a CPU and a memory and controls the operation of the tape drive70in response to an instruction from the backup server7, reading/writing restoration target data or backup target data from/to a magnetic tape.

FIG. 6shows a general configuration for the file system42(FIG. 1). In this file system42, files are stored in storage locations called directories. A directory may include files as well as more directories, forming a tree structure (hierarchical structure) of directories. In this tree structure of directories, the top level directory is called the ‘root (or root directory)’ while working directories individually allocated to respective users are called ‘home directories.’ Each user may establish his/her own directory structure in his/her home directory.

As shown inFIG. 7, in the file system42, metadata84(84A-84n) for the files and directories, directory entries85(85A-85n), data, and logs are stored and centrally managed in memory regions called a metadata region80, directory entry region81, data region82, and log region83, respectively.

Metadata84(84A-84n) is management information created for each file and directory. Each piece of metadata84is composed of pieces of information90A-90F: a metadata number, size, file type, access right, attribute, and pointer.

A metadata number is the identification number uniquely assigned to the piece of metadata84; the size is the size of data in the corresponding file or directory. The file type is the type of file whether the corresponding file is a file or a directory; and the access right information is the information for the access right set for the corresponding file or directory. The attribute is the name of the owner of the corresponding file or directory; and a pointer indicates the initial address of the region, within the data region82, that stores the data in the corresponding file when the corresponding object is a file.

A directory entry85(85A-85n) is management information created for each directory for managing the tree structure in the file system42. Each directory entry85is composed of metadata numbers and file/directory names of files and directories contained in the corresponding directory. Accordingly, by referring to these directory entries85, one can know which files and directories present in which directories, and thereby ascertain the tree structure of the entire file system42.

FIG. 8shows the specific content of the access right information90D. As shown inFIG. 8, the access right information90D is composed of: user name information90DX indicating the names of users having the access right; and access right content information90DY indicating the content (‘read’ and/or ‘write’) of the access right given to the users. In the example shown inFIG. 8, ‘user 1’ is allowed only to ‘read,’ while ‘user 2’ and ‘user 3’ are allowed to ‘read’ and ‘write.’

(1-2) File System Function According to Embodiment 1

(1-2-1) Virtual Tree Creation Function

The file system function according to Embodiment 1 of the file server4will be explained below.

The file server4according to Embodiment 1 has a file system function loaded therein for providing each user with a virtual file system tree (‘virtual tree’) suitable for the user and backing up and restoring the information for the virtual trees.

In practice, the file server4creates a virtual tree according to the rules below and provides it to a user.

First, the file server4creates a virtual tree by copying, within the actual file system tree, the tree structure (only the file names and directory names) from the root directory to the home directory of the user currently a target (‘target user’) as well as the structure below the home directory. For example, when the actual file system tree has the tree structure shown inFIG. 9(A)and the home directory of the target user is ‘User 1,’ the virtual tree for the target user at this stage will be as shown inFIG. 9(B)with a solid line.

Then, the file server4looks up other user trees and if there is an accessible file, it connects that file to the above-created virtual tree (FIG. 9(B)). Here, the directories present on the path from the root directory to that file are also created in the above-created virtual tree, regardless of whether or not the target user has an access right for them. Accordingly, when another user's ‘file 3’ is public in the example shown inFIG. 9(A), the virtual tree for the target user will be as shown inFIG. 9(C). The file server4then provides the thus-created virtual tree to the target user as a file system tree.

The file server4also stores and manages the tree structure of the above-created virtual tree for the target user as a virtual directory entry33(33A-33n) as shown inFIG. 10, in the memory22(FIG. 1). Note that this virtual directory entry33has the same structure as that of the directory entry85described in relation toFIG. 7, except that it also includes an attribute92, which is the name of the user of that virtual tree.

FIG. 11is a flowchart showing the specific content of the processing performed by the CPU21in the file server4to create a virtual tree for each user as described above.

In this storage system1, when a system administrator adds a user via the management computer6, the management computer6sends a notice to the file server4via the network3. When the CPU21in the file server4receives this notice, it reads and obtains, based on the file system monitoring program31(FIG. 3) stored in the memory22, the directory entry85(FIG. 7) for the directory designated as the home directory for the added user (‘additional user’) from the storage subsystem5(SP1).

The CPU21then creates a virtual directory entry33for that additional user by copying the above-obtained directory entry85to the memory22(SP2). Thus, the virtual tree made of the copy of the tree structure below the home directory for that additional user is created. The CPU21then sets the name of the additional user as the attribute92(FIG. 10) in that virtual directory entry33(SP3).

The CPU21then sets the root directory as a target directory (‘look-up directory’) for the look-up processing following step SP5(SP4); and judges whether or not it has performed check processing in step SP6for all the files and directories present in the look-up directory (SP5).

If the judgment is negative, the CPU21selects one file or directory within the look-up directory; reads the metadata84(FIG. 7) for that selected file or directory from the storage subsystem5; and judges whether or not the selected one is a file based on that metadata84(SP6).

If the judgment in step SP6is positive, the CPU21reads the access right information90D (FIG. 7) in the metadata84for that file stored in the storage subsystem5; and judges whether or not the additional user has a right to read that file based on the access right information90D (SP7). If the judgment is positive, the CPU21returns to step SP5.

Meanwhile, if the judgment in step SP7is negative, the CPU21deletes the metadata number and file name for that file from the additional user's virtual directory entry33(FIG. 10) stored in the memory22(SP8); and returns to step SP5. Because the steps SP6and SP7are performed for all the files present in the current look-up directory, metadata numbers and file names of the files for which the additional user has no access right will all be deleted from the additional user's virtual directory entry33.

Meanwhile, if the judgment in step SP6is negative, it means that the selected one is a directory. Accordingly, the CPU21switches the look-up directory from the root directory to that directory; returns to step SP5; and repeats the same steps (SP5-SP9-SP5) until the judgment in step SP5is positive.

If the judgment in step SP5is positive in the end, the CPU21judges whether or not the current look-up directory is the root directory based on the virtual directory entry for the additional user (SP10).

If the judgment is negative, the CPU21judges whether or not the owner of the current look-up directory matches the user name of the virtual directory entry33—more specifically, whether or not the user name identified by the attribute90E (FIG. 7) in the metadata84for the current look-up directory matches the user name identified by the attribute92(FIG. 10) for the virtual directory entry33(SP11).

If the judgment in step SP11is positive, the CPU21switches the look-up directory from the current directory to the one on the level immediately above (SP14); and returns to step SP5. Meanwhile, if the judgment in step SP11is negative, the CPU21judges whether or not any other directory is present in the look-up directory (SP12).

If the judgment in step SP12is positive, it means that a file accessible for the additional user may be present in that other directory or directories below that other directory. It is necessary to keep that other directory so that the additional user can access the files. Accordingly, if the judgment in step SP12is positive, the CPU21switches the look-up directory from the current directory to the one on the level immediately above (SP14) and returns to step SP5.

Meanwhile, if the judgment in step SP12is negative, it means that there is no possibility that a file accessible for the additional user is present below the look-up directory. Therefore, if the judgment in step SP12is negative, the CPU21deletes the metadata number and directory name of the current look-up directory from the virtual directory entry33(SP13); switches the look-up directory from the current directory to the one on the level immediately above (SP14); and returns to step SP5.

As a result of the loop processing from steps SP5-SP14, the virtual tree for the additional user is created, the virtual tree being composed only of the information for: all the directories from the root directory to the home directory for the additional user; all the directories and files below the additional user's home directory; all the files accessible for the additional user; and the directories between the root directory and those accessible files.

When the CPU21has performed the judgment in steps SP6and SP7for all the files in the file system42and the judgment in step SP10is positive, it terminates this virtual tree creation processing.

(1-2-2) Virtual Tree Update Function

After the virtual tree creation processing, when any of the users changes any file access right or deletes a file, the file server4reflects the change or deletion in the virtual tree(s) of the user(s) involved, for example, the user(s) assigned additional access right(s). For example, where the tree structure of a user's virtual tree immediately after creation is as shown inFIG. 9(B), when another user makes a ‘file 3’ public, the virtual tree for the user will be updated to the state shown inFIG. 9(C).

FIG. 13is a flowchart showing the specific content of the processing performed by the CPU21to make a change in the virtual tree of a target user according to a change in the access right to a file in the file system42.

When the CPU21receives, from any of the clients2, an access right change request—a request for a change to be made in the access right for a file owned by a user of the client2, it changes the content of the access right information90D (FIG. 7) in the metadata84for that file stored in the storage subsystem5to the content designated in the access right change request.

Also, in parallel with the above change of the access right information90D, the CPU21first identifies, based on the file system monitoring program (FIG. 3) and the currently-received access right change request, the user(s) influenced by the change in that access right (e.g., user(s) newly assigned the access right or user(s) deprived of the access right) (SP20). For example, when the access right change request requests that an access right be assigned to a user, an access right be deprived from a user, or that the content of an access right of a user be changed (e.g., from ‘read/write’ to ‘read’), the CPU21identifies that ‘user’ as an ‘influenced user.’

The CPU21then judges whether or not it has performed later-mentioned virtual tree change processing for all the users identified in step SP20(SP21).

If the judgment is negative, the CPU21specifies one of the users identified in step SP20and updates his/her virtual directory entry33, i.e., when a new access right is assigned to the user by the access right change, the new accessible file and the directories from the root directory to that file are added to the virtual tree of that user; or when the user is deprived of his/her access right by the access right change, the CPU21deletes the relevant file and, if necessary, the directories from the root directory to that file from the virtual tree of that user (SP22).

The CPU21then repeats the same steps (SP21-SP22-SP21) and when it has updated the virtual directory entries33for all the users identified in step SP20and so the judgment in step SP21is positive, it terminates this virtual tree update processing.

(1-2-3) Virtual Tree Backup Function

In this storage system1, a user may send from the client2a backup request designating a virtual tree to back up, to the backup server7.

When the CPU60in the backup server7receives a backup request, it instructs, based on the backup program64, the storage subsystem5to back up a designated target virtual tree. Having received this instruction, the storage subsystem5sends the data for the designated virtual tree (relevant virtual directory entry33, data for the respective files present in the virtual tree realized by the virtual directory entry33, metadata for the respective files and directories present in the virtual tree, etc.) to the backup server7via the file server4. Having received this data, the CPU60in the backup server7controls the tape apparatus8so that it records the data on a magnetic tape.

FIG. 14is a flowchart showing the specific content of the processing performed by the CPU21in the file server4to back up a virtual tree as described above.

Having received a backup execution command designating a virtual tree from the backup server7, the CPU21sets, based on the backup agent32(FIG. 3), the root directory in the designated virtual tree as a look-up directory based on the virtual directory entry33for the designated virtual tree stored in the memory22(SP30).

The CPU21then judges whether or not it has performed check processing in step SP32for all the files and directories in the current look-up directory (SP31). If the judgment is negative, the CPU21selects one of the files or directories in the look-up directory; reads the metadata84(FIG. 7) for that selected file or directory from the storage subsystem5; and judges whether or not the selected one is a file based on the metadata84(SP32).

If the judgment in step SP32is positive, the CPU21reads the data in that file from the storage subsystem5; and sends it to the backup server7. Then, the tape apparatus8backs up, under the control of the backup server7, this data on a magnetic tape by recording (SP33).

Meanwhile, if the judgment in step SP32is negative, the CPU21sends the data in the virtual directory entry33for the directory selected in step SP32to the backup server7. The tape apparatus8then backs up, under the control of the backup server7, the data in the magnetic tape and thereby, the directory is created in the backup destination (SP34).

The CPU21then switches the look-up directory from the root directory to the directory that has been backed up in step SP34(SP35); and repeats the same steps (SP31-SP35-SP31) until the judgment in step SP31is positive.

If the judgment in step SP31is positive in the end, the CPU21reads the metadata84for the current look-up directory from the storage subsystem5; and judges whether or not the current look-up directory is the root directory based on the metadata84(SP36).

If the judgment in step SP36is negative, the CPU21switches the look-up directory from the current look-up directory to the one on the level immediately above (SP37); and returns to step SP31. It then repeats the steps (SP31-SP37-SP31) until the judgment in step SP36is positive.

When the CPU21has backed up all the files and directories in the designated virtual tree and the judgment in step SP36is positive, it terminates this backup processing.

(1-2-4) Virtual tree restoration function

In this storage system1, a user may send, from the client2, a restoration request designating a restoration target backup virtual tree, to the backup server7.

When the CPU60(FIG. 5) in the backup server7receives a restoration request, it controls, based on the backup program64, the tape apparatus8so that it can read the data for the designated backup virtual tree (the relevant virtual directory entry33, and the data for the respective files present in the virtual tree realized by the virtual directory entry33) from the magnetic tape, and sends it to the file server4with the restoration request.

Having received the restoration request, the file server4stores the virtual directory entry33for the designated backup virtual tree and the data for the respective files present in the designated backup virtual tree in the memory22; and restores the backup virtual tree based on these data according to the rules below.

Specifically, regarding the files in the home directory, the file server4restores them as usual while maintaining the tree structure. Accordingly, in the case where the virtual tree having the tree structure shown inFIG. 9(C)has been backed up and when the home directory of the target user is ‘user1,’ the file server4restores the backup ‘file 1’ and ‘file 2’ as usual.

When the backup data includes a file of a different user, the file server4compares the update time and version of the backup file with those of the corresponding present file; and when they are the same, it terminates the processing without restoring that backup file. Accordingly, in the case ofFIG. 9(C), the backup virtual tree will be restored with its tree structure intact.

Meanwhile, when at least either the update time or version of the backup file is different from that of the corresponding present file (i.e., the present file is newer than the backup file), the file server4creates a special directory (‘restoration directory’) in the target user's home directory; and restores the backup-point-in-time file back into the restoration directory while maintaining the tree structure. Accordingly, in the case shown inFIG. 9(C), when the other user's file is the ‘file 3,’ the backup ‘file 3’ is restored back into the restoration directory ‘.restor’ created in the target user's home directory, with its tree structure intact as shown inFIG. 9(D).

Here, for the file restored back into the restoration directory, the file server4adds the path name of the restoration directory at the top of the path name of that restored file. For example, inFIG. 9(D), when the original path name of the file restored in the restoration directory is ‘/home/dep.3/user2/prod1/file3’ and the path name of the restoration directory is ‘/home/dep.2/user1/.restor,’ the new path name for that restored file will be ‘/home/dep.2/user1/.restor/home/dep.3/user2/product1/file3. The file server4then registers the metadata number of the metadata84for that restored file, the original path name of the restored file, and the new path name of the restored file—including the path name of the restoration directory—in the path mapping table100while establishing correspondence relationships between them.

When the file server4receives a request to access a file, it refers to the path mapping table100and, if a new path name is registered for that file, it accesses to that file based on that new path name.

FIGS. 16 and 17are flowcharts showing the specific content of the processing performed by the CPU21in the file server4to restore a backup virtual tree as described above.

When the CPU21receives, from the backup server7, a request to restore a backup virtual tree, the virtual directory entry33for the backup virtual tree, the data for the respective files present in the backup virtual tree, and the metadata84(FIG. 7) for the respective files and directories in the backup virtual tree, it first sets, based on the backup agent32(FIG. 3), the root directory in the backup virtual tree as a look-up directory, the root directory being identified based on the data for the restoration target backup virtual tree sent from the backup server7(SP40).

The CPU21then judges whether or not it has restored all the files and directories in the current look-up directory (SP41). If the judgment is negative, the CPU21selects one of the backup files or directories and judges whether or not the owner of the backup file or directory in the current look-up directory is the user of the restoration target backup virtual tree (SP42).

If the judgment is positive, the CPU21proceeds to step SP46, while if the judgment is negative, it judges whether or not the update time and version of the corresponding present file or directory are newer than those of the backup file or directory (SP43).

If the judgment in step SP43is negative, the CPU21then returns to step SP41. Meanwhile, if the judgment in step SP43is positive, it adds the path name of a restoration directory—a special path name—to the original path name of the restored file or directory (SP44). The CPU21then registers the metadata number of the file or directory restored back onto the restoration directory in the path mapping table100while establishing correspondence relationships with its original path name and new path name, which is made by adding the special path name to the original path name (SP45).

The CPU21then judges whether or not the current restoration target is a backup file or not (SP46) and, if it is a backup file, the CPU21judges whether or not the corresponding file is already present in the restoration destination (SP47). If the judgment is negative, the CPU21restores (in other words, creates) the backup file back into the restoration directory (SP48) and returns to step SP42.

Meanwhile, if the judgment in step SP47is positive, the CPU21overwrites the data in the present file with the data in the current restoration target backup data (SP49); and returns to step SP41.

Meanwhile, if the judgment in step SP46is negative, the CPU21judges whether or not the corresponding directory is already present in the restoration destination (SP52). If the judgment is positive, the CPU21proceeds to step SP54. Meanwhile, if the judgment is negative, it restores the backup directory (SP53). The CPU21then sets that directory as the look-up directory (SP54); and returns to step SP41.

Meanwhile, if the judgment in step SP41is positive, the CPU21judges whether or not the current look-up directory is the root directory (SP50). If the judgment is negative, it switches the look-up directory from the current directory to the one on the level immediately above (SP51); and returns to step SP41.

Meanwhile, if the judgment in step SP50is positive, the CPU21creates a virtual directory entry33(FIG. 10) for the user and stores it in the memory22(FIG. 1) (SP55).

The CPU21then judges whether or not it has performed the same processing for all the entries in the path mapping table100(SP56); and, if the judgment is negative, it searches the metadata for the respective restoration target files and directories for the metadata for the entry the CPU21has not yet performed the processing for, based on the metadata number of that entry in the path mapping table100(SP57).

The CPU21then changes the value of the pointer information90F (FIG. 7) contained in the found metadata to the initial address of the region, within the data region82, that stores the data corresponding to the file or directory existing at the location of the ‘new path name’ for the above-found entry in the path mapping table100(SP58) and returns to step SP55. The CPU21then performs the same processing (SP55-SP58-SP55) for all the entries in the path mapping table100.

When the CPU21has performed the same processing for all the entries in the path mapping table100and the judgment in step SP56is positive, it terminates this virtual tree restoration processing.

(1-3) Effects of Embodiment 1

With the foregoing configurations, a file made public by a different user can be backed up without losing its physical location. Moreover, regarding a file or directory that a target user does not have ownership of and that has already been updated, the corresponding backup file or directory is restored to a restoration directory with its original tree structure intact. Accordingly, in the restored virtual tree, even if the user's file has a link to a file of another user, the occurrence of inconsistencies between the user's file and the other user's file can be effectively prevented, thereby realizing an easy-to-use storage system1.

In Embodiment 1, backup of data in the file system42(FIG. 6) is performed by backing up the data for a previously-created virtual tree. In Embodiment 2, backup of data in the file system42is performed by checking, for each file present in the file system42, whether or not a target user has an access right for it; and backing up the data for the files the user has access rights for.

FIG. 18is a flowchart showing the specific content of the virtual tree backup processing according to Embodiment 2 performed by the CPU21in the file server4.

When the CPU21receives, from the backup server7, a backup execution instruction designating a virtual tree, it reads, based on the backup agent110(FIG. 3) according to Embodiment 2 stored in the memory22, the respective directory entries85(FIG. 7) in the file system42stored in the storage subsystem5; and sets the root directory of the file system tree as the look-up directory based on these directory entries85(SP60).

The CPU21then judges whether or not it has performed check processing in step SP62for all the files and directories in the current look-up directory (SP61). If the judgment is negative, the CPU21selects one file or directory in the look-up directory; reads the metadata84(FIG. 7) for the selected file or directory from the storage subsystem5; and judges whether or not the selected one is a file based on the metadata84(SP62).

If the judgment in step SP62is negative, the CPU21switches the look-up directory from the current directory to the one selected in step SP62(SP67); and returns to step SP61.

Meanwhile, if the judgment in step SP62is positive, the CPU21judges whether or not the target user has a read right for the file based on the access right information90D (FIG. 7) contained in the metadata84(SP63).

If the judgment in step SP63is negative, the CPU21returns to step SP61, whereas if the judgment is positive, it judges whether or not the owner of the file is the target user (SP64). If the judgment is positive, the CPU21proceeds to step SP66, whereas if the judgment is negative, it sends the metadata numbers and directory names of the directories present in the path from the root directory to the file to the backup server7. Consequently, the backup server7creates a virtual directory entry33(FIG. 10) based on the metadata numbers and directory names of the directories present in the path from the root directory and the file (FIG. 10) (SP65).

The CPU21then sends the data for the file to the backup server7(SP66). As a result, the data for the file and the data for the virtual directory entry33created in step SP65are recorded in the magnetic tape by the tape apparatus8, and the data for the file is backed up. The CPU21then returns to step SP61and repeats the same steps (SP61-SP66-SP61).

Meanwhile, if the judgment in step SP61is positive, the CPU21judges whether or not the current look-up directory is the root directory, based on the respective directory entries read from the storage subsystem5(SP68).

If the judgment in step SP68is negative, the CPU21switches the look-up directory from the current directory to the one on the level immediately above (SP69). It then repeats the same steps (SP61-SP69-SP61) until it has performed the judgment in step SP62for all the files belonging to the file system42.

If the judgment in step SP68is positive in the end, the CPU21terminates this virtual tree backup processing according to Embodiment 2.

With the foregoing configurations, backup of data in the file system42is performed by checking, for each file present in the file system42, whether or not the target user has an access right for it; and backing up the data for the files the user has access rights for. Accordingly, it is possible to back up all the files the user has access rights for without missing any. Accordingly, a virtual tree the same as the one in Embodiment 1 can be created to back up the data.

(3) Other Embodiments

The foregoing embodiments were explained for the case where this invention is employed in a storage system1having the configuration shown inFIG. 1; however, this invention is not limited to this case and may be widely employed in storage systems having other various kinds of configurations.

The foregoing embodiments were also explained for the case where a file server4is provided and the file system function according to the embodiments is employed in this file server4, however, the file system function may alternatively employed in the storage subsystem5.

The foregoing embodiments were also explained for the case where an identification unit and a restoration unit are integrated in one CPU21; the identification unit identifies the owner of each file and directory belonging to a backup virtual tree when restoring the backup virtual tree; and the restoration unit compares, when it is found that the owner of a backup file or directory is not a target user based on the result of the identification by the identification unit, the update time and version of the backup file or directory with those of the corresponding present file or directory, and when at least one of the update time and version of the backup file or directory is older than that of the corresponding present file or directory, restoring the backup file or directory into a special directory accessible for the target user while maintaining the tree structure of the original virtual tree. However, this invention is not limited to this case and the identification unit and restoration unit may alternatively be separately provided.

This invention can be widely applied in storage systems with various kinds of structures with file system functions.