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:
The current location of the view storage directory to be moved is /users/sue/viewstore/sue.vws, on a host named earth.
The new location for the view storage directory is /public/sue.vws. We consider these cases:
The new location is also on earth.
The new location is on another host, named ccsvr04.
Go to the view's host. Log on to the view host, earth, as the view's owner:
rlogin earth -l sue
Determine whether the view has a nonlocal private storage area.
ls -ld /users/sue/viewstore/sue.vws/.s
... .s -> /public/view_aux/sue
The symbolic link indicates that the private storage area is remote.
Deactivate the view. Use cleartool endview -server to deactivate the view.
(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.
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.
Back up the view storage directory. Use the procedure in Backing Up a View.
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.
To the same host (dynamic view or snapshot view storage directory outside the view's directory tree):
<verify that /public already exists>
cd /users/sue/viewstore
tar -cf - sue.vws | ( cd /public ; tar -xBpf - )
To a different host (dynamic view or snapshot view storage directory outside the view's directory tree):
<verify that `/public' already exists on remote host `ccsvr04'>
cd /users/sue/viewstore |
tar -cf - sue.vws | rsh ccsvr04 'cd /public; tar -xBpf -' |
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.
Ensure that the old view cannot be reactivated. Remove it from the ClearCase storage registries.
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.
Register the view at its new location (without starting the view_server).
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.
Reactivate the view. For a dynamic view, start the view:
cleartool startview sue
If the new snapshot view directory is on a local drive, access any file in the view.
If the new snapshot view directory is on another computer, right-click the root directory of the view in Windows Explorer.
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.
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.
Go to the view's host. Log on to the view host, earth, as the view's owner.
Back up the view storage directory. Use the procedure in Backing Up a View.
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.
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.
To the same host (dynamic view or snapshot view storage directory outside the view's directory tree):
<verify that `c:\public' already exists>
c:\> cd \users\sue\vwstore |
c:\users\sue\vwstore> ccase-home-dir\etc\utils\ccopy sue.vws \public\sue.vws |
To a different host (dynamic view or snapshot view storage directory outside the view's directory tree):
<verify that `c:\public' already exists on remote host `ccsvr04'; for simplicity, you might share that directory and, on earth, assign a drive (here, w:) to it>
c:\> cd \users\sue\vwstore |
c:\users\sue\vwstore> net use w: \\earth\public |
c:\users\sue\vwstore> ccase-home-dir\etc\utils\ccopy sue.vws w:\sue.vws |
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.
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:
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.
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:
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.
Reactivate the view. For a dynamic view, run the net use command or, in Windows Explorer, use Tools > Map Network Drive.
If the new snapshot view directory is on a local drive, access any file in the view.
If the new snapshot view directory is on another computer, right-click the root directory of the view in Windows Explorer.
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.
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.
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |