Roundcube Community Forum

 

Import address book from older version?

Started by rosslaird, December 15, 2007, 02:42:53 PM

Previous topic - Next topic

rosslaird


I have upgraded to the newest version, but after having some difficulty with the upgrade I decided just to create a new database to hold the data. The old database is still there, and it has my address book in it. Is there a way (there must be a way) to import those addresses into the address book for the new version? (I can copy and paste an SQL query, and I can follow instructions, but that's about the extent of my database knowledge.)

Ross

rosslaird

OK, I solved it after poking around. For others who might be interested, here's what I did:

In the phpmyadmin interface, I selected the contacts table from the older version and exported it to an sql file. Then I imported it, but I made one small change to one line of the exported file. I changed:

INSERT INTO `contacts` (`contact_id`, `changed`, `del`, `name`, `email`, `firstname`, `surname`, `vcard`, `user_id`) VALUES
To:

INSERT IGNORE INTO `contacts` (`contact_id`, `changed`, `del`, `name`, `email`, `firstname`, `surname`, `vcard`, `user_id`) VALUES
I just added that one word "IGNORE". That way, when I selected the new table and chose 'import,' mysql did not complain about duplicate entries from the exported file (which did happen without the IGNORE.)

Anyway, it seemed straightforward enough.

Ross