[turba] restoring turba addressbooks: part 2 of 2

Robert P. J. Day rpjday at crashcourse.ca
Mon Nov 23 09:17:04 UTC 2009


  and to finalize this, i'm looking at the new sources.php file from
the pristine turba-h3-2.3.2 install, and just want to confirm the few
changes i would have to make to re-install a single addressbook out of
the few that exist.

  mysql on this system has a "horde" database, inside of which there
are the turba tables, one of which is "turba_clients", so let's go
with that.  (the main issue here is that i will, of course, have to be
careful to make sure the schema is correct, and that might involve
tweaking the schema since these tables could be fairly old, but we'll
burn that bridge when we get to it.)

  in the new sources.php, i read the first bit of a sample entry for
an addressbook:

$cfgSources['localsql'] = array(
    'title' => _("My Address Book"),
    'type' => 'sql',
    // The default connection details are pulled from the Horde-wide SQL
    // connection configuration.
    'params' => array_merge($GLOBALS['conf']['sql'], array('table' => 'turba_objects')),
    ...

  as i read it, the name 'localsql' here is arbitrary, it's just the
one turba comes with.  i could change that to, say, 'clients' as long
as that's the name i use later for configuring turba through Horde
Administration, right?  just need to keep things consistent.  title of
"Client Address Book", table name of "turba_clients", of course.

  the 'map' entry follows i'll have to check for sanity and, toward
the end, there's this from the new sources.php file:

    'export' => true,
    'browse' => true,
    'use_shares' => true,
    'list_name_field' => 'lastname',
    'alternative_name' => 'company',

from what is an old file, i read this:

    'public' => true,
    'readonly' => false,
    'admin' => array(... list of people ...),
    'export' => true

so should i copy 'public' over?  it doesn't seem to exist in the new
sources.php file.  the rest looks pretty straightforward.

  and the last question -- if the table fields in sources.php aren't
compatible with what's in the mysql table, could that cause any
corruption?  if not, then i can just tweak sources.php and give it a
shot, but i'd rather not if there's a chance i might break something.
(yes, it's all backed up, but i'd rather not have to much around that
way.)

  does all that sound sane?  it seems fairly obvious, am i missing
something critical?  thanks for any guidance.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================


More information about the turba mailing list