[horde] Merging H4 and H5 databases

Simon B simon.buongiorno at gmail.com
Tue May 28 09:10:31 UTC 2013

On 27 May 2013 20:47, Jan Schneider <jan at horde.org> wrote:
> Zitat von Simon B <simon.buongiorno at gmail.com>:
>> Hi.
>> I would like, if possible, to merge my test H5 db (both mysql) with
>> the production H4 db.  Obviously the schema is different, and my idea
>> was to:
>> - couple the H4 database to the new H5 install
>> - upgrade the schema
>> - merge the databases
>> The last step is where I'd need some help.  Is this possible?  I'm
>> presuming I can just inject all the sql commands from the H5 db into
>> the newly upgraded H4 db.
> No.

Jan, far be it from me to call you a liar, but you're far too modest.
Your DB structure for Kronolith is quite solid.

For anyone else finding this thread, this is what I did..

Backed up the H4 db to a new db named h4backup.
Granted rights to the horde mysql user to this h4backup db
Changed the config/conf.php to use the new h4backup.db
Logged in as the Administrator and updated all the schemas.
Use mysqldump to create a hordebeta.sql from the hordebeta (H5) db
Use mysqldump to create a h4backup.sql from the h4backup db
Open the hordebeta.sql with an editor and string replace hordebeta with h4backup
Concatenate the two .sql files (hordebeta.sql >> h4backup.sql
mysql -u root -p < h4backup.db

One user has some duplicate appointments, but I think this is a legacy
issue with one of her mobile clients.  So far no other issues.



More information about the horde mailing list