mkrecover Utility - Recover Corrupted MKEYED File Converted to Recoverable Format
Syntax
mkrecover [-l<log file>] [-e<crypt password>] [-p<password>] <corrupted_file1> { <corrupted_file2>... }
mkrecover [-L<log file>] [-e<crypt password>] [-p<password>] <corrupted_file1> { <corrupted_file2>... }
mkrecover [-l<log file>] [-h<header file>] [-o<output file>] [-e<crypt password>] [-p<password>] <corrupted_file>
mkrecover [-L<log file>] [-h<header file>] [-o<output file>] [-e<crypt password>] [-p<password>] <corrupted_file>
mkrecover -b:<password>
Description
The mkrecover utility is a stand-alone executable that recovers corrupted single-keyed or multikeyed MKEYED files converted to recoverable format with the mrebuild utility, or created with SETOPTS byte 7 bit $20$ set. The first and second mkrecover syntax makes a copy of the original file(s) with an .old extension. The third and fourth syntax puts the recovered records in the specified output file and leaves the original file intact.
To recover XKEYED or VKEYED files, refer to BBjFileSystem::recoverFile.
Parameter |
Description |
-l<log file> |
Puts records that contain valid signatures, but bad CRCs, in a log file. These are damaged records excluded from the recovered file but might contain salvageable data. |
-e<crypt password> |
Use the specified password as the decryption key for recovering encrypted files. This option is ignored when recovering files that are not encrypted. Attempting to recover an encrypted file without specifying this option causes mkrecover to prompt for the password. Using this command line option instead of having mkrecover prompt for the password can be a security risk on a multi-user system as other users could see the command line. |
-L<log file> |
Same as -l except the log file is left completely blank if no problems or bad records are encountered. |
-h<header file> |
Obtain the header from the specified file instead of from the corrupted file. This option is for recovering a file that has a damaged header. The specified header file must be either an old backup of the corrupted file or an MKEYED file created with the same record size and key definitions as the corrupted file. When recovering an encrypted file, this option only works when the header file is an old backup of the corrupted file. |
-o<output file> |
Puts the recovered records in the specified output file and leaves the original file intact. |
-p<password> |
Use the specified password for verifying and recovering protected records. When a password is specified, unprotected records and records protected with a different password will be logged as bad records and will not be recovered. When using an mkrecover that contains an embedded password (see the -b option), -p can be specified without a password to recover unprotected records instead of records protected with the embedded password. |
-b:<password> |
Provides a way for allowing another user to recover protected files (not encrypted files) without revealing the password. It creates a branded version of mkrecover called mkrecover2 (mkrecover2.exe on Windows systems) containing the specified password in an encoded state. When the branded mkrecover is used without the -p option, it uses its encoded password. |
corrupted_file |
An existing recoverable MKEYED file that becomes corrupted. After the recovery, this file is named corrupted_file.old unless the -o option was specified. |
Return Codes
When mkrecover is invoked from a script or with the SCALL() function, it uses the return codes listed below: |
|
0 |
No problems occurred. |
1 |
No longer used (used in older versions of mkrecover). |
2 |
Problems found, records may be lost. |
3 |
Can't read header or header file. |
4 |
Can't read the source file. |
5 |
Can't open the source file. |
6 |
Can't open the header file. |
7 |
Can't create/open the destination file. |
8 |
Can't write to the destination file. |
9 |
Can't rename the old file. |
10 |
Can't copy the old file. |
11 |
Can't create/open the log file. |
12 |
Command line syntax error. |
13 |
Can't initialize the PRO/5 file system. |
14 |
Insufficient memory (out of RAM). |
15 |
Can't brand mkrecover.exe (-b:<password> option failed). |
The possibility of recovering all records decreases each time a corrupted file is used. Therefore, mkrecover should be used as soon as the corrupted file is discovered. This utility has no effect on noncorrupted files.
Unless the -o option is specified, on UNIX systems with large files, the TEMP environment variable may need to be set to reference a filesystem with adequate space.
Note: Using the mkrecover utility on a file is equivalent to creating a new file and copying all records from the old file to the new file. Because of this, all the pointers get reset and all unused key and data blocks are removed.