locate view private files in the storage directory

how to locate and recover view private files from an IBM® Rational® ClearCase® dynamic view storage directory, which can be useful when a view is damaged (and or unusable) or the view has been restored from backup.

On Microsoft Windows

1. Open Windows Explorer, go into the view storage directory; view_name.vws

2. Go into the .s sub-directory

3. Located under this directory are many numbered directories. Browse through the numbered directories, searching for the view-private file. All the files that are listed in these directories are view-private files. The file names of the files will be preceded by an ID number.

· Example:

The view private file, help.txt, in the directory under .s, is named, 241ae3df.000c.help.txt

If manual searching is cumbersome, then use the search functionality from Windows Explorer > Tools -> Find -> Files or Folders... > and specify *filename* for the search string.

Copy the file out to a non-ClearCase directory. When all of the view-private files have been copied out, remove the damaged (or restored) view storage. As it should not be registered or tagged in Rational ClearCase, you can use the operating system's Delete command.

To copy the file back into Rational ClearCase, you will need to:

· Rename the file from the .s directory back to its original name; 241ae3df.000c.help.txt to help.txt

· Checkout the element in a new view

· Copy the restored file from the local file system directory into the view

· Checkin the element version

On UNIX or Linux

Use these directions to recover view-private changes from a corrupt or restored view:

1. Save the old views .s directory in a temporary location

2. Create a new view with same config spec

3. Set the view and change directory (cd) into the VOB

Example:

The goal is to recover the view-private changes made to the file, foo.c, in the VOB directory, /vobs/myvob/src.

1. Using a UNIX find, look for foo.c in the old .s:

% cd ../safeplace/.s
% find . -name '*foo.c'

2. From within the new view

cd /vobs/myvob/src

3. Use the cp command to copy foo.c to the current directory

cp ../safeplace/.s/0001/00cd0ef2.foo.c foo.c

Now the view private file is back in synch where it belongs.

The same procedure can be done for copies of checked out files the become corrupt or deleted.

1. Cancel the checkout

cleartool unco foo.c

2. In the new view, execute a checkout of the file

cleartool co foo.c

3. Use the procedure outlined above to find the view-private copy that was stored in the old .s directory.

Note: There is no procedure to recover Non-Shared derived objects.

No comments:

Post a Comment