From owner-freebsd-questions Wed May 30 2:57:36 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by hub.freebsd.org (Postfix) with ESMTP id 1867837B422 for ; Wed, 30 May 2001 02:57:33 -0700 (PDT) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Wed, 30 May 2001 10:57:21 +0100 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 1552i1-0002Hv-00; Wed, 30 May 2001 10:56:09 +0100 Date: Wed, 30 May 2001 10:56:08 +0100 (BST) From: Jan Grant To: Mike Meyer Cc: Ryan Masse , questions Subject: Re: restoring a file by inode In-Reply-To: <15123.46528.613930.221896@guru.mired.org> 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, 29 May 2001, Mike Meyer wrote: > Ryan Masse types: > > is it possible to restore a file by inode? as an example > > Sure, it's possible. Use the -m flag to restore. > > > > if the file /home/rmasse/test was removed would it be possible to restore > > the file using the inode serial 793735? > > > > > ls -lai | grep test > > 793735 -rw-r--r-- 1 rmasse wheel 0 May 28 23:50 test If the file was truncated, mike was referring to using restore(8) with -m. In other words, setting up the good old "you _do_ keep backups, don't you?" line :-) If the file was removed and recreated, there's no guarantee that the inode it uses will be the same as the old one. If the file was (say) a log file that some process still has open (but is no longer linked into any directory) you could probably use fsdb (followed by a fsck) to recreate a link to the file. -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk Semantic rules, OK? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message