Opened 4 years ago

Closed 4 years ago

#1485749 closed Tasks (wontfix)

Manually import contacts into adressbook DB

Reported by: doogie Owned by:
Priority: 3 Milestone: later
Component: Addressbook Version: 0.2-stable
Severity: minor Keywords:
Cc:

Description

Hi Roundcube Team

This is how I successfully imported my contacts into roundcube. I would like to share this description to the community.

Preconditions. You need

  • Roundcube (obviously)
  • all the adresses you would like to import in CSV (or vCard) format
  • direct SQL access to the roundcube Database (e.g. via phpMyAdmin)
  • at least some knowledge of easy DB & SQL :-)

1) EXPORT

I export all my adresses from my favorite Adressbook application as one big vCard file. Then I convert this vCard file to the much simpler CSV format with this great litte online tool: http://labs.brotherli.ch/vcfconvert/ I think if you are on Outlook, you can directly export to CSV

2) CLEANUP

Then I open this CSV file in OpenOffice? Calc (Excle is fine too) and delete all colums except "firstname, surname, name, email". The remaining four columns have to be exactly in that order an there must not be a header row. (Also take care of encoding, if you use non english characters, UTF-8 is always a good choice.)

3) IMPORT

Now import that CSV file with phpMyAdmin:
First you have to find out your roundcube internal user_id. Simply browse the table roundcube.users and you'll find it. (I'll asume '1' here.)

Open the table roundcoube.contacts. Its ok if there are already some contatcs in there. Click on import. Chose CSV. Set "fields terminated by" and "fields delimited by" according to your CSV file. Now the important part. Into the last field "Column names" paste exactly the name of your columns from the database table roundcube.contacts: "firstname, surname, name, email" (Remember! The order in your CSV has to be exactly like this.!)

Click on GO

4) FINISH

One last step: Now you have to link the newly important contacts to your user_id. By default they are linked to the dummy user_id '0'. So commit the following SQL:

update contacts set user_id = 1, changed = NOW() where user_id = 0

Thats it. Good luck.

Change History (2)

comment:1 Changed 4 years ago by thomasb

  • Milestone changed from 0.5-beta to later

RoundCube is actually able to import vCard files directly...

comment:2 Changed 4 years ago by alec

  • Resolution set to wontfix
  • Status changed from new to closed

I think we can close this.

Note: See TracTickets for help on using tickets.