Accidentally deleted a folder in ClearCase explorer, how to recover that? - clearcase

I Accidentally deleted a folder in ClearCase explorer, is there anyway to recover that?
(the view was snapshot)
I tried comparing versions and check the version tree but found nothing.

If you have deleted (rmname'd) the folder, then you can easily recover from that.
See "Undo remove file in ClearCase".
But if it was a new folder that you didn't yet add to source control, then ClearCase (in a snapshot view) isn't aware of it, and you need to restore it through other tools (like a Recuva File Recovery).
If it was deleted, but was already in source control, all you need to do (again in a snapshot view) is to use a cleartool update:
cleartool update /path/to/parent/folder
That will restore the content of the parent folder, including the folder you just erased.

Related

Provide version to independent files in clearcase

I recently started usage of clear case tools for maintenance of code in better way. But after some days my "Company" forgot to take licence from IBM as result I cannot CHECK-IN my code into clearcase. To continue my coding i created a separate folder in other drive and copied code solution in that folder. I and my colleague modified around "9865" files of solution within "45" working days. Now a "Company" borrowed a licence for me and I able to access code clear case tool successfully.
Problem is:
How to check in my "9865" files into clearcase in better way?
I tried:
Copied all solution into Snapshot view folder location. but, all
changed files are showing "hijack".
The best way is to use clearfsimport: that will automatically checkout, and import your 9865 in one command.
Make sure to update your snapshot view first, in order to restore its original content.
Then clearfsimport those files.
clearfsimport -preview -rec -nset /path/to/sourceDir\* </myview/VOB>
The clearfsimport command will detect the files added or modified, and do the checkouts for you.
If you are using an UCM view, set an activity first.
The source from where clearfsimport does that copy can be any regular folder.

How do I retrieve a file if I undid a folder checkout in ClearCase?

For reasons unknown, a folder was checked out to me in ClearCase. A coworker was working on a word document stored in that folder. I undid the checkout on the top level folder. Her document disappeared and she doesn't have a local copy. Have I totally screwed her over here? Is there any way we can get it back? Is it stored somewhere on the server and we just can't see it with the standard GUI interface? I was under the impression that you couldn't add to a folder if someone had it checked out.
If it is a dynamic view, the only place it can still be is in the view storage.
But, dynamic or snapshot, first check the \yourVob\lost+found folder: it is for any files:
added to source control
with no parent folder referencing it (which is exactly what you have done by undo-checkouting said parent folder of the work document).
See "About the lost+found directory" for more on that special folder.
If you find it there (with an "extended name"), then see "To move an element from the lost+found directory" in order to restore the file.

ClearCase Views From One Computer Copied to New Computer?

Yesterday I received a new computer at work. My old computer had several Clearcase views (snapshots) containing a number of files that were stilled checked out. The process for building my new machine copied the directory containing my Clearcase view to my new machine.
My new machine's ClearCase now has no idea that those directories are ClearCase views and therefore that they contain checked out files that I'd like to keep.
How can I associate those directories to ClearCase so I get back to the state that they were in on my old machine (i.e. the directories are controlled by ClearCase and checked out files are recognized as such)?
Thanks,
Todd
The easiest way is to:
unregister and rmtag your previous view,
(because registering the same view on a new computer doesn't work well)
See "How to delete clearcase views created by other users?"
mkview a new view on your new computer,
See "Proper 'cleartool mkview' for ClearCase Snapshot view creation"
and clearfsimport -rmname your current modifications in that new view on your new computer.
(as in "Rollback via label in clearcase")

How to find out where the loaded files of ClearCase views?

We use both ClearCase UCM and base. One of the open questions we have is, how to find out where the loaded files of snapshot views are reside, by a given path of view storage directory?
e.g. We have a view located in C:\views\myview.vws
Sometimes the equivalent loaded files are in C:\views\myview directory, but sometimes not. I'm looking for a way to find where it is.
I tried to find it out by cleartool lsview -l and cleartool desc - does not help.
The Windows registry does not provide this answer as either (AFAIK).
I confirm there is not information where a snapshot view (UCM or not) actually resides.
You need to realize that by simply copying the .view.dat (hidden) file that you can see at the root directory of any of your snapshot view, you will make the destination directory (in which you copy the .view.dat file) the root of your snapshot view.
Copy it to three different directories, and you have the same snapshot view replicated three times!
Copy it to C:\Windows\System32, and that directory becomes a snapshot view root directory!
You best bet is to search for those .view.dat (or view.dat on Windows): those files contains the uid (unique id) of the view, allowing you to reconcile that with what you see within the view storage.

How do I safely remove the .copyarea.db files?

I see .copyarea.db files popping up in my ClearCase snapshot directories. I understand that deleting the file may cause some problems. How can I get rid of these files safely?
All CCWeb views have a storage stored at the CCRC server (which in turn communicates with the VOB server).
That differs from classic ClearCase views, where the view storage is either on the user's computer, or in a close View Storage server.
Since the clients using CCRC cannot always directly access that view storage (on the CCRC server), it needs "local" view storage, which are defined within the CCWeb view, with the .copyarea.dat and a .copyarea.db directories.
Since you are not the first to getting rid of those directories (.db and .dat), CCRC 7.1 now allows for .dat directory to be restaured, allowing then ClearCase to reassess the status of each file, keeping relevant information in the .db storage directory.
The first google result about .copyarea.db suggests that deleting those files will confuse ClearCase, causing it to think that your files are hijacked.
The .copyarea.db is removed by ClearCase after I add all the View Private files in a snapshot directory to source control. It makes sense--ClearCase needs the .copyarea.db file to avoid interpreting the copied files as hijacked, but checking them in removes that ambiguity, so ClearCase no longer needs .copyarea.db and deletes it.

Resources