Networker

[Networker] Questions on backing up hard links?

2005-08-19 17:25:24
Subject: [Networker] Questions on backing up hard links?
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 19 Aug 2005 17:22:22 -0400
Does anyone know how NetWorker handles the backup/recovery of hard links or how it's supposed to?

I tested backing up two files (TEST and TEST.ln). TEST was approx 10 KB. The second file is a hard link to the first. The one thing I noticed is that NetWorker seems to indicate that only 10 KB was backed up. If I run nwrecover, I can see entries for both files, however. I guess this makes sense because I wouldn't think NetWorker would actually back up files to tape that are hard links since they share the same inode, and that would be redundant data on tape, plus they are actually the same file as far as the OS is concerned, anyway, and NetWorker only sees what the OS tells it. In other words, if I have 10 original files totaling 50 MB, and I then create a hard link to each one (link count now = 2 for all 20 files), and I back up all 20 files, NetWorker will indicate that only 50 MB was backed up, not 100 MB even though recover and verbose show all 20 pathnames.

So is NetWorker merely updating the client index with information about the hard link but not writing it to tape?

Another thing I notice is that if I remove the hard link (TEST.ln), and then I recover the hard link, NetWorker indicates that it's reading 10 KB, and when it restores it, while it has the same mtime, and same name (TEST.ln), it now has a new inode, so it's technically no longer a hard link to TEST. A diff between the files shows no differences, but editing one is not reflected in the other, so NetWorker did not recover it as a hard link. It appears to be just an ordinary copy with the original name.

How does is it able to recover it? Does it just recover the original an rename it TEST.ln? Is this the behavior one would expect?

Does it make any sense to back up hard links? My testing shows that they are not recovered as hard links so seems pointless to do so? 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. We're running an older 6.1.1 release on Solaris 2.8 primary server. I was doing my tests on a Linux client, but the backups and recovers were from our Linux storage node.

Thanks.

George

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>