Friday, October 3, 2008

Migrating from Revelation to KeepassX

I finally found time to finish a little script that converts the XML output generated by Revelation to XML that is readable by KeePassX. This enables relatively easy migration from Revelation to KeePassX.

The script is pretty rudimentary, as it not able to convert all account types Revelation offers. This is partly because for my personal use, I only needed the basic account type Revelation offers (the one that has a username, a password and a url) and partly because Revelation can do things KeePassX simply cannot.

Revelation offers the possibility to store more than one attachment with an account, which KeePassX cannot do, for example. Also, it's not always easy to map Revelation account properties against KeePassX properties: Revelation has a much wider variety of properties and some overlap a bit (password and pin for example). It's probably possible to deduce what goes where, but I lack the time to do so.

In the future, I might come up with a script that just puts all the exotic Revelation properties into the comment field for KeePassX. That would be fairly clean and straightforward.

If you have Ruby installed you can just call the script with two arguments: the first argument is the filename of the Revelation export, the second argument is the desired output filename.

As it is a simple script, it will only work if you have all your entries stored in folders in Revelation. Having entries in the root element of the Revelation tree will not work, because KeePassX does not allow you to store individual entries in the root element (I hope this is clear enough).

Anyway, it's probably not a very good or elegant program, but it got the job done for me and might do the same for you.

If you find you miss some entries or parts of entries, it's probably the missing field tags that are the culprit. If you fix this, please send me a copy of the fixed script (the script is GPL'ed). If you cannot fix it yourself, tell me the problem, so if and when I have some spare time, I might look into it.

Sadly, neither Blogger nor the KeePassX forums allow attaching files to a post, so you'll have to mail me if you want to have a go. If there is actual community interest in the script, I'll try to find some place to publish it for real.

Disclaimer: I do not claim the script does what it should do perfectly. Please be careful. Please be careful to securely erase the XML files afterwards. Use the script at your own discretion and responsibility.

Update: I mailed the script to a couple of people who left comments below and it seems to be working pretty much okay. Send me an email at maxim at wzzrd . com if you want it.

Update 2: I finally found time to place the script online somewhere. You can download it here. I'd appreciate a comment if you download it to tell me how it worked for you.

19 comments:

trancos said...

Hi
Where i can find this script?

Thanks

david said...

Hi,

I'm just trying to do the same switch. Could you email or post your script?

Thanks.

Epyon Avenger said...

Could I get that script?

wzzrd said...

@all: I'm still not able to host the script properly. What I can do though, is mail you guys the script.

If you drop me an email at maxim at wzzrd point com, I'll send you the script as soon as I find the time to create a tarball of it.

dystopianfuture said...

Here's another way to convert from Revelation to Keepassx without any custom-build scripts.

The conversion also encrypted.

http://dystopianfuture.org/?p=72

cactusdigital.net said...

Gracias!
Funcionó muy bien este script.

Salu2

Santi said...

Kudos to you my friend!
Thanks for the script.

macks said...

I've added 2 or 3 missing fields required for my conversion to your script. Thanks for making it available.
The modified script is here: http://pastebin.com/f6c27259d

Alejandro said...

Thank you!, it was useful!

wzzrd said...

@macks: are you sure you used my scripts for this? Mine was in Ruby, yours is in Python. I actually prefer Python these and had thought of converting it, but you beat me to it :)

Thanks for sharing your script!

joboears said...

Could someone please post an example of how to use the script.

Thanks,
Joboears

Rüdiger Schulz said...

The script converts my revelation XML into antoher XML, but that file cannot be imported into keepassx. It says it is not a valid keepassx XML file.

Using keepassx 0.4.3 and Revelation 0.4.11 on Ubuntu Hardy.

Happs said...

Worked like a charm. Thanks much!

David van Coevorden said...

Thanks, it worked for me too.

Setyadi Fazrie said...

thanks, for your help. it very help me alot:D

Simone "eKoeS" Economo said...

Thank you!

Old Schepperhand said...

Did a little update on the original Script
which includes:
- generic-urls are also imported
- added expire element
- extended the conditionals to remove clutter from the group element

The Code can be found here
http://pastebin.com/BvuwuNh4

Thank you for the original script.
It did help me a lot.

Old Schepperhand said...

also put it on github so everyone can improve it ;)
https://gist.github.com/schewara/9196fd3b83b8f9cfb98d

holzwurm said...

didnt work for me, sorry.
Revelation 0.4.14
Keepassx 0.4.3
keepassx sais: no kpx import file
Any hint?