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
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
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.