【问题标题】:Clearcase - Find out when view was createdClearcase - 找出创建视图的时间
【发布时间】:2011-04-24 12:34:53
【问题描述】:

我们有很多旧的快照视图,我需要找出这些快照视图是什么时候创建的。

有一个转折——我们不再运行 ClearCase,并且我们用来运行它的硬件也不再存在。但是,我们仍然保留了 ClearCase 内部使用的所有文件,因此我可以转到目录 /usr7/viewstore/some_snapshot_sv 并四处寻找。
我在这些目录上有一个时间戳,但这不一定是创建视图的时间。
我想知道在这个目录结构的某个地方是否有某个文件可以在其中搜索创建日期。

我在 Unix/Linux 环境中。 ClearCase 确实在 IRIX 上运行。

谢谢。

【问题讨论】:

    标签: unix version-control clearcase


    【解决方案1】:

    与视图关联的任何元数据都在视图服务器端,视图存储在其中。

    可能距离创建日期最近的一个文件是视图存储中的 .hostname 文件。
    它仅在视图创建时创建和更新,除非视图未注册然后重新注册(非常罕见),否则永远不会更改。
    view.dat 也是一个不错的候选者(但也可以重新生成,仅用于快照视图)

    这个IBM article 列出了所有相关文件:

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

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

    有关重新生成 view.dat 文件的更多详细信息,请参阅 technote1204161。

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

    # 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>".
    
    • 第一行:视图存储目录的位置,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 文件具有相同的时间戳。所以我可以将该文件用于那些缺少快照视图的文件。再次感谢。
    【解决方案2】:

    如果你使用cleartool,我想你可以这样尝试:

    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)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多