Author

Topic: Dumpwallet not available. What to use instead of it? (Read 156 times)

jr. member
Activity: 42
Merit: 66
nc50lc,

Thank you very much!

And I have got a new challenge with this wallet :-)

I'll start a new topic about it :-)


legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
-snip-
So it doesn't want to launch properly just with the wallet.dat that "doesn't belong to it" :-)
Can one draw conclusion that this method doesn't work?
-snip-
UPDATE: It worked!!!! I'll write later how I did it!
But I was waiting over 2 hours until Core launches and start running. I didn't try to shut it down (because it takes so long time to launch), I was just waiting.
And it worked.
After it launched, the right wallet with right balance and history was shown.
It just had to rescan the blockchain for the newly replaced wallet.dat,
since the newer Bitcoin Core has "fresher" blockchain, it took a while to reach the tip.
As a bonus, your old wallet.dat's balance appeared since its transactions are probably within the older blocks that the newer Core has.

For comparison, rescan will take way more hours than that if your Bitcoin Core is fully synced.
jr. member
Activity: 42
Merit: 66
nc50lc,

Yes 2 Core on the same PC. But I have 2 users on it. Both of them are me, one user is like "for serious business", another one is like for "things other than work".
So these 2 Core belong to two different users and can run independently.

They are synced also different way, the newer Core has more "fresh" sync than the older Core.

Unfortunately, it did not work with using  wallet.dat from older Core on the newer Core.

I tried several times and the newer Core reacted by different ways on it:

- didn't launch for a very long time
- tried to launch but said "corrupt wallet.dat"
- Launched but created a new wallet.dat, with no transaction history, no balance etc.

Core was changing wallet.dat during every attempt to launch. And every time by different way! :-)

After every attempt  I was closing Core and replacing changed older wallet.dat with original older wallet.dat.

Btw, when I replaced older wallet.dat with newer wallet.dat (the original one for this Core), then it launched perfectly OK.

So it doesn't want to launch properly just with the wallet.dat that "doesn't belong to it" :-)

Can one draw conclusion that this method doesn't work?

Or may be the difference in sync is the problem? If this is the problem, may be it is possible to try  with replacing not only wallet.dat, but also with replacing sync data?
May be this will work?
If you think this may work, please tell me which data on newer Core should be replaced with the data from older Core.
Which files and folders.

Another solution I can imagine: Create the 3-d user on old PC, install latest version of Core there quite simple way, try replacing wallet.dat.

Are there chances this will work?

UPDATE: It worked!!!! I'll write later how I did it!

UPDATE: Here is how it was done.

This option

1. back up wallet.dat of this newer Core.
2. replace it with copied wallet.dat of older Core.'
3. dumpwallet.
4. Replace wallet.dat with original one.

But I was waiting over 2 hours until Core launches and start running. I didn't try to shut it down (because it takes so long time to launch), I was just waiting.
And it worked.
After it launched, the right wallet with right balance and history was shown.
And I was able to do dumpwallet.


The issue is solved.

Many thanks guys for your replies and advices!


legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
May be I don't need to download anything at all?

Because I have 2 Core on the old PC. And another one is version with dumpwallet.

I can use it this way:

1. back up wallet.dat of this newer Core.
2. replace it with copied wallet.dat of older Core.'
3. dumpwallet.
4. Replace wallet.dat with original one.
Two different Core versions in the same old PC?
Without using the command line argument -datadir, those two should've used the same data directory thus, same wallet.dat file.
Or did you already know how to use -datadir which separates the two Bitcoin Core?

Anyways, that'll do, but make sure that Bitcoin Core isn't running while switching the wallet.dat files.
legendary
Activity: 3248
Merit: 2971
Block halving is coming.
I can use it this way:

1. back up wallet.dat of this newer Core.
2. replace it with copied wallet.dat of older Core.'
3. dumpwallet.
4. Replace wallet.dat with original one.

Will it work?

it should work even if you don't need to do the 4th step just delete your old wallet.dat it the core itself will generate a new wallet.dat.

You can also install the latest Bitcoin core on your new PC and transfer the old wallet.dat file there but the problem is that it is not safe if you dump a wallet from a PC connected to the internet.

Just always make sure before you do anything from your old wallet make sure you already have a backup copy of your old wallet if anything goes wrong while upgrading it to the latest version you can recover it by using pywallet.
jr. member
Activity: 42
Merit: 66
nc50lc,

Thank you for sharing your opinion about verifying.

Here I am developing further your idea with not overwriting Core.

May be I don't need to download anything at all?

Because I have 2 Core on the old PC. And another one is version with dumpwallet.

I can use it this way:

1. back up wallet.dat of this newer Core.
2. replace it with copied wallet.dat of older Core.'
3. dumpwallet.
4. Replace wallet.dat with original one.

Will it work?
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
Is it important to verify signatures on Core download anyway, even if it will never be launched online?
I left that so you can decide for yourself, since IMO it's not necessary for air-gap PC as long as the source is legit.
But If I were to decide, I'd still verify the signature in the online PC where it's downloaded before transferring it to the air-gap PC.
See, I also have contradicting answers  ;D
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
Probably upgrading Core is a more simple and convenient option. To backup wallet.dat first, then upgrade. I can download the new version installation file to new PC, then transfer it to the old PC where Core is located  and upgrade offline.
Will it work this way?
Yes, but if you do not want to touch your old datadir and old bitcoin installation (for some reason) you don't even have to install over your old Bitcoin Core.
Just install it somewhere else (a different folder) and launch it with extra parameters to use different datadir with a copy of your wallet.dat file.

Example process:
  • Install the latest version of Bitcoin Core to a different directory; e.g.: in "C:/Program Files/bitcoin-latest"
  • Create your "other" bitcoin data directory in any folder and make a folder named "wallets" inside it; e.g.: in "C:/bitcoin_temp"
  • Paste a copy of your wallet.dat inside that "wallets" folder (note: without the quotation marks), I'd suggest you to rename it into something else like old_wallet.dat
  • Go to "bitcoin-latest" install directory and find Bitcoin-qt and create a shortcut (Right-click->Create shortcut)
  • Open the created shortcut's Properties (Right-click->Properties) and add --datadir=C:/bitcoin_temp to the "Target"
  • So Target should look like: "C:\Program Files\bitcoin-latest\bitcoin-qt.exe" --datadir=C:\bitcoin_copy
  • Open Bitcoin Core using that shortcut and the wallet should be selectable in "File->Open wallet" menu.
  • Then use dumpwallet.

Either this or use pywallet.
jr. member
Activity: 42
Merit: 66
nc50lc,
BitMaxz,


Thank you for your replies.
I see....
Probably upgrading Core is a more simple and convenient option. To backup wallet.dat first, then upgrade. I can download the new version installation file to new PC, then transfer it to the old PC where Core is located  and upgrade offline.
Will it work this way?
Is it still necessary to verify signatures if the upgraded Core is supposed to never go online?

As to pywallet tool, is it safe? Does one need to verify signatures on download?
I never used python and don't know how it works. But I can learn of course if I choose this option.
Is it safe to download Python?

I just try to find best combination of security and convenience/simplicity. Not because I am lazy, but because I do many things for the first time, and need to learn them first.

NeuroticFish,

Thank you for your reply.
Yes, I did dumpprivkey for all visible addresses.
But some amounts may be on change addresses, and change addresses are available only through dumpwallet (as much as I know).
When I was experimenting with another Core, I found my btc on change addresses.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
I will add that if by chance you know the relevant addresses and they're not too many you can also do dumpprivkey for each address separately.
This way you don't need external tools.

If your wallet is password protected, you'll need something like:

Code:
walletpassphrase "your password" 600
dumpprivkey "your address"
legendary
Activity: 3248
Merit: 2971
Block halving is coming.
If your Bitcoin core doesn't have that option then like the above said pywallet is your option to dump the wallet.

You can download the this tool from here https://github.com/jackjack-jj/pywallet
Then don't forget to download and install python 2.7 in your PC/laptop to make this tool work.

Then use this command below

Code:
python pywallet.py --dumpwallet --wallet=wallet.dat
You must open the command prompt on the same folder where your wallet.dat is located.
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
I prefer not to upgrade the version.
Unfortunately, if your offline Bitcoin Core is lower than version v0.9.0, dumpwallet wont be available
and there's no alternative command since it's added to do its job which the previous version do not have.

The only way to export all of the private keys in one go without upgrading to an earlier version is to use third-party tools like pywallet.
jr. member
Activity: 42
Merit: 66
Hi guys,

I tried to dumpwallet my another old Core but discovered that its version doesn't have "dumpwallet" option on console.

Though it worked with dumpprivkeys. But I need all private keys and addresses.

Is there any other possibility which can replace "dumpwallet" with the same result, getting private keys and addresses?

I prefer not to upgrade the version.

Thank you!

Here is the list of options from console:


 
addmultisigaddress <'["key","key"]'> [account]
addnode
backupwallet
createmultisig <'["key","key"]'>
createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}
decoderawtransaction
dumpprivkey
encryptwallet
getaccount
getaccountaddress
getaddednodeinfo [node]
getaddressesbyaccount
getbalance [account] [minconf=1]
getblock
getblockcount
getblockhash
getblocktemplate [params]
getconnectioncount
getdifficulty
getgenerate
gethashespersec
getinfo
getmininginfo
getnewaddress [account]
getpeerinfo
getrawmempool
getrawtransaction [verbose=0]
getreceivedbyaccount [minconf=1]
getreceivedbyaddress [minconf=1]
gettransaction
gettxout [includemempool=true]
gettxoutsetinfo
getwork [data]
help [command]
importprivkey [label] [rescan=true]
keypoolrefill
listaccounts [minconf=1]
listaddressgroupings
listlockunspent
listreceivedbyaccount [minconf=1] [includeempty=false]
listreceivedbyaddress [minconf=1] [includeempty=false]
listsinceblock [blockhash] [target-confirmations]
listtransactions [account] [count=10] [from=0]
listunspent [minconf=1] [maxconf=9999999] ["address",...]
lockunspent unlock? [array-of-Objects]
move [minconf=1] [comment]
sendfrom [minconf=1] [comment] [comment-to]
sendmany {address:amount,...} [minconf=1] [comment]
sendrawtransaction
sendtoaddress [comment] [comment-to]
setaccount
setgenerate [genproclimit]
settxfee
signmessage
signrawtransaction [{"txid":txid,"vout":n,"scriptPubKey":hex,"redeemScript":hex},...] [,...] [sighashtype="ALL"]
stop
submitblock [optional-params-obj]
validateaddress
verifymessage
Jump to: