On Saturday 22 September 2007 23:44, Arno Lehmann wrote: > Hi, > > I'm seeing an interesting thing at a Bacula 2.2.4 installation. > > This is on FreeBSD 7 current, which is not an OS I know well, so I > might present information unrelated to each other here. See below for > details where I'm unsure. > > This is a Bacula installed from the ports. In > /usr/ports/sysutils/bacula-client/work/bacula-2.2.4/config.out I see > the following line: > > Batch insert enabled: no > > So I assume this Bacula was built without batch inserts enabled.
That is correct. Batch inserts are not turned on. > > The catalog database does not have a batch table, and I wouldn't > expect that to be created, too: > > grep -i batch > /usr/ports/sysutils/bacula-client/work/bacula-2.2.4/src/cats/make_mysql_tab >les ; echo $? > 1 > > So, everything I see indicates that this Bacula should run without > batch inserts. Do you agree so far? > > But, while a job is running, I get tons of lines like these in the > messages: > > sql_create.c:730 insert INSERT INTO batch VALUES > (1028031,12,'/removed/to/protect/my/customer/from/information/leaks/...','s >ome file name','vK1fS DP87 IGk B Pp Pp A WOgA BAA C0F BGZxdD BDIUsU BGZxdD A > A C','6UkhIVIIDIW4ho1M0i9LYg') failed: > Table 'bacula.batch' doesn't exist > > This seems to indicate Bacula does try to work with batch inserts. > > To make this more interesting, the ./configure was actually called > with --enable-batch-insert. So I conclude that configure, while > checking for batch insert capabilities, does not turn all the > functions off when this would be appropriate. As far as I know, batch > insert needs the thread-safe mysql client libraries. These seem to be > present on the system: > > ls -l /usr/local/lib/mysql/*_r.* > -rw-r--r-- 1 root wheel 551490 Sep 19 00:46 > /usr/local/lib/mysql/libmysqlclient_r.a > -rwxr-xr-x 1 root wheel 892 Sep 19 00:46 > /usr/local/lib/mysql/libmysqlclient_r.la > lrwxr-xr-x 1 root wheel 22 Sep 19 00:46 > /usr/local/lib/mysql/libmysqlclient_r.so -> libmysqlclient_r.so.16 > -rwxr-xr-x 1 root wheel 477732 Sep 19 00:46 > /usr/local/lib/mysql/libmysqlclient_r.so.16 > > I have a hard time digging through the configure.log, but it *seems* > that ./configure does not look for the mysql client library in the > right places for this system: I see checks in /usr/local/lib64/mysql/, > but not in /usr/local/lib/mysql. If you have a /usr/local/lib64/... on your system, which you should NOT if you don't have a 64 bit CPU, then Bacula will look there first, then in the /usr/local/lib. Dan has added some details to the manual (unfortunately only for PostgreSQL), and you might want to read that as much of it applies to MySQL. See the Install chapter of the manual. > > Can someone explain this, or give me a hint why this would be the way > it is? Or, even better, tell me how I can actually get batch inserts > enabled on this system? Normally they should be on if you have the thread safe version of the MySQL client loaded on your system. If you have some 64 bit directories, Bacula may get confused. I'd recommend that you delete or rename those libraries if you have a 32 bit CPU as they just waste space and will cause problems. > > Also, I find that smaller jobs run without errors - the catalog backup > job does terminate without errors, and a test job I ran also finished > without errors. > > The catalog backup saves only one file, the test job had about 5500 > files, and the currently still running problem job already reached > more than 1,000,000 files. Is there a file count threshold in the > batch insert code? > > As the batch table is a temporary table, I don't think it's a good > idea to simply create it... but how can I either ensure batch inserts > are not executed when not configured, or the necessary temporary table > is created before it's used? You shouldn't concern yourself with the "batch" table. It is a temp table and there is no need to create. Your problem has nothing to do with the batch insert code itself, but simply that it is turned off for some unknown reason. Regards, Kern > > By the way - the catalog DB is MySQL 5.1.21-beta. > > Finally, one more question: As this is FreeBSD 7 current, which is NOT > considered stable, has anyone else a similar setup running and found > it to be stable? > > Thanks for your time, > > Arno ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
