This section documents the procedure for moving a view between UNIX hosts with different binary formats for the files that implement the view database. For the procedure to move a view on the same host or between hosts with the same format for view database files, see Moving a View.
WARNING: When moving a VOB or view storage directory, make sure your copy/backup software preserves ownership and access control information unchanged. For example, the cp command does not preserve file attributes (permissions, modify times).
Moving a view to a UNIX host with a different architecture includes converting the binary-format files that implement the view database. For clarity, we use 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 on host ccsvr04, whose architecture differs from earth's.
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 a remote storage pool.
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.
Dump the view's database to ASCII dump files.
cleartool reformatview -dump /users/sue/viewstore/sue.vws
This command creates files view_db.dump_file and view_db.state in the view storage directory. It also renames the view database subdirectory to db.dumped.
Copy the view storage directory. 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.
<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. Check the tar reference pages for your operating system.
If you are moving both the view directory tree and the view storage directory for a snapshot view, and if the 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 maintains the original modification times of all files and directories in the view. If it does not, 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
Removal prevents reactivation by ClearCase client hosts.
Register the view at its new location.
cleartool register -view /public/sue.vws
cleartool mktag -view -nstart -tag sue /public/sue.vws
If your network has several network regions, you need to make additional view-tag entries. This procedure is essentially similar to the one in Ensuring Global Access to the VOB-Special Cases for UNIX.
NOTE: The mktag command fails if you omit the -nstart option.
Re-create the view database from the dump files.
cleartool reformatview -load -tag sue
Reactivate the view.
cleartool startview sue
On the new view host, delete the backup view database. This backup, named db.dumped, was created on ccsvr04 by reformatview -load in Step #6.
rm -fr /public/sue.vws/db.dumped
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.
NOTE: 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. |