Re: undelete in user space?

Larry 'Daffy' Daffner (
Thu, 04 Jul 1996 17:15:11 -0500

Kevin M Bealer writes:
-> On Sun, 30 Jun 1996, Ian Main wrote:
-> > I suppose I'm a bit late on this one but.. Wouldn't it be best to
-> > implement undelete in user space using a new rm? One could write it so
-> Yes ... but there are more ways to delete than just "rm". Lots of programs
-> can delete. rm, cp, mv, redirection of output, any compiled program that
-> contains code to open a file in write mode.
-> Which brings another point: how widely interpreted would the "undelete"
-> thing be? If I have a database program which modifies a file, should it be
-> backed up? What if I open a file, lseek to the beginning and start writing?

Well, the solution that I have experience with (which seemed to work
pretty well when I was using it) is a package developed at Purdue
called entomb. I'm looking at the design docs for it right now, and
basically what it entails is creating a library 'libtomb', which
contains replacements for creat, open, rename, truncate and unlink,
which call an 'entomb' program to save the file off to a directory
owned by an entomb user which is exempt from quotas. Users can then
get back files clobbered by programs which use these libraries by
using a program called unrm. The system seemed to work well (and
still does, I assume) for a large number of users, and it doesn't
require any changes to the kernel. Looks like it will run on Linux
fairly trivially, but I haven't checked. Anyways, if anyone is
interested, it's at as /pucc/entomb-3.5.tar.gz.

-> BTW what is meant by a journaling filesystem? Is this a filesystem that can
-> be "unwound" to the state it was in at some previous time, or is this a
-> filesystem that stores enough info on what it is doing beforehand to
-> recover from any error?

I believe that a journalling filesystem is one that can be rewound to
a sane state at any point in time. So merely far enough to recover
from errors.


  Larry Daffner        |  Linux: Unleash the workstation in your PC!   |
Never underestimate the bandwidth of a station wagon full of mag tapes
        -- Dennis Ritchie