UNDELETE U. S. Geological Survey National Strong Motion Data Center Office of Earthquake Studies Menlo Park, CA 94025 22-JAN-80 1.0 Operating Procedure UNDELETE attempts to resurrect disk files that have been accidently deleted. Files to be recovered are specified using a search pattern similar to the SRD Select Entry option: 1. A question mark or asterisk will match any single character; 2. Stem searches are performed for the file name and type fields; and 3. Any unspecified fields default to a wild card search. The special version numbers, 0 and -1, are not supported. Whenever a matched file header is found, its file I.D. is printed, along with a PIP-like listing of the file owner, file specification, size and creation date. This information will be helpful in returning the file to the proper directory (usually the owner's UFD). The procedure to follow is: 1. Log on to a privileged account, if necessary, preferably on a hardcopy terminal. 2. Immediately halt all activity on the disk and DMOunt it. 3. ALLocate the disk to yourself and MOUnt it with the index file unlocked (/UNL). 4. Run UNDELETE and provide the name of the disk and the search pattern. 5. Run the VFY /UP and /LO options with the listing and scratch files directed to another disk. (The listing file may get rather lengthy if lots of disk blocks were deleted, so you may want to send the listing to a disk or NL:.) 6. Rename the recovered files from [1,3] to their proper directories. (Warning: recover all files before renaming, or copy them to another medium one directory at a time. If you guess wrong at the proper UFD, it could be extended to accomodate the new directory entries and re-use a disk block from one of the files yet to be recovered.) PAGE 2 7. If there are extra recovered files that you want to delete again, be sure to rebuild the volume bit map again to take care of doubly allocated disk blocks before returning it to service (the /RE and /UP options in VFY). 8. Always VFY the disk one last time before putting it back on-line! 9. When you are satisfied everything is OK, return the disk back to its original state (PUBLIC, /-UNL, etc.). 2.0 Compilation and Task Building UNDELETE is a non-privileged program written in FORTRAN IV-PLUS (it needs 32-bit integer arithmetic). The command files supplied will re-compile and re-task build the program. The requirements for a successful build are: 1. ASN the logical device SY: to the source disk; 2. ASN the logical device MP: to the map device; 3. Be sure USERLIB.OLB has been created first; 4. Invoke @UNDELETE to automatically compile and task build UNDELETE in the current directory. UNDELETE does not use the MCR get command line feature so there is no reason to INStall UNDELETE permanently. Since it is always risky messing with the on-disk structure on a live system, UNDELETE should be considered a last resort to recover files that would be too costly or impossible to recover any other way. It has, however, been used to recover an entire system disk deleted with a PIP wild card specification, and also to recover an entire directory on the system disk while the system was running. IT WORKS!