Moving a view to a host with the same architecture or to a NAS device
About this task
To move a view to another partition on the same host, to another host with the same architecture, or to a NAS device, use the following procedure.
Procedure
- Log on to the view host.Log on as the view owner or privileged user.Note: If the view that is to be moved is shared among several users, log on with a privileged identity so that all users of the view can access it after it has been moved.
- Deactivate the view.To keep the view inactive while it is being moved, use the cleartool chview view_tag command with the –readonly option to prevent users from updating the view database.
cleartool chview –readonly r5_integration
Properties: readonly - Stop the view's server process.Use the cleartool endview view_tag command with the –server option:
cleartool endview –server r5_integration
- Ensure that the view cannot be reactivated.Remove its tag and then unregister it. Use the HCL VersionVault Administration Console or the following commands:
cleartool rmtag –view –all v5_integration
cleartool unregister –view /net/mars/viewstg/v5_integration.vwsNote: This step is not necessary for a snapshot view whose view storage directory is not moved. - Copy the view.If you are moving a dynamic view, copy the entire view storage directory (but not any symbolically linked private storage) to the new location. For dynamic views, the procedures are similar on all supported operating systems:
- On Linux or the UNIX system, you can use a utility such as tar to copy a
view storage directory. The following example copies the view storage directory
v5_integration.vws to a host named venus:
cd /viewstg ; tar –cf – v5_integration.vws | rsh venus 'cd /viewstg ; tar –xBpf –'
Note: If you are not logged on as root, the –p option to the tar command, which preserves file and directory protections critical to the view, can be ignored. The –B option may not be needed on some platforms. For more information, see the reference pages for your operating system. - On Windows®, you must use a copy utility that preserves file and directory ownership and access
control information (see Preserving NTFS ACLs when copying a VOB or view storage directory) and
you must run the copy utility on the host to which the view is being moved. The following example
uses the HCL
VersionVault
ccopy utility to copy the view storage directory v5_bugfix.vws
from a host named mars:
C:\VersionVaultStorage\views> net use E: \\mars\vws
C:\VersionVaultStorage\views> ccopy E:\v5_bugfix.vws v5_bugfix.vws - If you are moving a snapshot view on Linux or the UNIX system you can move the snapshot view directory, the view storage directory, or both. If you are moving a snapshot view on Windows, see Special procedures for moving snapshot views on Windows.
- If you are moving the storage location of a Web view to another location on the same Web
server or from one Web server to another, modify the -viewroot parameter in the
current user's session.dat file to reference the new location of the view root.
On Linux or the UNIX system, the file session.dat is located in
/var/adm/hcl/ccweb/username
. On Windows, this file is located at versionvault-home-dir\var\ccweb\username. So for example, if your view is being moved to the new location E:\views\HOST1\user1\ccweb_view, the -viewroot parameter in your session.dat file should be this:viewroot "E:\views\HOST1\user1\ccweb_view"
- On Linux or the UNIX system, you can use a utility such as tar to copy a
view storage directory. The following example copies the view storage directory
v5_integration.vws to a host named venus:
- Register the view at its new location and create a new
view tag.Use the HCL VersionVault Administration Console or the following commands:
cleartool register –view /net/venus/viewstg/v5_integration.vws
cleartool mktag –view –tag v5_integration /net/venus/viewstg/v5_integration.vwsNote: If you are moving the view to a NAS device, you must use the –host, –hpath, and –gpath options to the cleartool register and mktag commands. This example, assumes a NAS device mounted at /net/nasdev on HCL VersionVault host venus:cleartool register –view –host venus –hpath \
/net/nasdev/viewstg/v5_integration.vws \
–gpath /net/nasdev/viewstg/v5_integration.vws \
/net/nasdev/viewstg/v5_integration.vws
cleartool mktag –view –tag v5_integration –host ccviewsvr1 \
–hpath /net/nasdev/viewstg/v5_integration –gpath \
/net/nasdev/viewstg/v5_integration /net/nasdev/viewstg/v5_integration - Change the view's access permissions back to read/write.
cleartool chview -readwrite v5_integration
- Reactivate and test the view.While you are still logged on as the view owner, access the view and verify the following:
- You can check out versions and, in a dynamic view, create view-private files.
- All view-private objects were moved.
- No files are displayed as hijacked (snapshot views only).
- Update VOB references to this view.The view's old location is still recorded by all VOBs that the view has accessed. To update this information, go to the view check out any element from each VOB that holds such a reference. (You can cancel the checkout immediately if you want).
- Delete the old view storage directory.After you verify that the moved view is accessible and working correctly, delete the old view storage directory by using any operating system utility.
- Create additional tags as needed.If the view has tags in other network regions, replace them with tags that reference the new location.