[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Alternative DB structures-Porposal

Le Wednesday 01 October 2008 19:56:54 Kjetil Torgrim Homme, vous avez écrit :
> I mentioned earlier in another thread that an exact byte count
> combined with the MD5 sum can be used to implement incremental backups
> of append-only files, *however* since the decision whether to backup
> or not is based on ctime anyway, extracting the information from LStat
> as needed is quite acceptable.
> the reason I brought up size as a separate column in that other thread
> was to do exactly what bfileview does (thanks, Eric!), and the main
> bottleneck with bfileview is really not extracting the information
> from LStat, but "flattening" the directory tree inside the
> brestore_pathvisibility

In fact, it's a bit more complex than you said. This table is used to know 
with a single SQL query if a directory is present or not in a backup (because 
the file table doesn't give this information).

Now, under unix, it's not possible to get the size of a directory (and what it 
contains) with a single system call. You have to stat() all files and sum 
bytes yourself. (with recursion)

It's the same with the bacula catalog structure.

So, since this table is already there (and contains all path from a backup), i 
use it to store the directory size for a fast access and cache purpose.

> (as the name indicates, that table must be 
> added in addition to the core Bacula DB schema, and it must be kept
> up-to-date using a batch job while no backups are running).

You can run brestore.pl and bfileview.pl while jobs are running :)

> having mtime available during restore may be more useful, both to
> provide more information interactively when selecting files, and to
> pick which files to restore ("everything newer than a week from the
> full backup which ran last night").
> I don't see any use case for ctime.
> now it's your and/or John's turn :-)



This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.