Clearcase - 查找视图创建时间

3
我们有许多旧的快照视图,我需要找出这些快照视图创建的时间。 但是有一个问题 - 我们不再运行ClearCase,用于运行它的硬件也不存在了。但是,我们仍然拥有ClearCase内部使用的所有文件,所以我可以进入目录/usr7/viewstore/some_snapshot_sv并查看。我在这些目录上有一个时间戳,但这不一定是视图创建的时间。我想知道是否在此目录结构中有某个文件,可以搜索创建日期。我在Unix/Linux环境中,ClearCase在IRIX上运行。谢谢。
2个回答

2

与视图相关的任何元数据都在视图服务器端,即视图存储所在的地方。

与创建日期最接近的一个文件可能是视图存储中的.hostname文件。
它仅在创建视图时创建和更新,并且除非取消注册并重新注册视图(非常罕见),否则永远不会更改。
view.dat 也是一个很好的选择(但也可以重新生成,并且仅适用于快照视图)

这篇IBM文章列出了所有相关的文件:

当视图重启时会自动重新生成的文件:

# .access_info
# .pid

可以通过ClearCase命令重新生成的文件:

# .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

请参考技术说明书1204161,以获取有关重新生成view.dat文件的更多详细信息。

可以通过在相同计算机上作为相同用户创建新视图,并将受影响的文件复制到视图存储来手动替换的文件:

# 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>".
  • 第1行:视图存储目录的位置,格式为hostname:pathname
  • 第2行:视图的UUID(唯一标识符),不能更改
  • 第3行:第1行中指定的hostname

无法替换的文件:

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

谢谢。我找不到.hostname文件,但view.dat文件已经足够接近了。我记得有一种情况可以重新生成view.dat文件,但我相信只有我做过,并且我还记得在哪里。一些快照视图中的用户实际上已经不存在了,所以我无法使用那些视图的view.dat文件。然而,我注意到对于那些存在的快照视图,view.dat文件与其相应的视图存储目录中的.view文件具有相同的时间戳。因此,我可以为那些缺少快照视图的情况使用该文件。再次感谢。 - Chance

2
如果您使用cleartool,我认为您可以尝试以下方式:


    cleartool lsview -properties [视图名称]
    * [视图名称]           /net/...[路径]
    创建时间 2014-01-07T18:05:15+02:00 by ...
    上次修改时间 2014-01-07T21:13:07+02:00 by .....
    上次访问时间 2014-01-07T21:13:07+02:00 by .....
    拥有者:[拥有者名称] : rwx (所有人)
    组:[组名称]  : r-x (只读)
    其他人:              : r-x (只读)



注意,这段文字涉及IT技术。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接