Migration tool, does not migrate Roundcube database?

Discussion in 'ISPConfig 3 Priority Support' started by Taleman, Mar 8, 2021.

  1. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I ran migration tool on saturday, successfully.
    Now I notice Roundcube users are missing all contact entries. It looks to me the roundcube database was not copied at all during the migration.
    Should I or can I copy the database over manually? Or copy just the contact and contact group tables?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I realized roundcube creates the users to its database as user logs in, so user ID now is different from what it was on old server. So copying only contacts table creates a mess when contacts belong to wrong user most of the time.
    So copying the complete database is the way to go? Or it should not be done as the migration tool does not copy it?
    There are active users in Roundcube now, can I force them to log out somehow? Or just stop apache2, empty current roundcube db and import it from old server, then start apache2?
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I had the same problem when migrating, and I copied 2 tables iirc - users and identitities. On the old server, no user had any contacts, but those tables should be copied when they contain data.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Seems I do not know how to import some of the tables, that makes referential errors.
    And copying the complete roundcube database from old server fails also, database error. Maybe not compatible structure?
    Can you give more advice suitable for beginners in database matters like me?
    I tried to do this with PHPMyAdmin.
     
  5. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Place the .sql on your server and then do
    Code:
    mysql -u root -p roundcube  < path/example.sql
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That might work. But I suspect I have to drop all tables from rounccube, since the .sql file I got has CREATE TABLE for all the tables. From what I read about upgrading Roundcube, I need to run the script in
    /usr/share/dbconfig-common/data/roundcube/upgrade/mysql/1.3.0-1 to update the database from Roundcube 1.2.3 to 1.3.6 Roundcube on Debian Buster.
    I think I'll stop dovecot to stop sessions, do that database restore and update and restart dovecot.
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You could also restrict access to roundcube temporarily, restart apache, and then do the changes for Roundcube.

    You could rename the existing tables to NAME_old, and then import the new tables.
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I did not rename tables. Stopped dovecot.
    I managed to get contacts and signatures back. Sometimes my mad skilzz suprise even me.
    Thanks for help, @Th0m .
     
    ahrasis likes this.
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I never doubted your mad skillz :)
     
    ahrasis likes this.
  10. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    you have to copy some tables. it should be enough, to use the following tables:
    contactgroupmembers
    contactgroups
    contacts
    identities
    users
     

Share This Page