Networker

Re: [Networker] Questions on backing up hard links?

2005-08-23 03:53:06
Subject: Re: [Networker] Questions on backing up hard links?
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 22 Aug 2005 14:40:38 -0400
Not surprisingly, it turns out that I was not recovering all the affected files. If I recover all the files then they are recovered as hard links, same as before, but their inode numbers may differ respectively from the originals as follows:

if I recover them to a different location then they are assigned new, but identical, inode numbers even if the original paths are gone. If I choose to rename the recovered files, of course, they will be assigned new but identical inodes. since the originals are still in use. If, however, I remove the original files then the recovered files are given the original inode values, assuming those are not in use. If I overwrite then this appears to assign the same inode numbers. If one set of the files are gone, but the others are still around, and I recover the missing ones by path then they will be assigned new inodes, but if I instread recover both, and I simply answer "Discard recovered file" when it prompts for the one that still exists then it assigns the same inodes to the ones it recovers.

I also found I can recover 2 or more of the hard links and the inodes will be preserved depending. For example, if I have three or more hard links (link count=3 or more), and I remove all of them, and then I recover say 2 of the three then they will have the same inodes as before, but if one or more of the files still exists, then I noticed I got different results but could not replicate exactly. Not sure if the behavior was expected or maybe I just wasn't doing it write with overwrite versus the file not even existing anymore before recovering?

Anyway, for our purposes if one copy of the files was lost it would probably be easier to just manually recreate the hard links via a shell command than to use the recover tool since the shell would be faster and you don't have to answer "Discard recovered file" when it hits the ones that still exist. Guess you could overwrite but seems silly to if they've not changed.

George

Darren Dunham wrote:

Does it make any sense to back up hard links?

As opposed to what?  Not backing them up?

My testing shows that they are not recovered as hard links so seems pointless to do so?

Did you try recovering them both in the same session?

You'd have your pathnames back, but they would just be copies taking up space, not actual hard links. You'd have to re-create the hard links from scratch.

I don't think that's correct.  There have been some bugs associated with
it in the past, but hard links should be recovered properly.

I would not expect that you could recover one link to a file and have it
relink to a file already present.  I would expect that if you recovered
multiple links to a file that each would be a link to the same file.



To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu 
if you have any problems
wit this list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>