Patent ID: 7565355

Claim:
A computer implemented method for merging file systems during a cloning operation, the method comprising the steps of: a cloning manager reading contents of a source file system as a stream of objects; the cloning manager identifying a destination file system into which to merge the source file system stream during the cloning operation; and the cloning manager merging objects of the source file system stream into the destination file system by replacing select corresponding objects in the destination file system with counterpart objects from the source file system stream, further comprising: the cloning manager determining whether objects corresponding to objects from the source file system stream exist in the destination file system; the cloning manager determining whether corresponding objects that exist in the destination file system are to be replaced with counterpart objects from the source file system stream responsive to a factor from a group of factors comprising: user input; a user provided list; a configuration file; a default setting; file system data; and external information; responsive to determining that a corresponding object exists in the destination file system, and that the corresponding object is to be replaced with a counterpart object from the source file system stream: the cloning manager marking the space occupied by the corresponding object in the destination file system as free space; the cloning manager determining a location on a physical medium associated with the destination file system, the location being able to hold the counterpart object without fragmenting the counterpart object; the cloning manager verifying the integrity of the location; and the cloning manager writing the counterpart object from the source file system stream to the location; and responsive to determining that a corresponding object exists in the destination file system, and that the corresponding object is not to be replaced with a counterpart object from the source file system stream, the cloning manager discarding the counterpart object from the source file system stream.