21.1 Moving a View

WARNING: When moving a VOB or view storage directory, make sure that the copy or backup software you use does not change file and directory ownership and access control information.

This section presents a procedure for moving a view to another location, either on the same host or on another host with the same architecture. For a snapshot view, you can move the entire view; if the view storage directory is outside the view directory tree, you can move either the view directory tree, the view storage directory, or both. (To move a view to a host of a different architecture, see Moving a View to a UNIX Host with a Different Architecture.) For clarity, this section uses an example:

Moving a View on UNIX

To move the view:

  1. Go to the view's host. Log on to the view host, earth, as the view's owner:

  2. rlogin earth -l sue

  3. Determine whether the view has a nonlocal private storage area.

  4. ls -ld /users/sue/viewstore/sue.vws/.s
    ... .s -> /public/view_aux/sue

    The symbolic link indicates that the private storage area is remote.

  5. Deactivate the view. Use cleartool endview -server to deactivate the view.

  6. (If necessary) Validate the private storage area's global pathname. This step is required only if the view's private storage area is remote, and you are moving the view to another host. You must verify that the view's new host can access the private storage area using the same global pathname as the view's current host.

  7. rlogin ccsvr04
    ls /public/view_aux/sue
    .
    . (this command should succeed)
    .
    exit

    If the intended destination host cannot access the view's private storage area in this way, select and validate another host.

  8. Back up the view storage directory. Use the procedure in Backing Up a View.

  9. Copy the view. First, make sure that the desired parent directory of the target location exists and is writable. Then, if you are moving a snapshot view directory tree, copy the entire directory tree to the new location. If you are moving a dynamic view, or if you are moving the view storage directory for a snapshot view and the view storage directory is outside the view directory tree, copy the entire view storage directory tree (but not a remote private storage area) to the new location.

  10. NOTE: The -B option to the tar command may not be supported on all architectures. Also, the rsh command may have a different name, such as remsh, on some platforms. Refer to the reference pages for your operating system.

    If you are moving both the view directory tree and the view storage directory for a snapshot view whose view storage directory is outside the view's directory tree, copy both the view directory tree and the view storage directory to the new locations.

    NOTE: If you are moving a snapshot view, it is important that the utility you use to copy the view maintain the original modification times and ownership of all files and directories in the view. Otherwise, loaded files become hijacked.

  11. Ensure that the old view cannot be reactivated. Remove it from the ClearCase storage registries.

  12. cleartool rmtag -view -all sue
    cleartool unregister -view /users/sue/viewstore/sue.vws

    This step is not necessary for a snapshot view if the view storage directory has not moved.

    This prevents reactivation by client hosts.

  13. Register the view at its new location (without starting the view_server).

  14. cleartool register -view /public/sue.vws
    cleartool mktag -nstart -view -tag sue /public/sue.vws

    This step is not necessary for a snapshot view if the view storage directory has not moved.

    If your network has several network regions, you need to make additional registry entries. This procedure is essentially similar to the one in Ensuring Global Access to the VOB-Special Cases for UNIX.

  15. Reactivate the view. For a dynamic view, start the view:

  16. cleartool startview sue

    For a snapshot view:

  17. Delete the old view storage directory. If you did not overwrite the existing view storage directory, delete the old one. Be sure to first verify that the view can be accessed at its new location.

  18. Moving a view does not modify the .view file in the view storage directory. The information in this file always describes the view's first incarnation.

Moving a View on Windows

To move the view:

  1. Go to the view's host. Log on to the view host, earth, as the view's owner.

  2. Back up the view storage directory. Use the procedure in Backing Up a View.

  3. Verify that the view server on the view's host is not running. If necessary, stop the view_server with cleartool endview -server view-tag.

  4. Copy the view. First, make sure that the desired parent directory of the target location exists and is writable. Then, if you are moving a snapshot view directory tree, copy the entire directory tree to the new location. If you are moving a dynamic view, or if you are moving the view storage directory for a snapshot view and the view storage directory is outside the view directory tree, copy the entire view storage directory tree to the new location.

  5. If you are moving both the view directory tree and the view storage directory for a snapshot view whose view storage directory is outside the view's directory tree, copy both the view directory tree and the view storage directory to the new locations.

    NOTE: If you are moving a snapshot view, it is important that the utility you use to copy the view maintain the original modification times and ownership of all files and directories in the view. Otherwise, loaded files become hijacked. We recommend that you use scopy (a Windows NT Resource Kit command) rather than ccopy to move a snapshot view.

  6. Ensure that the old view cannot be reactivated. Remove it from the ClearCase storage registries. In the ClearCase Administration Console, you can use the View Tags node for the tag's regions to remove view-tags, and you can use the View Objects subnode of the ClearCase Registry node to remove a view object entry. You can also use the following commands:

  7. cleartool rmtag -view -all sue
    cleartool unregister -view \\earth\users\sue\vwstore\sue.vws

    This step is not necessary for a snapshot view if the view storage directory has not moved.

  8. Register the view at its new location (without starting the view_server). In the ClearCase Administration Console, you can use the View Tags node for the tag's regions to create view-tags, and you can use the View Objects subnode of the ClearCase Registry node to create a view object entry. You can also use the following commands:

  9. cleartool register -view \\earth\public\sue.vws
    cleartool mktag -nstart -view -tag sue \\earth\public\sue.vws

    This step is not necessary for a snapshot view if the view storage directory has not moved.

    If your network has several network regions, you need to make additional registry entries. This procedure is essentially similar to the one in Ensuring Global Access to the VOB-Special Cases for UNIX.

  10. Reactivate the view. For a dynamic view, run the net use command or, in Windows Explorer, use Tools > Map Network Drive.

  11. For a snapshot view:

  12. Delete the old view storage directory. If you did not overwrite the existing view storage directory, delete the old one. Be sure to first verify that the view can be accessed at its new location.

  13. Moving a view does not modify the .view file in the view storage directory. The information in this file always describes the view's first incarnation.