[comp.os.vms] Restoring deleted files on VAX/VMS !!!!

trier@diku.dk (Jens Trier Rasmussen) (04/26/88)

The other day I just deleted 3 weeks work of Pascal source code. So now
I'll like to know if there is a way to undelete files, that is locate them
on the disk ?

I'll also like to know if anyone has a program which doesn't delete the files,
but moves them to a another place om the disk and from where you can undelete
them again ?

Cheers

    Jens Trier Rasmussen

LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) (05/01/88)

	The other day I just deleted 3 weeks work of Pascal source code. So
	now I'll like to know if there is a way to undelete files, that is
	locate them on the disk ?

Forget it; they are long gone by now.  The VMS disk-space allocation mecha-
nisms make it almost certain that a file header you release in deleting a file
will be re-used fairly quickly.  Without that, even assuming the blocks your
files lived in haven't been re-used - also likely to be false - they'd be
almost impossible to find.

About the only time you can hope to recover deleted files is if you detect the
error and take the disk off-line - or even crash the system - within a couple
of minutes.  Even then, you'd be looking at a lot of work to recover the
stuff.

Now you know why regular backups are so important!

	I'll also like to know if anyone has a program which doesn't delete
	the files, but moves them to a another place om the disk and from
	where you can undelete them again ?

If all you are concerned with is uses of the DELETE command from DCL level,
the following will do the trick:  Create a subdirectory someplace; for me,
it might be USERCS:[LEICHTER.WASTEBASKET].  Also create the one-line command
file DELETE.COM:

	$ RENAME 'P1' <your-wastebasket-directory>

Finally, in your LOGIN.COM file, do:

	$ REALLY_DELETE :== DELETE
	$ DEL*ETE :== @<wherever-you-put-it>DELETE

It is possible, although harder, to make a PURGE.COM file that lets your
PURGE command move stuff to the WASTEBASKET, too.

Dealing with other ways that files get deleted - in user programs, by automa-
tic deletion due to version limits, etc. - isn't practical except on a case-
by-case basis.
							-- Jerry