From owner-freebsd-questions Tue Jan 7 4: 9:55 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D4FD37B401 for ; Tue, 7 Jan 2003 04:09:53 -0800 (PST) Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1F2E43EA9 for ; Tue, 7 Jan 2003 04:09:52 -0800 (PST) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Tue, 7 Jan 2003 12:09:50 +0000 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 18VsXn-0006NI-00; Tue, 07 Jan 2003 12:09:19 +0000 Date: Tue, 7 Jan 2003 12:09:19 +0000 (GMT) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: Goedeke Michels Cc: freebsd-questions@FreeBSD.ORG Subject: Re: undelete or ffsrecover In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 7 Jan 2003, Jan Grant wrote: > On Mon, 23 Dec 2002, Goedeke Michels wrote: > > > Hello, > > > > First of all, if this is the wrong group, please redirect me to a more > > appropiate place. > > > > I am trying to recover some files I have accidentally deleted. However, > > ffsrecov continuously complains about a corrupt super block and misssing > > magic. The filesystems are ok, however (as long as you trust fsck) and > > mount without problems. > > I've also come across undelete(2), but since I have no clue about C, I > > did not get very far with this (just put a main() { ... } around the > > example. Compiled, but did not do anything). > > I am running 4.7 stable (~week old) with soft-updates enabled > > filesystems on an intel box. > > > > Most info I found on the web said "no chance", but have been quite old > > and the appearance of an undelete function raised some hope. > > > > Is there any way of getting those files back ? There has been no write > > activity on that partition since and now its mounted read-only. I do > > have the inode of the parent folder (which contents I am missing) and > > the names of the top level files and directories. > > > > Thanks for any help > > You might try using the fsdb command "ln" to create a new link to the > missing inode; then copy the file contents to a separate filesystem > before fixing everything with fsck. > > Note that if disk blocks from the original file have been reallocated > then you're close to being out of luck. Incidentally this trick works a hell of a lot better if some process still has the deleted file open. -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ Goedel would be proud - I'm both inconsistent _and_ incomplete. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message