Chance
Chance

Reputation: 2700

Clearcase - Find out when view was created

We have many old snapshot views lying around and I need to find out when these snapshot views were created.

There is a twist - we are no longer running ClearCase and the hardware we used to run it is no longer around. However, we still have all the files used internally by ClearCase still lying around, so I can go to a directory /usr7/viewstore/some_snapshot_sv and poke around.
I've got a timestamp on these directories, but this is not necessarily when the view was created.
I was wondering if somewhere in this directory structure there was a certain file in which I can search for a creation date.

I'm in a Unix/Linux environment. ClearCase did run on IRIX.

Thanks.

Upvotes: 3

Views: 2517

Answers (2)

user157375
user157375

Reputation: 21

If you use cleartool, I think you may try it this way:



    cleartool lsview -properties [view-name]
    * [view-name]           /net/...[path]
    Created 2014-01-07T18:05:15+02:00 by ...
    Last modified 2014-01-07T21:13:07+02:00 by .....
    Last accessed 2014-01-07T21:13:07+02:00 by .....
    Owner: [owner-name] : rwx (all)
    Group: [group-name]  : r-x (read)
    Other:                  : r-x (read)


Upvotes: 2

VonC
VonC

Reputation: 1324417

Any metadata associated with the view is on the view server side, where the view storage are kept.

The one file which could be the closest from the creation date would be the .hostname file within a view storage.
It is only created and updated on the view creation, and never change unless the view is unregistered, and then re-registered (very rare).
view.dat is also a good candidate (but can also be regenerated, and is for snapshot view only)

This IBM article lists all relevant files:

Files that are regenerated automatically when the view is restarted:

# .access_info
# .pid

Files that can be regenerated with ClearCase commands:

# .compiled_spec -- regenerate by running cleartool setcs -current
# .hostname -- regenerate by unregistering and re-registering the view
# view.dat -- Snapshot views only:  
  can be regenerated by running the "regen_view_dot_dat.pl" script 
  found in <cc-home-dir>\etc\utils

See technote1204161 for more details on the regenerating the view.dat file.

Files that can be manually replaced by making a new view on the same machine as the same user, and copying the affected file(s) to the view storage:

# config_spec
# groups.sd
# identity.sd
# view_db.state (as long as the view is not in the process 
  of being reformatted); see technote 1134858 for more information
# db/view_db.dbd (for schema 9 views only; 2002.05.00 and earlier)
# db/view_db_schema_version
# .view - The copy obtained from the new view must be edited to contain the correct information for the old view as described below. The correct information can be obtained from the output of "cleartool lsview -long <old_viewtag>".
  • Line 1: the location of the view storage directory, in hostname:pathname format
  • Line 2: the view's UUID (unique identifier), which must not be changed
  • Line 3: the hostname specified in line 1

Files that cannot be replaced:

# All other files in the db directory except the ones mentioned above 
  ( view_db_schema_version and view_db.dbd)

Upvotes: 2

Related Questions