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

Re: [Bacula-devel] Selective restore when files are pruned [patch]


Hello,

> Kern Sibbald <kern@xxxxxxxxxxx> writes:
>
>> No, match_bsr.c is called for each record.  You might take another
>> look at it and see if it would be possible to move the code from
>> read_record.c to match_bsr.c -- even if it takes a new subroutine
>> call.  I haven't had a chance to look at that aspect yet, and I
>> would like to do so before applying the patch.  The patch will
>> definitely go in, but exactly how needs to be examined.
>
> I've had a look at it, and the only issue is keeping state across
> records.  it needs to maintain a flag indicating whether the current
> fileindex should be kept or sent, and in addition the compiled regexp
> should be kept around since we really don't want to run regcomp for
> *every* file.
>
> the easy solution is to extend struct BSR -- perhaps a bit ugly, but
> there are already some members which are used for bookkeeping during
> the restore, and aren't part of the bootstrap definition per se.

OK, that sounds like a nice way to go ...

>
> BTW, there is a hidden assumption that the "Unix attributes" will be
> the first record.  I think this is OK, since it's awkward for the FD
> to store the file content without knowing the filename in advance
> (even if it uses a temporary file, it can't assume that the
> destination is a single filesystem, and rename(2) will fail if it
> isn't.)

Well, the whole Bacula restore is most likely to break if the Unix
attributes is not the first record (or at least before any data records),
so you might want to add that requirement to a comment just for good form,
but I think it must always be satisfied by the current design.

>
> I'll send an updated patch later this week (I'll also rename the
> keyword to FileRegex as requested).

OK, nice -- thanks for the effort.  Once I get it, I will commit it right
away.  Also thanks for sending in the FLA, the FSFE advised me that they
have it  :-)

Kern


>
> --
> regards,
> Kjetil T. Homme
> Linpro AS
>
>
> -------------------------------------------------------------------------
> 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
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-devel mailing list
> Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/bacula-devel
>


Best regards, Kern

-------------------------------------------------------------------------
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
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.