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

Re: [Bacula-devel] Multiple fd plugins in one fileset: Restore problems


Hello,

Some comments: 

- the code is still under important (heavy) development, and you didn't 
specify what version of Bacula you are using.

- Although the plugin interface has been changing, I have not incremented the 
version numbers, which means that if you do not build Bacula and the plugin 
at the same time, there is bound to be some problems.  Each version should be 
relatively consistant as I always run my rather simple plugin test before 
committing.

- The plugin is not at all going to understand __RESTORE_LOCATION=xxx /path...
So I am not sure how that is going to work. 

- Currently the plugin is rather stupid and doesn't check a lot of things so 
if you give it bad data, it is probably going to break.

- The data on the Volume, during development (now), is still subject to 
change.  I've already modified it once, though as far as I know, it was a 
compatible change.

- Though it is possible, I don't see any connection between this and the ACL 
problem. The code is very different.

- Error conditions concerning the plugin are still being worked on to ensure 
that it is robust.

- There may well be a bug.  I'll add multiple Plugin calls to my test case.

- If you can ensure you are on the latest SVN update, it would help, but 
realize the plugin code is still changing on a daily basis as we are just now 
developing a "serious" plugin, so we are correcting problems "real time".

- If you are on a recent SVN update and you get a crash, I would like to see 
all the job output (perhaps a debug -d 50 listing) and most important a 
traceback.

The above remarks are not at all designed to discourage you -- we *need* 
testers.

Best regards,

Kern



On Monday 29 September 2008 15:04:31 Bastian Friedrich wrote:
> Hi,
>
> for some months bacula trunk code has provided plugins; I was (am)
> especially interested in the fd plugins which let me "dump" arbitrary types
> of data to the backup, including database dumps.
>
> Currently, only a single plugin, bpipe, is included in bacula; it is
> exactly what I need.
>
> When a fileset includes multiple "plugin" lines, restoring these dumps
> results in various interesting bugs/erros.
>
> My test setup:
> -----------------------------------------------------------------------
> 3 "output/backup scripts":
> ~~~~~~~ out 1 ~~~~~~
> #!/bin/bash
>
> echo 'hello world 1'
> ~~~~~~~~~~~~~~~~~~~~~
> (out2/3 identical, but saying "hello world 2/3" respectively)
>
> Another 3 "input/restore scripts":
> ~~~~~~ in1 ~~~~~~~~~~~
> #!/bin/bash
>
> date > /tmp/tstfile1
> cat - > /tmp/outputfile1
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> A fileset with these 3 pairs:
>
> FileSet {
>   Name = "testset"
>
>   Include {
>     Options {
>       signature = MD5
>       noatime = yes
>       aclsupport = yes
>     }
>
>     File="/path/to/out1"
>
> plugin="bpipe:myname1:/path/to/out1:__RESTORE_LOCATION__=%w /path/to/in1"
> plugin="bpipe:myname2:/path/to/out2:__RESTORE_LOCATION__=%w /path/to/in2"
> plugin="bpipe:myname3:/path/to/out3:__RESTORE_LOCATION__=%w /path/to/in3"
>   }
> }
> -----------------------------------------------------------------------
>
> Backing up this file set, I can find the strings "hello world 1/2/3" in the
> resulting volume file; they are preceded by what seems to be a sensible
> header that includes the "plugin" statement.
>
> Restoring now becomes a problem, though:
>
> (1) Restoring the file, and all three pipe plugins (does not work)
> ==================================================
> No error messages, no crashes.
> /tmp/outputfile1 is empty (0 bytes)
> /tmp/outputfile2 is empty (0 bytes)
> /tmp/outputfile3 is restored correctly and now includes the string "hello
> world 3"
> /tmp/tstfile{123} exist and contain a current date
> /path/to/out1 exists, and contains the correct data
>
> (2) Restoring no file, all three pipes (does not work)
> ======================================
> Error messages:
> 29-Sep 14:48 bilbobox4-fd JobId 2485: Error: restore.c:294 Logic error:
> output file should be open
> 29-Sep 14:48 bilbobox4-fd JobId 2485: Error: restore.c:294 Logic error:
> output file should be open
>
> /tmp/outputfile{12} are empty
> /tmp/outputfile3 is restored correctly
> /tmp/tstfile{123} exist and contain a current date
>
> (3) Restoring only "myname1" (DOES work!)
> ============================
> No error messages, no crashes.
> /tmp/outputfile1 is restored correctly
> /tmp/tstfile1 contains a current date
> Everything is good!
>
> (4) Restoring "myname1" and "myname2" (does not work)
> =====================================
> 29-Sep 14:55 bilbobox4-fd JobId 2490: Error: restore.c:294 Logic error:
> output file should be open
>
> /tmp/outputfile1 is empty
> /tmp/outputfile2 is restored correctly
> /tmp/tstfile{12} are fine
>
>
> (4) Restoring only "myname2" (or "myname3") (does not work)
> ===========================================
> FD Crashes with seg fault:
>
> bilbobox4-fd: restore.c:667-2488 restore stream_plugin_name=0 0
> Kaboom! bacula-fd, bilbobox4-fd got signal 11 - Segmentation violation.
> Attempting traceback.
> Kaboom!
> exepath=/data/home/b/bastian/AppKit/common/misc/bacula/bacula-2.5-20080926s
>vn/src/filed Calling:
> /data/home/b/bastian/AppKit/common/misc/bacula/bacula-2.5-20080926svn/src/f
>iled/btraceback
> /data/home/b/bastian/AppKit/common/misc/bacula/bacula-2.5-20080926svn/src/f
>iled/bacula-fd 6778
>
> Restore job fails with
> 29-Sep 14:59 bilbobox4-dir JobId 2491: Fatal error: Network error with FD
> during Restore: ERR=No data available
> 29-Sep 14:59 bilbobox4-dir JobId 2491: Fatal error: No Job status returned
> from FD.
>
> /tmp/tstfile2 and /tmp/outputfile2 are NOT created (not even 0 bytes).
>
> -----------------------------------------------------------------------
>
> I suspect that the problem is comparable to the ACL restore bugs reported
> some days ago: While there is a stream restored, there is no "regular" file
> name associated with it, and similar: the job crashes.
>
> Any idea?
>
> Thx & best regards
>    Bastian



-------------------------------------------------------------------------
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 Copilot Consulting.