Ubuntu: How export contacts of ubuntu one?



Question:

How export contacts of Ubuntu one in 12. 10?

Another questions (possible duplicates) is about old versions, and packages like evolution-couchdb are removed in previous versions, thunderbird don't support couchdb.

I can see my contacts in https://one.ubuntu.com/contacts/.


Solution:1

There is a script that creates a vCard file from the data that is stored in Ubuntu One online couchdb. You will need to install python-vobject package for it to work.

wget http://people.canonical.com/~roman.yepishev/us/bin/ubuntuone-addressbook-export  python ubuntuone-addressbook-export addressbook.vcf  

The address book entries will be written to addressbook.vcf.


Solution:2

For now, the contacts are still backended to CouchDB. This will stop being the case over the next few months (this should get updated when that happens).

What you need to do is determine the right endpoint for your couchdb instance on the server, and then query that using the couchdb REST API. As all these requests need to be OAuth-signed, it's not trivial to do; there is Roman's tool that will put the credentials into environment variables you can use to build URLs for curl or wget, there is a helper u1oauthrequest (part of the old ubuntuone-couch) that gets your credentials from the keyring, signs the given URL, and prints the result. There is a little script I just threw together from scripts used by people on my team.

If you save the latter in a file called u1couch-backup.py, you can then call it via

python u1couch-backup.py  

and it should print out the information about your contacts database. If you want to get the list of documents you'd do

python u1couch-backup.py /contacts/_all_docs  

and if you want the actual documents and not just the ids and revnos you'd do

python u1couch-backup.py /contacts/_all_docs?include_docs=true  

The whole thing is quite unreliable to be honest so you might need to retry a couple of times, or retry at a less-busy time, which is why we flagged it for EOL over a year ago. The move to u1db should make this quite a lot better (soon!), at which point I'll update this answer.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »