Results 1 to 4 of 4

Thread: Restoring Horde / Roundcube address books

  1. #1
    Member
    Join Date
    Jul 2004
    Posts
    186

    Default Restoring Horde / Roundcube address books

    Hi, really hope you can help!

    How does one restore a user's address books for horde and roundcube?

    I found the horde.sql and roundcube.sql files in the user's /backup/.../homedir/ folder, and I know there are /var/lib/mysql/roundcube and .../horde folders, but how do I integrate the user's data from the .sql files?

    Any information/advise is welcome.

    Thanks in advance

    Peace.

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default

    Hi,

    Actually, horde has it's own database that the user wouldn't have backed up, although any backups you make for /var/lib/mysql would have the horde database backups.

    If you have ever run /scripts/fullhordereset, you would also have a backup file at /var/cpanel/horde with the name horde.backup.sql.########## (where # are numbers).

    If you open up the file to view it, at the very bottom you'll get something like this:

    LOCK TABLES `turba_objects` WRITE;
    /*!40000 ALTER TABLE `turba_objects` DISABLE KEYS */;
    INSERT INTO `turba_objects` (`object_id`, `owner_id`, `object_type`, `object_uid`, `object_members`, `object_name`, `object_alias`, `object_email`, `object_homeaddress`, `object_workaddress`, `object_homephone`, `object_workphone`, `object_cellphone`, `object_fax`, `object_title`, `object_company`, `object_notes`, `object_pgppublickey`, `object_smimepublickey`, `object_freebusyurl`) VALUES (some values here),(some values here),(some values here);
    /*!40000 ALTER TABLE `turba_objects` ENABLE KEYS */;
    UNLOCK TABLES;


    You could either run these commands in the mysql prompt on the system by doing the following series of commands:

    mysql
    \u horde

    (paste in mysql shell the contents you copied from sql for turba_objects section)


    Alternatively, you could log into PHPMyAdmin in WHM as root user, select the Horde database, select the turba_objects table, select SQL and paste the information from the sql file's turba_objects section into the field and then click the "Go" button.

    Please do make a copy of the horde database prior to doing this. I'd suggest you make the copy in root shell by just doing:

    cd /var/lib/mysql
    cp -R horde horde.bak091011


    Also, you would probably want to check the table turba_objects in PHPMyAdmin first and Browse it to see if address book items exist for other users before using a possibly old .sql file in /var/cpanel/horde, since you might wipe out other user's address books. The sql contents you copy will have the address book contacts in this section:
    VALUES (some values here),(some values here),(some values here);

    As such, if you see a major discrepancy between the current listing when you Browse turba_objects and the VALUES area, you would need to find a way to integrate those two.

    For Roundcube, I'm not as sure, so I'll leave that up to a Roundcube expert.

    Thanks.
    Last edited by cPanelTristan; 10-11-2009 at 09:14 AM.

  3. #3
    Member
    Join Date
    Jul 2004
    Posts
    186

    Default

    Well...cpanel does backup users' horde and roundcube databases, but it seems to extract data from the main horde/r.cube databases. Hence the backed up horde.sql and roundcube.sql files that are created per user during backups.

    So why on earth would they not provide an easy means of restoring these???

    Having to 'integrate' the data manually risks overwriting good data in the main db - simply not worth it, so what is the point of the backups?



    Thanks anyways cpaneldanielle.

  4. #4
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,562
    cPanel/WHM Access Level

    DataCenter Provider

    Lightbulb

    Quote Originally Posted by jack01 View Post
    How does one restore a user's address books for horde and roundcube?

    I found the horde.sql and roundcube.sql files in the user's /backup/.../homedir/ folder, and I know there are /var/lib/mysql/roundcube and .../horde folders, but how do I integrate the user's data from the .sql files?
    The two SQL dumps specified are restored automatically when restoring a full account backup; restoring full account backups is possible via WHM or via root SSH access; it is not yet possible for end-users to do this via the cPanel control panel.

    If you prefer to have a specific feature for end-users to restore horde and roundcube SQL dumps (e.g., a new feature that could be placed at "cPanel: X3 > Files > Backups"), I would consider posting a feature request in the following area on our forums:
    Feature Requests for cPanel and WHM - cPanel Forums

Similar Threads

  1. horde address books are missing after changing harddrives -- help!
    By modom in forum cPanel & WHM Discussions
    Replies: 6
    Last Post: 10-17-2009, 12:17 PM
  2. Are Multiple Address Books Possible?
    By idBear in forum cPanel Developers
    Replies: 2
    Last Post: 02-27-2008, 07:58 PM
  3. Horde -No browseable address books
    By majoosh in forum E-mail Discussions
    Replies: 4
    Last Post: 08-09-2006, 05:27 AM
  4. Storing Address Books online
    By Allin1Joe in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 07-11-2005, 04:14 PM
  5. Horde webmail - address books gone on cpmove
    By deusmonkey in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 10-27-2004, 08:49 AM