• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Migrate Roundcube to new Server (with contacts)

Thera

Regular Pleskian
Server operating system version
Debian 11.6
Plesk version and microupdate number
18.0.52
Hi,
does everyone know how i can import the contacts from customers to the new plesk server? we have more than hundret customers and the dist upgrade doesnt work... this s*++! really hard :)

Thank you for your help!!
 
Hi Thera,
the contacts are lying within the DB table roundecubemail.contacts. You can give a table import / export a try.
 
So, first of a word of warning. Preform this migration at you own risk. Create back-ups (copies) of the database before doing a migration. Migration should be strait forward, but having back-ups is always a good precaution.

You'll find the contacts in the contacts table of the roundcubemail database. Which you can access via PHPmyAdmin as an admin (Tools & Settings > Database servers, then click the small icon on the right side). You can make an export of the contacts table PHPmyAdmin. If you not familiair with using PHPmyAdmin for importing and exporting try Googling it to learn more about. There are tones of article and other resources available.

You might want to consider copying (exporting and importing) other tables too. Like the contactgroups table if it has any content.
 
Last edited by a moderator:
thank you, i test it on a testserver, now i have the problem that i can't import the contact table. I Dont understand this error and dont understand why the error ist contactgroupmembers and not contacts what i exported..

====================================
2023-04-14 13:22:54 0x7f5d296d2700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 4 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 8347 srv_active, 0 srv_shutdown, 251443 srv_idle
srv_master_thread log flush and writes: 259712
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 3192
OS WAIT ARRAY INFO: signal count 2195
RW-shared spins 233, rounds 1293, OS waits 27
RW-excl spins 1310, rounds 9265, OS waits 220
RW-sx spins 32, rounds 428, OS waits 11
Spin rounds per wait: 5.55 RW-shared, 7.07 RW-excl, 13.38 RW-sx
------------------------
LATEST FOREIGN KEY ERROR
------------------------
2023-04-14 13:20:08 0x7f5d28f67700 Error in foreign key constraint of table roundcubemail/contactgroupmembers:
there is no index in referenced table which would contain
the columns as the first columns, or the data types in the
referenced table do not match the ones in table. Constraint:
,
CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE
The index in the foreign key in table is contactgroupmembers_contact_index
Please refer to Foreign Keys for correct foreign key definition.
------------
TRANSACTIONS
------------
Trx id counter 10550657
Purge done for trx's n:eek: < 10550656 undo n:eek: < 0 state: running
History list length 17
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 421513340879696, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 421513340862672, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 10550656, ACTIVE 0 sec
1 lock struct(s), heap size 1128, 0 row lock(s), undo log entries 1
MySQL thread id 95508, OS thread handle 140038095619840, query id 14033669 localhost 127.0.0.1 es_dpstbxv
---TRANSACTION 421513340871184, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 421513340883952, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 421513340866928, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
--------
FILE I/O
--------
Pending flushes (fsync) log: 0; buffer pool: 0
11529 OS file reads, 4819446 OS file writes, 4781843 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 983.75 writes/s, 984.25 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
0.00 hash searches/s, 4935.77 non-hash searches/s
---
LOG
---
Log sequence number 2044220626
Log flushed up to 2044220472
Pages flushed up to 1977753549
Last checkpoint at 1977753549
0 pending log flushes, 0 pending chkp writes
4778719 log i/o's done, 984.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 167772160
Dictionary memory allocated 3930168
Buffer pool size 8065
Free buffers 1
Database pages 8064
Old database pages 2956
Modified db pages 1748
Percent of dirty pages(LRU & free pages): 21.671
Max dirty pages percent: 90.000
Pending reads 0
Pending writes: LRU 0, flush list 0
Pages made young 20145, not young 490457
0.00 youngs/s, 0.00 non-youngs/s
Pages read 9938, created 29009, written 40482
0.00 reads/s, 6.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 8064, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 read views open inside InnoDB
Process ID=0, Main thread ID=0, state: sleeping
Number of rows inserted 4821171, updated 1782776, deleted 2062, read 26910736
982.50 inserts/s, 982.25 updates/s, 0.00 deletes/s, 1078.23 reads/s
Number of system rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================
 
Okay, after 500 times it works... i exportet the contacts table in phpmyadmin with targzip compression and tickout the "key matching". you have to try it only a few hundred times :D
 
I am not sure why only the contacts table is of interest when the whole operation system is being upgraded. The are many foreign key constraints between the tables, especially referencing the users tables. Another possibility to is to copy the whole roundcube database from the old to the new server. This assumes that the customers and users did not change.

Dump the table "roundcubemail" on the old server. Copy the file to the new server. Drop (after backup) the roundcube database on the new server and create it using "create database roundcubemail" query. Then import the dump into the database. Now enter the folder of the roundcube installation, according to https://support.plesk.com/hc/en-us/...rvices-logs-and-configuration-files#roundcube it is "/usr/share/psa-roundcube/". Execute the file "bin/update.sh". Despite its name it a php file and the shebang is set to php. But first check the installed roundcube version on the old server. If it is a RHEL derivate query rpm, e.g. "rpm -qa | grep roundcube". Execute the script using the second-newest php version provided by Plesk, e.g. "/opt/plesk/php/8.1/bin/php bin/update.sh". The database migration code will prompt for the the previous version, or for "?" in case it is unknown. On Centos7 with Plesk version 18.0.65 it is 1.4.15. Pass the roundcube version and the update script will apply the database migration. Finaly test the application.

Sources:
 
Back
Top