Use the following procedure to restore a backup view storage directory. The view is the same one discussed in Backing Up a View.
If you are restoring a snapshot view, you must restore both the view directory tree and the view storage directory. If the view storage directory is located outside the view's directory tree, you must be sure to restore both.
NOTE: You can restore a view to a new location, on the same host or on another host. If you are restoring the view storage directory to a new location, you must re-register the view at its new location (Step #7). If you are restoring a snapshot view's directory tree to a new location, but the location of the view storage directory (outside the view directory tree) does not change you do not need to re-register the view.
Log on to the view host. Log on to the host where the view storage directory (or, for a snapshot view, the directory tree) resides.
Check disk space availability. Make sure that there is enough free space in the view's disk partition to load the backup copy. If necessary, delete the view storage directory (or, for a snapshot view, the directory tree), or use other means to make enough space available.
Stop the view server. Use endview -server to stop the view_server process:
cleartool endview -server akp_vu
Move the original view aside. For a snapshot view, rename or delete the view directory tree. For a dynamic view or for a snapshot view whose view storage directory is outside the view's directory tree, rename or delete the view storage directory:
If you are restoring a snapshot view and its view storage directory is outside the view's directory tree, rename or delete both the view directory tree and the view storage directory.
Make sure that the restored view will have the correct ownership. Depending on your platform and your backup tool, you may have to observe one or more precautions now to ensure that the view is restored with the correct owner and group identities.
On UNIX platforms, each view storage area includes a directory named .identity, which stores files with special permissions: the setuid bit is set on file uid; the setgid bit is set on file gid. You must preserve these special permissions when you restore a view backup:
If you used tar to back up the view, use the -p option when restoring the view. In addition, make sure to enter the tar command as the root user. If you do not, the -p flag is ignored.
If you used cpio to back up the view, no special options are required in the cpio command that restores the backup data.
On Windows, if your backup tool does not maintain ACLs correctly, you may need to fix them after the restore with fix_prot. See Chapter 35, Repairing VOB and View Storage Directory ACLs on Windows, for details.
Restore the backup. For a snapshot view, restore the view directory tree from the backup medium. For a dynamic view or for a snapshot view whose view storage directory is outside the view's directory tree, restore the view storage directory from the backup medium.
If you are restoring a snapshot view and its view storage directory is outside the view's directory tree, be sure to restore the backups of both the view directory tree and the view storage directory.
NOTE: When you restore a snapshot view, the utility you use to restore the backup must maintain the original modification times and ownership of all files and directories in the view. If it does not, loaded files become hijacked.
Re-register the view. This is necessary only if you restored the view storage directory to a new location. In the ClearCase Administration Console, you can use the View Tags node for the tag's regions to change the properties of view-tags, and you can use the View Objects subnode of the ClearCase Registry node to change the properties of a view object entry. You can also use cleartool commands. For example, if you restored the view storage directory to new location /usr2/akp.vws:
cleartool unregister -view /usr2/akp.vws
cleartool register -view /usr2/akp.vws
cleartool mktag -view -replace -tag akp_vu /usr2/akp.vws
Run cleartool recoverview. Use the following command to update the view database:
cleartool recoverview -tag akp_vu
The view is now ready for use.
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |