Author

Topic: Corrupt wallet.dat recovery options (Read 141 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
September 10, 2022, 10:00:24 PM
#3
I tried to open this file with Bitcoin core before using pywallet and got a similar "data is not in recognized format" error.

It might be worth mentioning I recovered the file using EaseUS data recovery wizard some time ago.
Salvage will likely return with the same error message since the wallet file's header may be corrupted.

Anyways, to correctly use the command, you should use these commands with your Command Prompt or Powershell (prepend with ./ for powershell),
Change directory to bitcoin/daemon (change the dir if Bitcoin Core is installed to another dir):
Code:
cd C:\Program Files\Bitcoin\daemon
Provide the path to the wallet.dat file and the salvage command (without the "-"):
Code:
bitcoin-wallet --wallet="C:\Python27\wallet.dat" salvage


Since you already set-up pywallet, using -recover is worth the try.
It should be able to find if there are recoverable keys from your wallet.dat file.
Follow this guide for the commands:
Here's an example command for recover (tested with python v2.7.17 and latest version of pywallet):
Code:
python pywallet.py --recover --recov_device=D: --recov_size=50Gio --recov_outputdir=C:\pywallet_recov_dir
Then you'll be prompted for the to-be-created wallet's passphrase (where the keys will be imported) and the deleted wallets'/keys' possible passphrases.
(characters wont display as you type the passphrases)

The result will be a wallet.dat named "recovered_wallet_.dat" that you can load to Bitcoin Core.

In your case, just move the corrupted wallet.dat to the root of your other drive, then use its drive letter as the --recov_device,
then fill out the --recov_size which is the drive's size and --recov_outputdir where you want to put the recovered wallet.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
September 10, 2022, 06:37:35 PM
#2
Would you mind to try to salvage the wallet.dat let's see if you can still recover some private keys from the corrupted wallet.dat.

-salvage is now in Bitcoin-wallet.exe you can find this tool under Bitcoin/daemon and you must run the command prompt as administrator and make sure you are in the same folder to run salvage.
newbie
Activity: 3
Merit: 1
September 10, 2022, 12:51:07 PM
#1
Its been recommended to me to start a thread for some help recovering an old wallet.dat file.

I had made a post in the Pywallet 2.2 thread and the farthest I got was this error message,

(22, 'Invalid argument -- C:\\Python27\\wallet.dat: unexpected file type or form
at')
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this
again.

I tried to open this file with Bitcoin core before using pywallet and got a similar "data is not in recognized format" error.

It might be worth mentioning I recovered the file using EaseUS data recovery wizard some time ago.

Thank you for any help.
Jump to: