Question
How do I import a single contact into Roundcube for Mysql?
Answer
Importing/restoring only Roundcube contacts for a single user from a backup is possible.
It's always a good idea to create a backup of the Roundcube database before making changes:
mysqldump roundcube > roundcube-backup.sql
How to find which users have MySQL Roundcube contacts
Within a cPanel backup, the Roundcube sql should be under:
./mysql/roundcube.sql
The extracted roundcube.sql should be edited to only have the contact insert that starts with:
INSERT INTO `contacts`
Find the current user_id who is having the contacts restored. For example, replace USER with the cPanel user name, which should return user_id and some other info.
select * from identities where name = 'USER'\G
Make sure the user_id returned from the MySQL query matches the one from the cPanel backup; change if needed.
Import the modified .sql file:
mysql
use roundcube;
source edited-roundcube.sql