PDA

View Full Version : Berkely DB to Text



moonshield
02-20-2005, 10:17 AM
Does anyone know how I could convert a Berkely Database to a Text Delimited Database?

Thanks.

Chris
02-20-2005, 10:28 AM
What is a berkely database formatted like?

Joachim
02-20-2005, 11:31 AM
Is this a one time only thing, or will it be needed regularly ?

moonshield
02-20-2005, 12:50 PM
one time thing,

the database is a flat file with what looks like a binary header and then plain text with identifers throughout. I do not really know too much about Berkley DB.

Joachim
02-20-2005, 01:28 PM
If you query google there's some talk about movabletype providing
a script to convert their Berkeley db to mysql. Maybe you can take a look at those scripts and see if you can adapt them.

Another option depending on how big /complex that Berkley db is.

Write a script to connect to the Berkley from within your favorite language(php,perl,...) and setup another connection to your mysql db
and select - insert it that way.

Joachim

moonshield
02-20-2005, 03:52 PM
If you query google there's some talk about movabletype providing
a script to convert their Berkeley db to mysql

I see that, that is what I am gonna try to do.

moonshield
02-21-2005, 04:24 PM
Er, I just copied (copy and pasted) the whole thing by hand, it took a little while to copy 9000 records. my hand hurts now,

Joachim
02-24-2005, 03:27 PM
EEK :eek:

moonshield
02-24-2005, 03:31 PM
hehe, actually I am not yet done. a few more hours. I have been going at it for about 10 hours so far. but the end product is amazing IMO.

Joachim
02-24-2005, 03:39 PM
Maybe I should point you to the backup thread ;)

moonshield
02-24-2005, 03:43 PM
lol, i back it up every 30 min. I don't want to lose that thing.

See what I am doing is doing the database in Access and then exporting into text and then importing into MySQL.