The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Merge Horde Databases from different servers

Discussion in 'General Discussion' started by cyon, Sep 20, 2004.

  1. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    I have the following problem: We transferred several hundreds accounts to a new server where there are already accounts installed.
    Now I want to merge the old horde databases with the existing ones on the new server.

    Any tips? If I would know where to look for the DB password, I think I could export the data via phpMyAdmin and add it to the DB on the new server, but I couldn't find the right password in the php scripts.
     
  2. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Just export via the command line:

    mysqldump -h localhost -D horde > horde.sql

    Then edit that dump file to remove and data not intended for the new server (don't accidentally delete any parked domain or add-on domain data) and import the updated file on the new server:

    mysql -h localhost -D horde < horde.sql

    That's currently the easiest method. It is a shame that cPanel doesn't do this automatically (I've complained for well over a year now); it wouldn't be all that difficult for them to make this part of the copy script.
     
  3. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    Thanks a lot for answering! :)
     
  4. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    Oops. just stumbled upon a problem:

    [/var/lib/mysql/horde]# mysql -h localhost -D horde < horde.sql
    ERROR 1062 at line 30: Duplicate entry 'XXXX@XXXXXXXX.XXX-imp-last_login' for key 1

    I mean, I know this is an error message, but what it DIDN'T tell me was whether the db operations have been completed or not. Does anyone know?

    Is it possible to view db tables via shell? That would be the easiest way.
     
Loading...

Share This Page