kohlanta (OP)
Newbie
Offline
Activity: 17
Merit: 0
|
|
January 24, 2013, 10:55:31 PM |
|
I am running 2 bitcoind instances on ubuntu 12.04.1 LTS server, wallet a and wallet b. The version info from getinfo() for wallet a is "version" : 60300, "protocolversion" : 60001, "walletversion" : 60000,
The version info from getinfo() for wallet b is "version" : 70200, "protocolversion" : 60002, "walletversion" : 60000,
If I try to export wallet.dat from wallet a, put it in an empty .bitcoin directory and run it with the latest client version (7.0.2) I get the following error Bitcoin: wallet.dat corrupt, salvage failed
Obviously wallet b will run with the latest client as seen in the version output. This leads me to believe that the issue is the protocol version. For some reason 60001 is incompatible with the latest client, and 60002 is. So, here is the 10 btc question: How can I get wallet a to run on the latest client? It doesn't work for me to just transfer the balance to a new wallet, because I need the addresses in wallet a. Also, wallet a has a bunch of addys. It's around 1 gb in size. First person to post a solution that I can get to work wins the 10 btc. Thanks in advance!
|
|
|
|
Raoul Duke
aka psy
Legendary
Offline
Activity: 1358
Merit: 1002
|
|
January 24, 2013, 11:04:11 PM |
|
Try to detach databases on shutdown and then replace the wallet. You have to do that when upgrading from 0.6.x to 0.7.x Not sure if you should also copy the blockchain data, to make it think you are upgrading. BTW, this is a wild guess
|
|
|
|
kohlanta (OP)
Newbie
Offline
Activity: 17
Merit: 0
|
|
January 24, 2013, 11:06:57 PM |
|
Try to detach databases on shutdown and then replace the wallet. You have to do that when upgrading from 0.6.x to 0.7.x Not sure if you should also copy the blockchain data, to make it think you are upgrading. BTW, this is a wild guess a wild guess is better than none. how do I "detach databases on shutdown"?
|
|
|
|
Raoul Duke
aka psy
Legendary
Offline
Activity: 1358
Merit: 1002
|
|
January 24, 2013, 11:10:14 PM |
|
On the options window there is a checkbox with that text. Check it. Close the client. It will take a few minutes to completely close while it detaches the DB's. Your best option will be to probably copy the entire bitcoin data dir to the new location, instead of copying just the wallet.dat. Don't forget to backup any data before replacing it. <--- can't be said enough times
|
|
|
|
kohlanta (OP)
Newbie
Offline
Activity: 17
Merit: 0
|
|
January 24, 2013, 11:15:55 PM |
|
On the options window there is a checkbox with that text. Check it. Close the client. It will take a few minutes to completely close while it detaches the DB's.
I'm using the headless client on a server, so there must be a flag or something. I usually shutdown by doing
|
|
|
|
Raoul Duke
aka psy
Legendary
Offline
Activity: 1358
Merit: 1002
|
|
January 24, 2013, 11:17:12 PM Last edit: January 24, 2013, 11:31:00 PM by psy |
|
Start bitcoind with and after shut it down as usual. EDIT: Reading further I found that the wallet.dat is always detached at shutdown.
|
|
|
|
kohlanta (OP)
Newbie
Offline
Activity: 17
Merit: 0
|
|
January 24, 2013, 11:28:05 PM |
|
Start bitcoind with and after shut it down as usual. Let me make sure I have this straight. I start wallet a with bitcoind -detachdb=1, then stop it with bitcoind stop, then take the wallet.dat for wallet a and try to run the latest client with it?
|
|
|
|
Raoul Duke
aka psy
Legendary
Offline
Activity: 1358
Merit: 1002
|
|
January 24, 2013, 11:33:28 PM |
|
Yup, that would be it.
Also: Read my edit above.
|
|
|
|
nethead
|
|
January 24, 2013, 11:52:26 PM |
|
Ideas i got: 1. import your wallet.dat to blockchain, and extract it from there (maybe it will fix it) 2. There is a program somewhere around here, that extracts the private keys from the wallet.dat file (and then you import them to the other wallet) 3. I tried googling how to get private keys from old wallet, and got manyyy results, i think you will too Hope i helped a little, and even a little part of those 10 btc would make me very happy (im trying to find the program name) EDIT: blockchain.info can also hand you your private keys after you imported the wallet.dat see https://blockchain.info/wallet/import-wallet
|
|
|
|
Raoul Duke
aka psy
Legendary
Offline
Activity: 1358
Merit: 1002
|
|
January 25, 2013, 12:00:53 AM |
|
nethead, blockchain.info My Wallet has a limit of 400 private keys in each wallet. That's probably an important detail to keep in mind. I would need 10 or more My Wallet accounts to be able to import my 15MB wallet.dat with 4000+ addresses. OP says his wallet.dat is 1GB in size.
|
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
|
January 25, 2013, 12:02:25 AM |
|
The stop RPC command can also take an optional argument to force (or prevent) a full database detach.
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
nethead
|
|
January 25, 2013, 12:13:30 AM |
|
nethead, blockchain.info My Wallet has a limit of 400 private keys in each wallet. That's probably an important detail to keep in mind. I would need 10 or more My Wallet accounts to be able to import my 15MB wallet.dat with 4000+ addresses. OP says his wallet.dat is 1GB in size.
Didnt know that, and didnt see the 1gb part, sorry from my side. The other way with the program that exports the keys so do it i guess, but still didnt find the name of it, im sure it here in the forum though
|
|
|
|
Raoul Duke
aka psy
Legendary
Offline
Activity: 1358
Merit: 1002
|
|
January 25, 2013, 12:14:40 AM |
|
The other way with the program that exports the keys so do it i guess, but still didnt find the name of it, im sure it here in the forum though
pywallet
|
|
|
|
nethead
|
|
January 25, 2013, 12:16:36 AM |
|
The other way with the program that exports the keys so do it i guess, but still didnt find the name of it, im sure it here in the forum though
pywallet Yup thats it, i really hope that if the way you previously said does not work pywallet will, split reward
|
|
|
|
kohlanta (OP)
Newbie
Offline
Activity: 17
Merit: 0
|
|
January 25, 2013, 12:25:22 AM |
|
ok, im looking into pywallet.
|
|
|
|
Raoul Duke
aka psy
Legendary
Offline
Activity: 1358
Merit: 1002
|
|
January 25, 2013, 12:30:24 AM |
|
ok, im looking into pywallet.
pywallet will only help you to retrieve/dump your private keys in bulk. You'll still need to find a way to import them on a new wallet, beacuse AFAIK pywallet only let's you import 1 private key at a time. BTW, could you do one small thing, just to troubleshoot? Can you rename your wallet a and let the 0.6.1 client create a new wallet.dat and try running that newly created wallet on the 0.7.2 client, just to see if it works? Or maybe you already did that
|
|
|
|
bitfarmer
Newbie
Offline
Activity: 24
Merit: 0
|
|
January 25, 2013, 01:25:55 AM |
|
A 1 gb wallet? Yikes! Dare I ask how and why?
|
|
|
|
paraipan
In memoriam
Legendary
Offline
Activity: 924
Merit: 1004
Firstbits: 1pirata
|
|
January 25, 2013, 01:28:42 AM |
|
... Bitcoin: wallet.dat corrupt, salvage failed
... First of all try running the wallet A with "-detachdb=1", as psy suggested, and then stop it so you have a consistent database file (wallet) before you copy it over. If it doesn't work you can use the db4.8_dump and db4.8_load utilities to recover it completely. You may need to install db4.8-util package first. db4.8_dump -p wallet.dat >wallet.txt Import the purged dump again: db4.8_load -f wallet.txt wallet.dat.new Replace wallet.dat with wallet.dat.new, and start bitcoin.
|
BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
|
|
|
kohlanta (OP)
Newbie
Offline
Activity: 17
Merit: 0
|
|
January 25, 2013, 01:31:44 AM |
|
I think pywallet plus some scripting will do the trick. I'll check back in here when/if I get it to work and hit you guys up for payment addresses for the bounty.
|
|
|
|
kohlanta (OP)
Newbie
Offline
Activity: 17
Merit: 0
|
|
January 26, 2013, 01:10:24 AM |
|
ok, pywallet works well to get the privkeys from wallet a, but unfortunately it is not designed to work with wallets with versions later than 32500, so when I try to import into a new wallet, the wallet gets corrupted.
So, I am very close, and I like this bulk import/export method because I can prune this giant wallet I have, but I am at a loss how to import the addresses. The new client has the importprivkey function, but it takes 1-2 minutes per address to import.
Does anyone know a way to import privkeys into a wallet quickly?
|
|
|
|
|