recoverview
Recovers a dynamic view database
Applicability
Product
|
Command
type
|
ClearCase®
|
cleartool
subcommand
|
Platform
|
UNIX®
|
| Linux® |
Windows®
|
Synopsis
- Recover files associated with deleted
VOB or deleted directory:
- recoverview [ –f/orce ] { –vob vob-identifier | –dir dir-identifier }
- { –tag view-tag | view-storage-dir-pname }
- Synchronize a view with one or more
VOBs, moving stranded objects to a known location:
- recoverview –syn/chronize [ –vob pname-in-vob ]
- { –tag view-tag | view-storage-dir-pname }
Description
The recoverview command
repairs a view database and the associated private storage area of a dynamic
view. (A snapshot view has no private storage in the same sense as a dynamic
view has.) Typically, you use this command after a system crash or similar
mishap. You may also want to use this command to regain access to stranded
view-private and checked-out files. (See Recovering view-private and checked-out files: View lost+found directory.)
Automatic recovery
When necessary, recoverview is
invoked by a dynamic view's associated view_server process. Enter this
command yourself if messages in the view log (view_log) suggest view
database corruption (for example, INTERNAL VIEW DB ERROR).
Possible data loss
recoverview uses reformatview;
that is, recovery involves a dump/load of the view database. recoverview deletes
the old, invalid view database, which reformatview has
renamed to db.dumped.
Depending on the state of the view database,
this process may cause certain information to be lost. After a view is recovered,
consult the view log to investigate possible data loss.
Note to UNIX users: The
setuid bit is always lost on files that the view owner does not own.
For more information, see the reformatview reference
page.
Recovering view-private and checked-out files: View lost+found directory
A file in view-private storage (including
the view-private contents of a checked-out version) is normally accessed through
a VOB pathname. That is, the file appears to be located in the VOB, but is
actually stored in the view. But this view-VOB correspondence can be disrupted:
- A VOB can become temporarily unavailable,
for example, by being unmounted.
- A VOB can become permanently unavailable,
by being deleted.
- A particular VOB directory can become
unavailable permanently, by being deleted with an rmelem command.
In all these cases, view-private files
that are accessed through the unavailable VOB structure become stranded; the
files cannot be used for normal ClearCase operations, because there
are no VOB pathnames through which they can be accessed. You can resynchronize
your view with the available VOBs with the –vob and –dir options.
This recovers stranded files by moving them into the view's lost+found directory.
Recovered files remain inaccessible to normal ClearCase operations; you can access
them through the view storage directory, using standard operating system utilities
and commands.
Options and arguments
Synchronizing a view with one or more vobs
The following option synchronizes the dynamic
view with one or more VOBs. With this option, recoverview moves
all stranded files to the lost+found subdirectory. A
typical time to synchronize is after performing a relocate operation.
- –syn/chronize [ –vob pname-in-vob ]
- Synchronizes the view with all VOBs in which the view has created view-private
files. With –vob, synchronizes the view only with the VOB
specified by pname-in-vob.
Forcing recovery
- Default
- recoverview displays a Recovery not needed warning
message and exits immediately if the view database does not need to be recovered.
- –f/orce
- Performs a view database recovery, whether or not it is necessary. Suppresses
the warning message in the situation described above.
Specifying the view
- Default
- None.
- –tag view-tag
- The view tag of any registered dynamic view.
- view-storage-dir-pname
- The pathname of a dynamic view storage directory. Use the lsview command
to list a view's storage directory.
Important: Make sure that the current working directory is not the same
as, or anywhere below
view-storage-dir-pname.
Recovering view-private storage
The following options take internal ClearCase identifiers
for a VOB or a VOB directory (vob-identifier and dir-identifier)
as arguments. The lsprivate command uses these identifiers
when listing an inaccessible VOB or VOB directory.
- –vob vob-identifier
- Moves all view-private files that correspond to the specified VOB to the lost+found directory.
- –dir dir-identifier
- Moves all view-private files that correspond to the specified directory
element to the lost+found directory.
Important: If the VOB or
directory is still accessible, using these options is probably incorrect;
it will unsynchronize the view and VOB, not synchronize them.
Examples
The UNIX system and Linux examples in this
section are written for use in csh. If you use another
shell, you may need to use different quoting and escaping conventions.
The
Windows examples that include wildcards or quoting are written for use in cleartool interactive
mode. If you use cleartool single-command mode, you may
need to change the wildcards and quoting to make your command interpreter
process the command appropriately.
In cleartool single-command
mode, cmd-context represents the UNIX system and Linux
shells or Windows command interpreter prompt, followed by the cleartool command.
In cleartool interactive mode, cmd-context represents
the interactive cleartool prompt.
Note: recoverview writes
status messages to the
view_log file; it does not print
status messages on the standard output device.
- Synchronize the dynamic view jackson_fix with
all VOBs in which it has created view-private files.
cmd-context recoverview –synchronize –tag jackson_fix
- On a UNIX or Linux system, synchronize a dynamic view
whose storage directory is /usr/home/jackson/ccviews/std.vws with
the /vobs/dvt VOB.
cmd-context recoverview –synchronize –vob /vobs/dvt \
/usr/home/jackson/ccviews/std.vws
- For dynamic view cp_bugfix,
recover view-private files from a deleted VOB.
cmd-context lsprivate –tag cp_bugfix...
cleartool: Warning: VOB is unavailable -- using name:
"<Unavailable-VOB-1>".
If it has been deleted use 'recoverview -vob <uuid>'
VOB UUID is 1127d379.428211cd.b3fa.08:00:69:06:af:65
...
cmd-context recoverview –vob 1127d379.428211cd.b3fa.08:00:69:06:af:65 \
–tag cp_bugfix