Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 May 2001 10:56:08 +0100 (BST)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        Mike Meyer <mwm@mired.org>
Cc:        Ryan Masse <mail@max-info.net>, questions <questions@freebsd.org>
Subject:   Re: restoring a file by inode
Message-ID:  <Pine.GSO.4.31.0105301052190.15342-100000@mail.ilrt.bris.ac.uk>
In-Reply-To: <15123.46528.613930.221896@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 29 May 2001, Mike Meyer wrote:

> Ryan Masse <mail@max-info.net> types:
> > is it possible to restore a file by inode? as an example
>
> Sure, it's possible. Use the -m flag to restore.
>
> 	<mike
>
> > 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.31.0105301052190.15342-100000>