PreviousNext

Appending CDS Directories

The following procedure appends the source directory /.:/eng to the /.:/rnd directory (that is, copies the /.:/eng directory into the empty target directory /eng under the /.:/rnd directory):

1. Run the directory create command to create a new empty directory named /.:/rnd/eng into which the contents of the source directory /.:/eng can be placed:

dcecp> directory create /.:/rnd/eng
dcecp>

By default, the directory create command creates new directories in the same clearinghouse as the parent directory. If you wish to create a directory in an another clearinghouse, you must use the -clearinghouse option of the command to specify the other clearinghouse.

2. Perform a skulk on the /.:/eng directory before appending it to the /.:/rnd directory. This synchronization of the source directory's replicas can prevent errors that cause the append operation to fail:

dcecp> directory synchronize /.:/eng
dcecp>

3. Run the directory merge command to append the source directory /.:/eng to the /.:/rnd directory (or merge it into the new /.:/rnd/eng directory):

dcecp> directory merge /.:/eng -into /.:/rnd/eng
dcecp>

If the source directory contains any child directories whose contents you want to copy over, you must specify the -tree option in the directory merge command line. Additionally, you need to specify the -clearinghouse option if you wish to place the child directory and its contents in a different clearinghouse from the /.:/rnd/eng directory.

If the merge operation is not successful, you can delete any partially merged information at the target location and run the command again. Be sure, though, to delete any duplicate names and to make certain that connectivity to the affected clearinghouses can be maintained.

Note: The CDS objects created by the directory merge command retain all of the writeable attribute values and some of the read-only attribute values of the source objects. However, these objects do not inherit the ACLs of the source objects. The ACLs on the target objects are either those that are inherited from the initial container (the parent directory into which the objects are merged) or the initial object.

4. After the append operation, the /.:/eng directory (and its contents) still exists at the source location. You need to delete the /.:/eng directory from its original location and create a soft link named /.:/eng in place of the deleted directory. The soft link will redirect lookups of the obj1 and link1 object entries to their new locations in the /.:/rnd/eng directory.

It is recommended that you perform a skulk on a source directory before deleting it. This synchronization of the directory's replicas can prevent errors that cause the delete operation to fail.

The sequence of dcecp program commands for removing the /.:/eng directory from the source location is the following:

dcecp> directory synchronize /.:/eng
dcecp> directory delete /.:/eng
dcecp> link create /.:/eng -to /.:/rnd/eng
dcecp>

The following figure shows the structure of our example namespace before and after the append operation.


Example Namespace Before and After the Append Operation