Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: leftslider on April 11, 2018, 01:14:22 PM



Title: pywallet command???
Post by: leftslider on April 11, 2018, 01:14:22 PM
I am trying to recover corrupted wallet.dat but I have no idea how to use pywallet.

I am using windows 2007.

Downloaded pywallet.py and python.

corrupted files and pywallet are in d: drive on background

Anybody can help me about command so I can at least try pywallet?


APPRECIATED!!!


Title: Re: pywallet command???
Post by: joniboini on April 12, 2018, 03:05:30 PM
Have you tried this the tutorial/thread here?
https://walletrecovery.info/how-to-recover-your-corrupt-or-deleted-bitcoin-core-wallet/
https://bitcointalk.org/index.php?topic=2497513.0

Btw, one more, have you tried the salvage command from bitcoin-qt?


Title: Re: pywallet command???
Post by: HCP on April 13, 2018, 03:32:58 AM
The official pywallet thread is here: https://bitcointalk.org/index.php?topic=34028.0
There is a link to recover wallets in the OP that leads here: https://bitcointalk.org/index.php?topic=38004.0

However, if a simple "dumpwallet" is not working on your wallet.dat file, you'll likely need to put the wallet.dat onto a (small) USB thumbdrive and use recover from there. "Recover" cannot be run on a file, it needs to be run on a device!

Also, if your wallet.dat was created with newer versions of Bitcoin Core (ie. v0.13+), chances are pywallet will output a lot of errors about unrecognised data.

Basic "dumpwallet" goes something like:
Code:
C:\Python27\python pywallet.py --dumpwallet --datadir=D:\directory\with\wallet.dat
So... if you have your files in D:\wallet_recovery your command would be:
Code:
C:\Python27\python pywallet.py --dumpwallet --datadir=D:\wallet_recovery

As mentioned, recovery needs to scan a device... so I recommend a smallish USB drive to save time. The smaller the better.

Assuming you have 1GB thumb drive, mounted as X: and you want the recovered wallet to be put in "D:\recovered_wallet", then your "recover" command would be something like:
Code:
C:\Python27\python pywallet.py --recover --recov_size=1Gio --recov_device=X: --recov_outputdir=D:\recovered_wallet

Change X:, the recov_size, and recov_outputdir as appropriate. "recov_size" should be set to the size of the USB device 1GB = 1Gio, 8GB = 8Gio etc...