[turba] restoring turba addressbooks:part 2 of 2

Michael J. Rubinsky mrubinsk at horde.org
Mon Nov 23 14:16:07 UTC 2009


Quoting "Robert P. J. Day" <rpjday at crashcourse.ca>:

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

As mentioned previously, you should be able to just drop the old  
configuration stanza into your new sources.php.

>   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.)

You don't *have* to change the schema. The only thing you need to make  
sure is that the map array reflects the correct schema.


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

Ah, right. This is one part you will need to tweak. If you want the  
source to be public, you will need to either add appropriate  
permissions for this address book using the administrative interface,  
or update this address book to use the horde_shares system as outlined  
in the UPGRADING file.


>   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?
Depends on what you mean by "not compatible." All you really need to  
do is make sure the map array matches what you have in the database.


-- 
Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org



More information about the turba mailing list