Title: Open and edit wallet.dat Post by: Satosh¡ Slot on July 04, 2014, 02:20:19 AM I've seen that it's possible to delete priv keys from wallet.dat with pywallet but I also would like to be able to clear local balance transfers between labels that bitcoind handles. Has anyone successfully did this?
The bitcoin wiki reveiles that: The data, index and log files are used by Oracle Berkeley DB, the embedded key/value data store that Bitcoin uses. I'm trying to install the Berkley Database now but wondering if there actually anyone that managed to edit things freely in the wallet.dat file. Thanks! Title: Re: Open and edit wallet.dat Post by: 2112 on July 04, 2014, 02:44:59 AM Yeah, just install the correct version of BerkeleyDB utilities. Then do a backup, modify/delete the unnecessary lines from the backup file (which is a text file) and restore back.
Please remember to create DB_CONFIG file with "set_lg_dir database" in the appropriate directory. Detail were discussed several time on this site, at least a year ago. Title: Re: Open and edit wallet.dat Post by: DeathAndTaxes on July 04, 2014, 03:17:17 AM Depending on what you are looking to do pywallet may be useful.
Title: Re: Open and edit wallet.dat Post by: Satosh¡ Slot on July 04, 2014, 03:51:37 AM Yeah, just install the correct version of BerkeleyDB utilities. Then do a backup, modify/delete the unnecessary lines from the backup file (which is a text file) and restore back. Please remember to create DB_CONFIG file with "set_lg_dir database" in the appropriate directory. Detail were discussed several time on this site, at least a year ago. Thanks, but I'm stuck at this, I manage to open wallet.dat and print it out in a format that appears to be too hard to see what I should delete. I don't fully understand the system so I don't even know how I open the database correctly and dump/import correctly. I only see giberish like ‰¼E W•r in the text file that the backup creates. EDIT: I can can do a proper text filel with db_dump, but I can still not see table names or anything like that. Title: Re: Open and edit wallet.dat Post by: Satosh¡ Slot on July 04, 2014, 03:58:44 AM I also don't understand how to be able to make sql queries to the database as I don't see any tables after loading wallet.dat. It just opens "main" db which I assume means that it didn't really open up wallet.dat at all.
Title: Re: Open and edit wallet.dat Post by: 2112 on July 04, 2014, 07:09:11 AM I also don't understand how to be able to make sql queries to the database as I don't see any tables after loading wallet.dat. It just opens "main" db which I assume means that it didn't really open up wallet.dat at all. Ah, sorry. You'll need to hit the textbooks about databases. BerkeleyDB is a form of NonSQL database called key-value-store. If you are at that stage where "database" has to support "sql queries" then you are at least semester away from understanding what's inside. Older editions of C.J.Date's book have most of the relevant material about "non-relational databases".Again, sorry. Title: Re: Open and edit wallet.dat Post by: Satosh¡ Slot on July 04, 2014, 06:30:21 PM I also don't understand how to be able to make sql queries to the database as I don't see any tables after loading wallet.dat. It just opens "main" db which I assume means that it didn't really open up wallet.dat at all. Ah, sorry. You'll need to hit the textbooks about databases. BerkeleyDB is a form of NonSQL database called key-value-store. If you are at that stage where "database" has to support "sql queries" then you are at least semester away from understanding what's inside. Older editions of C.J.Date's book have most of the relevant material about "non-relational databases".Again, sorry. Sure but I opened the database with dbsql that came with the Berkeley installation and I googled people using sql queries with that one. There's even a command to list tables but it returned nohing. I'll go RTFM if there's not some easy tools that makes it easy. Thanks! Title: Re: Open and edit wallet.dat Post by: virtualx on July 05, 2014, 03:13:07 PM I also don't understand how to be able to make sql queries to the database as I don't see any tables after loading wallet.dat. It just opens "main" db which I assume means that it didn't really open up wallet.dat at all. Ah, sorry. You'll need to hit the textbooks about databases. BerkeleyDB is a form of NonSQL database called key-value-store. If you are at that stage where "database" has to support "sql queries" then you are at least semester away from understanding what's inside. Older editions of C.J.Date's book have most of the relevant material about "non-relational databases".Again, sorry. Sure but I opened the database with dbsql that came with the Berkeley installation and I googled people using sql queries with that one. There's even a command to list tables but it returned nohing. I'll go RTFM if there's not some easy tools that makes it easy. Thanks! If it's NoSQL it's a little different from regular SQL. NoSQL has another data storage model. It varies based on database type. For example, key-value stores function similarly to SQL databases, but have only two columns ("key" and "value"), with more complex information sometimes stored within the "value" columns. Document databases do away with the table-and-row model altogether, storing all relevant data together in single "document" in JSON, XML, or another format, which can nest values hierarchically. |