msrecover — Recover MSS files.
msrecover [-project proj] [-Rf] path...
msmv [-project proj] [-Rf] trash_path recovered_path
When an MSS file with a class of service of usage=normal
is removed (with msrm(1NCAR)) or purged, the MSS file is hidden by moving it into
the trash.
For example, an MSS file with the name /USER/dir/file
will be hidden by renaming it to /trash/USER/dir/file.
The entire contents of a directory can be removed with
msrm -R.
It is possible, for a period of time (approximately 30 days for removes and 29 days for purges), to recover the MSS file (or directory). This can be done with msrecover if the MSS file (or directory) is to be restored to the original name, or msmv if the restored MSS file (or directory) must be renamed.
All recoveries behave as if the trash MSS file has been restored from the trash, the original retention period has been restored, and the MSS file has been touched (as with mstouch(1NCAR)) to update the reference time.
The msrecover command allows either the original MSS file (or directory) pathname or the trash pathname to be specified. The msrecover command attempts to restore the MSS file to its original name. If a production MSS file or directory exists with the same name, the msrecover command will fail.
The msmv(1NCAR) command will recover an MSS file or directory if
trash_path is below /trash.
Note that it is not possible to move an MSS file or directory into
the trash, you must use msrm instead. All recoveries performed with
the msmv command conform to move semantics.
If an MSS file is recovered by a user other than the owner, e-mail will be sent to the MSS file owner notifying which MSS files were recovered and their (possibly new) names.
proj
Supply proj as the project number for
charging. Currently, no charging is done for metadata operations, so
this option is a placeholder for when charging might be imposed.
Recursively recover files (and directories). For each operand that names a directory, msrecover will recover all files in the directory tree.
Ignored. Accepted without error so that a quick substitution of msrecover for msrm on the command line can be made.
pathA pathname of an MSS file or directory to be recovered.
recovered_pathA pathname of an MSS file or directory that is not in the trash.
trash_path
A pathname of an MSS file or directory that is in the trash
(i.e. starts with /trash/).
Each MSS file recovered will send a message to standard out that states the name of the trash MSS file and the name to which the MSS file was recovered. For example, the command:
msrecover /USER/file
would generate the following message:
/trash/USER/file recovered to /USER/file
The command:
msmv /trash/USER/dir/file /USER/file2
would generate the following message:
/trash/USER/dir/file recovered to /USER/file2
If there exists both a trash directory and a trash MSS file, the following command would be ambiguous:
msrecover /USER/file
It would generate the following message:
/trash/USER/file is ambiguous; qualify with #f or /
so you would need to append #f to the name
to recover the MSS file:
msrecover /USER/file#f
or, append / to the name to recover the directory:
msrecover /USER/file/
If an MSS file exists with a name of a trash MSS file you are trying to recover and you issued this command:
msrecover /USER/file
it would generate the following message:
/trash/USER/file recovery failed because /USER/file exists.
Example 36. Recovering a trash file when a non-trash file of the same name exists.
When recovering an MSS file that was removed (or purged) and a non-trash MSS file with the same name is present, you must be careful to do operations in the proper order. For example, if the following events have taken place:
msrcp file_version_1 mss:/USER/foo msrm /USER/foo msrcp file_version_2 mss:/USER/foo
And you decide you would rather keep file_version_1,
then you should do either:
msmv /trash/USER/foo /USER/foo.recovered msrm /USER/foo msmv /USER/foo.recovered /USER/foo
or:
msmv /USER/foo /USER/bar msrm /USER/bar msrecover /USER/foo
See Environment Variables section of the Command Behavior and Envrionment chapter for details.
See Exit Status Codes section of the Command Behavior and Environment chapter for details.