Author

Topic: Export private keys of wallet.dat using BTCrecover (Read 231 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
(under certain conditions restaured wallet file backups of older legacy wallet.dat files, those that contained only random private keys which weren't derived by any determinism, could lead to a loss of coins when the key pool size of backup and replaced wallet differed).
The good thing about pre-HD wallets after version 0.15 (Q4 2017) which OP's wallet fall into category, is the keypool size is set to a generous amount of 1000keys.
So unless OP exhausted all of those reserved after he made the backup, his coins should still be safe.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
I wonder why you couldn't dump or export the private keys which should be done only if you understand the risks of doing so and have a suitable and secure offline working environment.

AFAIR Bitcoin Core 0.16.0 from beginning of 2018 started to create HD wallets by default. It did read older wallet.dat files, of course. Is your wallet from 2018 a HD wallet? If yes, then private keys and addresses are derived deterministically and frequent backups can't cause an issue if a wallet backup file has to be restaured (under certain conditions restaured wallet file backups of older legacy wallet.dat files, those that contained only random private keys which weren't derived by any determinism, could lead to a loss of coins when the key pool size of backup and replaced wallet differed).

Do you have an idea what might have corrupted your wallet.dat?
newbie
Activity: 5
Merit: 0
Finally I have been able to recover a copy of the wallet from a very old usb. It works!!!!

Always always always make copies of your wallet.dat!!!!

I was pretty scared because I thought that I have lost my BTC.

thank for your help
newbie
Activity: 5
Merit: 0
Yes I have read them, but I have already tried everything with pywallet and bitcoin core console and nothing works.

It is a bitcoin core wallet. This is the only program that I use.

With bitcoin core)

loadwallet wallet.dat

Wallet file verification failed. Failed to load database path '/home/.bitcoin/wallet.dat'. Data is not in recognized format. (code -18)

With pywallet)

python3 pywallet.py --dumpwallet  --wallet=/home/pywallet/wallet.dat --passphrase=mypassword

22, 'Invalid argument -- BDB0210 /home/pywallet/wallet.dat: metadata page checksum error'

So It clear that there is something wrong with the file, but no totally wrong because BTCrecover is able to identify the correct password.

Thank you


legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
I was asking to use BTCrecover because It was able to identify the correct password that I already know that is correct. How it was able to do that if the file is corrupted?

Have you read our previous posts for a corrupted wallet.dat file above?
Please test it first and report back here.

If it doesn't work, is it possible that the "wallet.dat" file you're attempting to recover is an altcoin backup wallet rather than a Bitcoin backup wallet?
newbie
Activity: 5
Merit: 0
I was asking to use BTCrecover because It was able to identify the correct password that I already know that is correct. How it was able to do that if the file is corrupted? So I think that BTCrecover may be is able to extract private keys. But, as you said, It cant do that with bitcoin core wallet.dat. I dont know why not.

I have used  --dump-privkeys with --correct-wallet-password and --wallet args, but BTCrecover said "This wallet type does not currently support dumping the decrypted private keys"  Cry Cry Cry

Thank you

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Is there any command to be able to export privatekeys from a wallet.dat using BTCrecover?
I used pywallet but I get this:
22, 'Invalid argument -- BDB0210 /home/pywallet/wallet.dat: metadata page checksum error'
There is --dump-privkeys that should be used together with --correct-wallet-password and --wallet args.
But if pywallet and Bitcoin Core didn't work in the first place which should've worked, I doubt using BTCRecover will do any difference.
And lastly, AFAIK, it only works on Blockchain(.com) "wallet.aes.json" file.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
22, 'Invalid argument -- BDB0210 /home/pywallet/wallet.dat: metadata page checksum error'


Based on this error like the above said the wallet.dat file might be corrupted you have a similar case here "Another recovery attempt".

What I think is to use -salvagewallet but it was moved to bitcoin-wallet.exe there is a guide here on how to perform salvage wallet using bitcoin-wallet tool.

But before you salvage this wallet make sure you make a backup copy of your wallet.dat file first.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
Your wallet.dat is corrupted:
https://github.com/akx/walletool/issues/9

What do you get when you try to open the wallet in core itself?
Did you try salvage?
https://bitcointalksearch.org/topic/salvagewallet-in-latest-bitcoin-core-5330381

Obligatory, don't use that file make a copy and use those.

-Dave
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
I have the password. Which command I have write to use dumpprivkey with BTCrecover?

If you have then you should be able to export or dump the keys on the Bitcoin-qt console or pywallet.

What issue or errors did you get when trying to dump the keys from Qt and Pywallet?

Here are the sample commands on the Bitcoin-qt

Code:
walletpassphrase mypassword 600

And then dump the private key

Code:
dumpprivkey theaddressthatiwanttodumpprivkey
newbie
Activity: 5
Merit: 0
I used pywallet but I get this:

python3 pywallet.py --dumpwallet  --wallet=/home/pywallet/wallet.dat --passphrase=mypassword


22, 'Invalid argument -- BDB0210 /home/pywallet/wallet.dat: metadata page checksum error'


Thank you
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
Btcrecover is supposed to be used for recovering missing characters or seed phrases or brute-forcing passphrases. Did you forget the password of your wallet.dat?

If not, then maybe you didn't include the command for the passphrase before you use dumpprivkey from the bitcoin-qt console or PyWallet.

If you forgot the password there is documentation for BTCrecoved from this link below that you can follow you can also check the sample commands under that link.

- https://btcrecover.readthedocs.io/en/latest/
newbie
Activity: 5
Merit: 0
Is there any command to be able to export privatekeys from a wallet.dat using BTCrecover?

I am not able to do it using Bitcoin-qt or pywallet with an old wallet.dat from 2018.

Thank you.
Jump to: