Hello João, On Friday 11 January 2008 13:39, João Henrique Freitas wrote: > Hello, > > I am like to report my status in libdbi interface to Bacula. > > The libdbi drivers works in Bacula (configure, make, run). > Not regression tests had pass yet, because I need to do a job backup > worked. > > But I ran every comand in bconsole like "status dir", "list volumes"....
Great. > > Basicaly I create and code in src/cats/dbi.c, change the definitions > in src/cats/cats.h and add a new option in dird_conf.h dbitype. OK. > > If someone want to see the code, please tell me. When the job backup > work. I report a new status here. Yes, please do send me the code. It is important to see it early so that I can avoid you running into problems later (programming style, Bacula specific coding conventions, ...) Best regards, Kern > > Thanks > > On Dec 10, 2007 1:41 PM, David Boyes <[EMAIL PROTECTED]> wrote: > > > But we have a way (already proposed initially by Kern and now by > > > David). > > > > We can use the libdbi > > > > > ( http://libdbi.sourceforge.net/) to do the work > > > > Even better -- someone else already did the hard part..8-) Gluing this > > into Bacula will be fairly simple, as the database interaction is already > > fairly well abstracted into a C++ class. > > > > > 1. Test the framework libdbi. Understand how they work and limitations > > > > The major limitation is that if you want the SQL to work on multiple > > databases, then you have to use the lowest common denominator language > > level and features. There are places in Bacula where various things > > exploit "features" of the currently supported databases. The Postgres > > code is the most rabidly standards-compliant, so I'd start with that SQL > > and see if it just works out of the box (ie, if you deliver the stuff > > written for Postgress to DB/2, I suspect it will be more likely to work > > correctly than the MySQL code, which has a few local features). > > > > > 2. Code in Bacula the drivers for libdbi interfacing with the databases > > > > supported by libdbi > > > > See above. All the nasty parts are in the C++ class that abstracts the > > database access. > > > > > 3. Create the a libdbi driver for DB2 (and others databases too) > > > > DB/2, Sybase and Oracle already have one, and they're officially > > supported by the vendor. 8-) Once you get the DBI layer in place, you can > > follow the directions provided with the database to enable the DBI driver > > they provide. > > > > > Important: this idea not discard the already interfacing drivers > > > already > > > > coded in Bacula, but one way to use > > > > > proprietary databases and connectivity API in Bacula. > > > > On the other hand, there are MySQL and Postgres DBI drivers, too. I don't > > know about sqllite, but I wouldn't be heartbroken to see sqllite use fall > > off. It's not like MySQL or Postgres are *that* big of a PITA to > > implement and manage. Or someone could write a DBI driver for sqllite. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
