We need to follow below steps for different view in Clear Case:
For DYNAMIC VIEW:
Note: The view storage directory (*.vws) needs to be backed up for dynamic views as this is where the file(s) will be recovered from.
To recover a view private file for a dynamic view, use the
mvfsstorage command to find the path of the view private file (as it is not intuitive to locate) and replace the file with the back up copy:
Review the ClearCase Command Reference Guide on the topic of mvfsstorage (cleartool man mvfsstorage) for more information.
- Open a command prompt, set into the view and cd into the VOB where the view private file resides.
- Run mvfsstorage
test_project@@\main\1 Rule: \main\LATEST
Note: The mvfsstorage command resides in the /etc directory on UNIX and Linux and must be run from that path,
- Navigate to the location of the file within the view storage directory of the backup and copy the file with the same name.
- Navigate to the location of the file within the view storage directory of the active dynamic view and delete the corrupted file(s).
- Replace the new file from the backup into that directory with the same name from the mvfsstorage output.
For SNAPSHOT VIEW:
1. Note: The view root (location where the files are loaded) needs to be backed up for snapshot views as this is where the file(s) will be recovered from.
2. To recover a view private file for a snapshot view, find the copy of the view private file in the backup archive and replace the file in the active view with the copy (just like any normal operating system file restore.