Bacula-users

Re: [Bacula-users] How does Bacula back-up files?

2011-05-13 09:09:33
Subject: Re: [Bacula-users] How does Bacula back-up files?
From: Phil Stracchino <alaric AT metrocast DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 13 May 2011 09:06:14 -0400
On 05/13/11 08:32, obviously wrote:
> Hello,
> 
> I have a question I can't solve...
> 
> The is the situation:
> 
> I create a file with: dd if=/dev/urandom of=test.bin bs=10M count=300
> This gives me a file of 3GB.
> I check it's MD5 with md5sum test.bin
> 
> I clear my cache with echo 3 > /proc/sys/vm/drop_caches.
> 
> I check my chache with free -m.
> 
> I start a backup with Bacula of only 1 file, namely test.bin
> 
> Again, I flush the cache and when the back-up job is starting I remove the 
> test.bin file on the server.
> 
> And Bacula doens't react at all, it keeps backing up the file like it is 
> still there.
> 
> The backup finishes with no warnings, even it is removed during the backup.
> 
> I restore the test.bin file from tape and checks the md5 of it, and strangely 
> the md5sum is the same... 
> 
> So my question, how does Bacula do this? Cause I remove the file during the 
> backup and flush the cache frequently...
> 
> I hope you guys understand my q, my english is realy bad :) excuse me...


You haven't given enough information to answer the question.

For a single example, this is PRECISELY the behavior I would expect on
any client using a ZFS filesystem, in which all disk updates are
copy-on-write.  On ZFs, once Bacula (or anything else) starts reading a
file, it has a consistent view of the file until it closes it, even if
some other process modifies (or even erases) the file in the meantime.

For another:  On a Linux system, start a process writing random junk
data to a file.  (Say, dd a partition to a file on another partition.)
In another shell, delete the file.  Now, run 'lsof | grep deleted'.
You'll see the file still exists on disk, and is still being appended
to, even though marked as deleted.  Kill the process writing to it, so
that it gets closed, and it goes *poof*.


-- 
  Phil Stracchino, CDK#2     DoD#299792458     ICBM: 43.5607, -71.355
  alaric AT caerllewys DOT net   alaric AT metrocast DOT net   phil AT 
co.ordinate DOT org
  Renaissance Man, Unix ronin, Perl hacker, SQL wrangler, Free Stater
                 It's not the years, it's the mileage.

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users