On Monday 09 October 2006 16:38, James Ray wrote: > All, > So after another recover on some hard linked files I have yet another > question and problem. > > So recovering user yyyy's directory that has hard links to user xxxx's > directory bacula does the right thing of spotting the hard link (in this > case). Now lets go through this step by step: > > 1) It spots there is a hard link > 2) It checks if the place where it was hard linked to still exists > If it is still there: > 3a) It just relinks the file > If it is no longer there: > 3b) It recovers the original file to its original location > (which may > be user xxxx's or some other users) > 4b) It links the file in user yyyy's directory back to the one > in user > xxxx's directory > > Now this is all well and good but for the point where the file no longer > exists would this not be better: > 3b) It recovers the original file to the location of the file > that you > are actually trying to restore. > > So I have /home/yyyy/filea which is hard link to /home/xxxx/filez > Now user yyyy deletes their copy of the file accidently. > User xxxx also deletes their copy of the file knowingly and wanting to > do so. > > With bacula's current recovery method (as I see it anyways) then user > xxxx would get back a file that they wanted to delete.
I'm not convinced that Bacula works the way you describe it above. Part of the problem you may be having may well be some strange handling by Bacula, but it is also very likely due to a small but important confusion on your part. Hard linked files is a bit of a misnomer. In fact there is no such thing as a "hard link" as a separate entity. There is simply one file with two different names. The second name is created by a process called "hard linking", but no link is created (a soft link on the other hand is really a link between a directory item and a file). What Bacula does when backing up a file that is hard linked (i.e. has two names) is that it saves the first file that it runs into, and the second file with the same name becomes withing Bacula something like a soft link (i.e. the data is not backed up a second time). What happens during the restore, you'll need to check the code because I wrote it over 5 years ago so I am not 100% sure, but I believe that if either of the filenames is selected for restoration, then the one containing the data is selected and restored. If you only select the file that Bacula originally encountered and for which it backed up the data, I suspect that only that file is restored. However, if you select the file for which Bacula did not save the data, Bacula will mark the other file to be restored as well. If this behavior is not correct in your opinion, I see several ways out of the problem: 1. Look at what is restored, and delete the undesired copy if one is restored. 2. Submit a patch that does it correctly. 3. Submit a Feature Request and convince the users that it is important so that they vote to have it implement as soon as possible. Regards, Kern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users