[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help!!! undelete for ext3fs!!!

I did this, once but it was a pain.  It was under ext2 instead of ext3
but that shouldn't matter in this case.  It also required knowledge of
some of the contents of the file and wasn't very useful for binary
files.  You essentially boot without mounting the filesystem on which
you want to 'undelete' (or you unmount after boot if not the root
partition and after killing all daemons that use the target
filesystem).   Then you grep the device (eg /dev/sdb1) for some part
of the file you want and have it spew so many bytes before and after
what you are looking for so that you can see where the start/stop of
the file is.  Once you have that you use a comand (dd? or something)
to copy those bytes from that location on the device to a file on an
already mounted file system and poof, you have it back.

I know this is rather vague but you get the idea of the approach.  I
wish I could give you more detail but I did this around 4 years ago
and haven't really needed to do much like it since.


----- Original Message -----
From: "Sebastiaan" <S.Breedveld@ITS.TUDelft.NL>
To: "Cheryl Homiak" <chomiak@chartermi.net>
Cc: <debian-user@lists.debian.org>
Sent: Friday, March 01, 2002 12:19 AM
Subject: Re: Help!!! undelete for ext3fs!!!

> High,
> On Thu, 28 Feb 2002, Cheryl Homiak wrote:
> > I just deleted something I didn't want to delete; won't hurt my
> > just destroyed some important records I was keeping.
> > Is there any way to undelete in ext3fs?
> Ouch, no idea.
> > And if there is a way, but you had to have it pre-set up before
> > catastrophe occurred, I'd still like to know about it so I will
have a
> > safeguard in the future.
> You can setup some kind of Trashcan yourself. Make a directory on
> system somewhere and make an alias for rm:
> alias rm = 'mv ? /tmp/Trashcan'
> not sure about the ? which should be the filename. Or write a script
> this. If you are on a multiuser system, you definitely have to write
> script, which moves the deleted files into subdirs in the Trashcan
> are unreadable by other users.
> Greetz,
> Sebastiaan
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact

Reply to: