Notifications
Clear all

Import Contacts

14 Posts
7 Users
1 Reactions
1,198 Views
 AtuM
(@atum)
Joined: 2 years ago
Posts: 4
Topic starter  

Is there a way to import a contact list (csv) into carbonio account?

 


   
Quote
(@arman)
Admin
Joined: 4 years ago
Posts: 395
 
Posted by: @atum

Is there a way to import a contact list (csv) into carbonio account?

 

Hi @atum,

This functionality is not yet supported for the users to add a whole CSV file including contacts into their accounts. However, we are steadily adding more and more features to Carbonio CE but it takes a lot of time to implement all these functionalities.


   
ReplyQuote
 AtuM
(@atum)
Joined: 2 years ago
Posts: 4
Topic starter  

Hi.

Is there a way to do it via an api from command line? 


   
ReplyQuote
(@sharif)
Admin
Joined: 2 years ago
Posts: 591
 

@atum 

Hi Atum,

Our developer team is working on the backup/restore feature
of Carbonio CE. Which will ultimately help our users to
perform this kind of activity (Export/Import). But as you can understand implementing and integrating such features needs to go through lots of testing. So we would request you to be with us and as soon as we have any update in this regard, we will share it with our users via the forum, and social media.

Thank you so much for your understanding.

Regards


   
ReplyQuote
 AtuM
(@atum)
Joined: 2 years ago
Posts: 4
Topic starter  

Thanks for clearing this up for me. Your work is much apprechiated.


   
ReplyQuote
(@emily-kennewell)
Joined: 9 months ago
Posts: 1
 

Any changes since 2022? I don't want to create a new thread.


   
ReplyQuote
(@sharif)
Admin
Joined: 2 years ago
Posts: 591
 

@emily-kennewell 

Hi,

you can import contacts using CLI:

First, collect all the contacts from the source server:

for i in $(zmprov -l gaa oldserver.xyz);do zmmailbox -z -m $i getRestURL "/Contacts?fmt=csv" > /opt/zimbra/backup/$i.csv; echo -e "Finished downloading Contacts of $i";done

Then transfer them to the destination/Carbonio CE server using scp/rsync on /opt/zextras/backup directory or any of your preferred directories.

Upload the contacts to the destination (Carbonio CE) server:

for i in $(carbonio prov -l gaa oldserver.xyz);do zmmailbox -z -m $i -t 0 postRestURL "/Contacts?fmt=csv"  /opt/zextras/backup/$i.csv; echo -e "Finished uploading Contacts of $i"; done

Make sure all users are created, before uploading the contacts.

You may need to monitor for any issues, but otherwise, it works smoothly.

Regards,

Sharif

This post was modified 9 months ago by Md. Shariful Islam

   
ReplyQuote
(@mj-oziolab)
Joined: 9 months ago
Posts: 5
 

Hello,

 

Thank's for this information.

I a have tested for calendar ... and its fail ...

Have-you a idea or diag pathing ?

zextras@mail:~$ zmmailbox -v -z -m user@domain.tld postRestURL '/Calendar?fmt=ics' /opt/zextras/backup/user@domain.tld.ics
ERROR: zclient.IO_ERROR (Connection refused) (cause: java.net.ConnectException Connection refused)
com.zimbra.common.zclient.ZClientException: Connection refused
ExceptionId:main:1707300567743:37aca48f58b1b9a7
Code:zclient.IO_ERROR
	at com.zimbra.common.zclient.ZClientException.IO_ERROR(ZClientException.java:37)
	at com.zimbra.client.ZMailbox.postRESTResource(ZMailbox.java:3886)
	at com.zimbra.cs.zclient.ZMailboxUtil.doPostRestURL(ZMailboxUtil.java:3846)
	at com.zimbra.cs.zclient.ZMailboxUtil.execute(ZMailboxUtil.java:1998)
	at com.zimbra.cs.zclient.ZMailboxUtil.main(ZMailboxUtil.java:3711)
Caused by: java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.connect0(Native Method)
	at java.base/sun.nio.ch.Net.connect(Net.java:579)
	at java.base/sun.nio.ch.Net.connect(Net.java:568)
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base/java.net.Socket.connect(Socket.java:633)
	at java.base/java.net.Socket.connect(Socket.java:583)
	at java.base/java.net.Socket.<init>(Socket.java:507)
	at java.base/java.net.Socket.<init>(Socket.java:287)
	at java.base/javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:271)
	at com.zimbra.common.net.ProtocolSocketFactoryWrapper.createSocketFromHostInfo(ProtocolSocketFactoryWrapper.java:84)
	at com.zimbra.common.net.ProtocolSocketFactoryWrapper.createSocket(ProtocolSocketFactoryWrapper.java:39)
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:119)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
	at com.zimbra.common.httpclient.HttpClientUtil.executeMethod(HttpClientUtil.java:62)
	at com.zimbra.common.httpclient.HttpClientUtil.executeMethod(HttpClientUtil.java:39)
	at com.zimbra.client.ZMailbox.postRESTResource(ZMailbox.java:3876)

   
ReplyQuote
(@sharif)
Admin
Joined: 2 years ago
Posts: 591
 

@mj-oziolab 

Hi,

Set publicservicehostname, port and protocol in your server and try again.

carbonio prov md $(hostname -d) zimbraPublicServicePort 443
carbonio prov md $(hostname -d) zimbraPublicServiceProtocol https
carbonio prov mcf zimbraPublicServiceHostname $(hostname -f)
zmmailboxdctl restart

Let us know how it goes.

Regards,

Sharif


   
ReplyQuote
(@mj-oziolab)
Joined: 9 months ago
Posts: 5
 

@sharif Yes, its work's !

Perhaps this value is bad define when ip is private from fresh install ?

Thanks you👍 

 

Have a good day.

 

 

 


   
ReplyQuote
(@sharif)
Admin
Joined: 2 years ago
Posts: 591
 

@mj-oziolab 

Hi,

Glad to know that it worked.

But I'm sorry, I did not understand your comment. Could you please elaborate a little more, if you feel so?

Regards,

Sharif


   
ReplyQuote
(@mj-oziolab)
Joined: 9 months ago
Posts: 5
 

@sharif

I meant that this setting was not defined when you are in a private IP?


   
ReplyQuote
 Klug
(@klug)
Joined: 13 years ago
Posts: 65
 

You have to give your server (VM, VPS) a name (FQDN) and setup Carbonio (the domain you're using) with that name.
Public or private IP, it's quite the same, a FQDN is needed.


   
ReplyQuote
(@rosch)
Joined: 10 months ago
Posts: 22
 

Posted by: @atum

Is there a way to import a contact list (csv) into carbonio account?

Under Contacts, right-click on one of your groups e.g. Contacts, then last option is Import csv file.

Tested successfully with a simple file in Carbonio CE 24.3.0:

First Name,Last Name,email
Jane,Doe,Jane@doe.com

   
ReplyQuote