Due to a system crash, I had to do a fresh install on a new computer. Luckily my harddisk was not affected — but unfortunately the "good old 8.04" didn't want to boot from it on the new system…
So with 12.04 installed on a fresh harddisk, I copied all evolution folders from the old disk to the corresponding locations (~/.evolution plus ~/.gconf/apps/evolution — the old Evo on 8.04 had no ~/.local/share/evolution), and started the app. The migration assistant popped up, and I went through — but in the end, only one of my "accounts" in each category was migrated and available: local mail, one of 4 IMAP accounts (though data of all 4 accounts where moved to ~/.local/share/evolution), one of 4 address books, and so on.
Not a big deal for the IMAP stuff, as I just had to configure it (data are stored on the server in this case). But how can I get my addressbooks back? As described above, starting the "old installation" to export those data is not an option, as the old system cannot be started anymore. Is there a way to fire the migration assistant for a given dataset (in my case: tell it to just migrate-and-import a single specified addressbook)?
Best Answer
The above PHP got me started. But I had problems with junk in the cards.
I am a Python guy, so I wrote a new program in Python. I used Python 2.x to run this.
This uses a Python dictionary to keep track of email addresses already seen from address cards, and it only stores a given address once. This solved another problem I had, of duplicate card records.
I think the binary junk between the cards was used by Evolution to figure out which cards were valid. This program just uses a couple of rules of thumb: if a card has garbage binary characters in it, or isn't properly terminated, or doesn't have an email address in it, it's a bad card and goes in the "bad" output file.
After you are done converting, you can check the "bad" output file and see if there is anything in there that isn't in the .vcf output file. In my case, there wasn't; this program got all the good cards for me.