Restoring an individual element from backup
If you mistakenly delete an element with the rmelem command, you can restore it from a VOB backup. This procedure cannot be used to restore an element to a UCM component.
About this task
Removing a directory element does not remove the file elements cataloged within it; file elements exist independently of directory elements. In many cases, removing a directory element moves the files it contains to the VOB's lost+found directory. Look there first if you have accidentally removed a directory element.
Procedure
- Deactivate the VOB from which the element was deleted.
Unmount it if it is mounted, and then remove its tag and unregister it. This step is critical. In Step 2, you restore a temporary copy of this VOB from backup. The temporary copy and the original cannot both be registered in the same registry.
- Temporarily restore the most recent
backup of the VOB.Use the procedure in Restoring a VOB from backup with vob_restore or Restoring a VOB from backup without vob_restore. Do not restore the backup to the storage directory used by the original VOB. The restored VOB is used only long enough to retrieve the deleted element, so you can restored it to any convenient temporary location on a VOB server host.
- Register and create a tag for the restored VOB if you did not use vob_restore in Step 2.
- Create a new temporary VOB to hold the element you need
to restore.Because the original VOB and the restored backup cannot be active at the same time, this temporary VOB serves as a staging area to which the element you recover can be copied.
- Retrieve the deleted element from the
restored VOB.Use cleartool relocate to relocate the element from the backup VOB to the temporary VOB. For more information, see the relocate reference page and Relocating elements to another VOB.
- After you verify that the element you need has been relocated
to the temporary VOB, unregister the restored VOB and then remove
its tag and delete its storage.Do not use rmvob or the HCL VersionVault Administration Console to remove the VOB. If you do, any hyperlinks that point to it are removed from the VOBs in which they reside.
- Re-register and re-create the tag for the original VOB.
- If you are using a dynamic view, mount the VOB.
- Relocate the element from the temporary VOB to the original
VOB.Use cleartool relocate.
- Verify that the element is accessible in the original VOB.
- Remove the temporary VOB.Use rmvob or the HCL VersionVault Administration Console.
Results
Note: This procedure restores the element to the version of
its directory that is selected by the view in which Step 5 takes place. It does
not restore the element to earlier versions of the directory.