Author

Topic: I want to recover a corrupt wallet.dat file. I have pywallet installed. (Read 130 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
File Folder             [database]
WALLETLOCKFILE  [.walletlock]
Text Document      [db]
DAT File                [wallet]
Those are associated with the wallet.dat file in the same directory, it's not recommended to open them manually as text files.

-snip-
Running the command 'bitcoin-wallet -wallet=wallet.dat salvage' returns
Failed to rename C:\Users\l_\AppData\Roaming\Bitcoin\wallets\wallet.dat to C:\Users\l_\AppData\Roaming\Bitcoin\wallets\wallet.dat.1676046638.bak
The file name of wallet.dat.1676046638.bak changes with each attempt to run that command, just the last few numbers. I assume this is so it doesn't overwrite anything.
The "wallet.dat.1676046638.bak" files are the previous wallet.dat file prior to using the command.
The number is the "unix timestamp" (epoch date) of the date when the backup was created.

The wallet.dat, if present should be the "salvaged" wallet, have you tried if it'll load in Bitcoin Core without errors?
If it didn't, try to paste a fresh copy of your corrupted wallet.dat file, run the command with it once and load the wallet to Bitcoin Core.
If it still didn't work, try pywallet --recover.
l_
newbie
Activity: 4
Merit: 0
-snip-
Does this mean that I'm unable to salvage the wallet file?
Probably not, error doesn't look like a failed salvage attempt.
It's self-explanatory, it may happen if you've accidentally entered the command in quick succession, have the wrong date or other reasons why it failed to rename the original wallet.dat into a backup file.

Anyways, did it created a new "wallet.dat" file in place of the old "my_wallet.dat"? If so, try if it'll load in Bitcoin Core with "File->Open Wallet".

BTW, I take that you've already created a backup of your wallet.dat, it's mandatory, specially before attempting to use pywallet.


So I renamed the wallet from mywallet.dat to just wallet.dat. It's in this location... "C:\Users\l_\AppData\Roaming\Bitcoin\wallets\wallet.dat"

Running the command 'bitcoin-wallet -wallet=wallet.dat salvage' returns
Failed to rename C:\Users\l_\AppData\Roaming\Bitcoin\wallets\wallet.dat to C:\Users\l_\AppData\Roaming\Bitcoin\wallets\wallet.dat.1676046638.bak
The file name of wallet.dat.1676046638.bak changes with each attempt to run that command, just the last few numbers. I assume this is so it doesn't overwrite anything.

Running the command also creates new files and a folder called database in "C:\Users\l_\AppData\Roaming\Bitcoin\wallets".

It looks like this:
File Folder             [database]
WALLETLOCKFILE  [.walletlock]
Text Document      [db]
DAT File                [wallet]

Previously the only file in this folder was the wallet.dat file...
Opening the Text Document, db, I get the following text

C:\Users\l_\AppData\Roaming\Bitcoin\wallets\wallet.dat: unsupported btree version: 10

In the database file folder there is a text document called log. I'm unable to read this as it's some illegible bytes text.
And the .walletlock file is empty.

I'm assuming that the next step would be to solve why it isn't created the wallet.dat.%numbers%.bak file , because of the failed to rename error...
By the way I'm able to create the wallet.dat.%numbers%.bak file using healthy wallets. For this corrupt wallet though it doesn't seem to work.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
-snip-
Does this mean that I'm unable to salvage the wallet file?
Probably not, error doesn't look like a failed salvage attempt.
It's self-explanatory, it may happen if you've accidentally entered the command in quick succession, have the wrong date or other reasons why it failed to rename the original wallet.dat into a backup file.

Anyways, did it created a new "wallet.dat" file in place of the old "my_wallet.dat"? If so, try if it'll load in Bitcoin Core with "File->Open Wallet".

BTW, I take that you've already created a backup of your wallet.dat, it's mandatory, specially before attempting to use pywallet.
l_
newbie
Activity: 4
Merit: 0
Using the bitcoin-wallet -wallet=mywallet.dat salvage command I get
Failed to rename C:\Users\l_\AppData\Roaming\Bitcoin\wallets\mywallet.dat to C:\Users\l_\AppData\Roaming\Bitcoin\wallets\mywallet.dat.1676022832.bak

Does this mean that I'm unable to salvage the wallet file?
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Try "salvage" first before attempting to use any third-party tool.
If you have Bitcoin Core, you should have "bitcoin-wallet" tool in your Bitcoin directory.
Follow this post to use the command: https://bitcointalksearch.org/topic/m.58965353

For pywallet, you can try to paste a copy of the corrupted wallet.dat to a directory of you choosing, then use --recover with that disk to see if pywallet can fetch any intact keys from your wallet.
For that, follow this guide: https://bitcointalksearch.org/topic/m.60653031
l_
newbie
Activity: 4
Merit: 0
Can someone walk me through this?
Thanks - l_
Jump to: