Bitcoin Forum
November 18, 2024, 05:49:44 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 »  All
  Print  
Author Topic: Corrupted wallet.dat  (Read 818 times)
whanau
Member
**
Offline Offline

Activity: 121
Merit: 36


View Profile
May 20, 2023, 09:52:24 PM
 #21

Then bitcoin is missing some piece of  code
As cricktor says,

The latest Bitcoin Core release is v24.0.1 as also indicated at the top of every forum page here. The proper download source is https://bitcoincore.org/en/download/

I suggest making sure you have several copies of your wallet first,  remove the existing bitcoin and reinstall.

Until you get bitcoin core up and running best put your wallet to one side..

I suggest you also rename one of your wallet copies "mywallet.dat"
because it can get very confusing when all wallet files have the same name and you could accidentally delete the wrong one.
Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 20, 2023, 10:05:01 PM
 #22

OK that's interesting & thank you, seems loading my old wallet might have done some damage or the wallet was borked somehow.

I'll get onto that link straight away & thanks for the advice re-wallet names, I have 2x M.2 drives with the same info on both. I have scanned the cloned drive & it is identical down to the deleted files.

I am loading the new Bitcoin core on another PC & working from that, using my M.2 cloned drive in a caddy via USB connection.

whanau
Member
**
Offline Offline

Activity: 121
Merit: 36


View Profile
May 20, 2023, 10:07:35 PM
 #23

this may help.

https://bitcoin.org/en/full-node#windows-10

Obviously choose your version of windows.
Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 20, 2023, 10:33:08 PM
Last edit: May 20, 2023, 10:43:56 PM by Tigerbill
 #24

Ok installed the new bitcoin client 24.0.1 & we get the same error messages, I'm so confused.

Command prompt as stated earlier on in this post in Windows: is not recognized as an internal or external command,
operable program or batch file.

Command as peviously stated in the Bitcoin QT: Method not found (code -32601)

There is still no 'bin' file.
whanau
Member
**
Offline Offline

Activity: 121
Merit: 36


View Profile
May 20, 2023, 11:34:27 PM
 #25

 I am not sure there is a bin file in windows?? All the files will be under C: \ programfiles

Have you typed 'bitcoin core' in the search box?. How far down these instructions do you get?

https://bitcoin.org/en/full-node#windows-10

Taking care not to expose any keys or sensitive information can you cut & paste the command you are trying (perhaps a screenshot??)

Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 21, 2023, 03:21:23 PM
Last edit: May 21, 2023, 04:02:14 PM by Tigerbill
 #26

Hello, we typed this into command prompt & we get this error.

C:\Users\username>D:\Program Files\Bitcoin\daemon\bitcoind
'D:\Program' is not recognized as an internal or external command,
operable program or batch file.

In the command prompt in the Bitcoin Core  QT (my cloned M.2 is 'F') we typed "F:\Users\USERNAME\AppData\Roaming\Bitcoin\wallets\wallet.dat
Method not found (code -32601)
I can clearly see this command is not going to find the deleted wallet on my cloned drive.

Thank you for the link but I am totally lost as what to do with info like that, sorry but it's gobbledegook to me.
https://bitcoin.org/en/full-node#windows-10

I also copy/pasted the wallet.dat that I recovered into the wallet section in the bitcoin QT install & it messes up the bitcoin core & will not function until I delete that dat file.
The Bitcoin program then loses its path & gives me a yellow warning, it still allows me to continue after the warning though.

I would post screenshots but there's not much point if I am so far off track, nothing seems to work.
whanau
Member
**
Offline Offline

Activity: 121
Merit: 36


View Profile
May 21, 2023, 06:26:48 PM
 #27

OK sounds like you have downloaded bitcoin core on C drive  but not installed it on D / F drive. No need to do this yet.

From the instructions..
After downloading the file to your desktop or your Downloads folder (C:\Users\<YOUR USER NAME>\Downloads), run it by double-clicking its icon.
Follow the default installation instructions.


When installed, Press the Windows key (⊞ Win) and start typing “bitcoin”. When the Bitcoin Core icon appears , click on it.

Bitcoin core should start running and you will start downloading the blockchain. this will take some time (maybe days)
but will open with an empty, newly created wallet.

Don't do anything with your wallet yet. Please report back when you get this far.
Good luck
Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 21, 2023, 06:43:12 PM
 #28

Ok I understand, I will have to clone our 1 TB C: drive with Windows installation & swap it for a bigger capacity 2 TB drive.
I'll do this tonight & start the Bitcoin installation on the 2 TB C: drive after I have cloned the drive. Smiley
Mbaye
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
May 22, 2023, 02:42:22 AM
 #29

Hello, we typed this into command prompt & we get this error.

C:\Users\username>D:\Program Files\Bitcoin\daemon\bitcoind
'D:\Program' is not recognized as an internal or external command,
operable program or batch file.

In the command prompt in the Bitcoin Core  QT (my cloned M.2 is 'F') we typed "F:\Users\USERNAME\AppData\Roaming\Bitcoin\wallets\wallet.dat
Method not found (code -32601)
I can clearly see this command is not going to find the deleted wallet on my cloned drive.

Thank you for the link but I am totally lost as what to do with info like that, sorry but it's gobbledegook to me.
https://bitcoin.org/en/full-node#windows-10

I also copy/pasted the wallet.dat that I recovered into the wallet section in the bitcoin QT install & it messes up the bitcoin core & will not function until I delete that dat file.
The Bitcoin program then loses its path & gives me a yellow warning, it still allows me to continue after the warning though.

I would post screenshots but there's not much point if I am so far off track, nothing seems to work.
Ok I understand, I will have to clone our 1 TB C: drive with Windows installation & swap it for a bigger capacity 2 TB drive.
I'll do this tonight & start the Bitcoin installation on the 2 TB C: drive after I have cloned the drive. Smiley
Ok I understand, I will have to clone our 1 TB C: drive with Windows installation & swap it for a bigger capacity 2 TB drive.
I'll do this tonight & start the Bitcoin installation on the 2 TB C: drive after I have cloned the drive. Smiley
Hello, we typed this into command prompt & we get this error.

C:\Users\username>D:\Program Files\Bitcoin\daemon\bitcoind
'D:\Program' is not recognized as an internal or external command,
operable program or batch file.

In the command prompt in the Bitcoin Core  QT (my cloned M.2 is 'F') we typed "F:\Users\USERNAME\AppData\Roaming\Bitcoin\wallets\wallet.dat
Method not found (code -32601)
I can clearly see this command is not going to find the deleted wallet on my cloned drive.

Thank you for the link but I am totally lost as what to do with info like that, sorry but it's gobbledegook to me.
https://bitcoin.org/en/full-node#windows-10

I also copy/pasted the wallet.dat that I recovered into the wallet section in the bitcoin QT install & it messes up the bitcoin core & will not function until I delete that dat file.
The Bitcoin program then loses its path & gives me a yellow warning, it still allows me to continue after the warning though.

I would post screenshots but there's not much point if I am so far off track, nothing seems to work.
this may help.

https://bitcoin.org/en/full-node#windows-10

Obviously choose your version of windows.
  • BTC
    I wanted to try this option first & I have loaded the recovered wallet.dat file onto another PC at the desktop & we seem unable to find the 'bin' folder in the Bitcoin Core install directory which for us is on D: "D:\Program Files\Bitcoin\bin" does not show.

    If the recovered file is corrupted, try to use salvage command of Bitcoin Core's bitcoin-wallet tool:
    • Go to Bitcoin Core's install directory, open "bin" folder;
      Since you're on Windows, it's in "C:\Program Files\Bitcoin\bin" folder by default.
    • Open your command prompt and cd to that directory, enter: cd "C:\Program Files\Bitcoin\bin"
    • Then to use salvage command with bitcoin-wallet tool: bitcoin-wallet --wallet="full path to your wallet.dat" salvage
      For example: if your corrupted wallet.dat is saved in "D:\testdir\wallet.dat", it should be --wallet="D:\testdir\wallet.dat"
    • Command should finish without any response, otherwise, there's an error.
    • If it finished without errors, load the wallet.dat to Bitcoin Core and see if it's now fixed.

    Is the 'bin' folder the 'recycle bin' on my original drive?
    [/quote][/glow]
[li][/li]
[/list]
Awesome news, thank you & I can see the wallets folder in D: recycle bin aswell as the full the file tree: Local Disk(D)\Lost Files\Deleted\File Path Lost\wallets\, so I take it that must be inserted in the command prompt as the path?

I have now removed the M.2 drive so I don't overwrite anything & I am going to make a clone of the data on it, before I start the scan at the weekend.

I am totally unfamiliar with all this so thank you for your help.
Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 23, 2023, 05:20:51 PM
 #30

Update: I have a fresh installation of Windows 10, laatest BIOS & drivers, all diagnostics check out fine & Bitcoin Core 24.0.1 is apporoximately 11 hours from completion on an unpruned blockchain on C:
whanau
Member
**
Offline Offline

Activity: 121
Merit: 36


View Profile
May 23, 2023, 06:31:10 PM
 #31

good news you are making good progress..

Next, is to locate the newly created empty wallet which will be in C:\Users\YourUserName\Appdata\Roaming\Bitcoin. This folder may be hidden so  use show hidden files..

There will be a folder called 'wallets' which will have the empty wallet plus some other files. Once you have found this:

shut down bitcoin core
delete all the files in the directory (but not the directory itself)
copy 'yourwallet.dat' to this location - make sure it is called wallet.dat

restart bitcoin core and wait.

It will take at least the 11 hours to open properly. Your wallet may show on screen before this.

If you close bitcoin core beforehand you may get all sorts of messages , wallet not loaded etc. this is normal.

Once your wallet is loaded we can decide what to do from there. either use  'as is' or transfer to a new wallet

Good luck 

nc50lc
Legendary
*
Online Online

Activity: 2604
Merit: 6420


Self-proclaimed Genius


View Profile
May 24, 2023, 02:43:21 AM
Merited by Cricktor (1)
 #32

Command prompt as stated above in Windows: is not recognized as an internal or external command,
operable program or batch file.
It means that you've entered an invalid command in Command Prompt or tried to launch a non-existing program.
Usually caused by trying to launch something while still using the default directory "C:\Users\<username>".

In my instructions, use change directory command "cd" to the correct folder where bitcoin-wallet tool is located, in that case, follow the step with the "cd" command.

Command as stated above in the Bitcoin QT: Method not found (code -32601)
It means that the command that you've used with Bitcoin-qt isn't correct or not-existing.

-salvagewallet was removed in bitcoin-qt and moved to bitcoin-wallet tool;
I've also instructed to use bitcoin-wallet tool to salvage so I can't find any reason why you've used bitcoin-qt with the command.

Quote from: Tigerbill
There is still no 'bin' file.
There's no "bin" file and I haven't stated to find any 'bin' file.
You're looking for "bitcoin-wallet.exe" in 'bin' folder, but since you're using the old version, it's in the 'daemon' folder.


Update: I have a fresh installation of Windows 10, laatest BIOS & drivers, all diagnostics check out fine & Bitcoin Core 24.0.1 is apporoximately 11 hours from completion on an unpruned blockchain on C:
Good, then use that latest version instead of the old installation;
preferably after Bitcoin Core is synced since your system must have been freezing while its syncing.

Since it's quite buried in the first page, I'll quote my post here for reference:
(plus additional comments since it looks like you're new in using commands)
If the recovered file is corrupted, try to use salvage command of Bitcoin Core's bitcoin-wallet tool:
  • Go to Bitcoin Core's install directory, open "bin" folder;
    Since you're on Windows, it's in "C:\Program Files\Bitcoin\bin" folder by default.
    -> that is only the default, if you've installed Bitcoin Core in different directory, browse to that directory instead.
    And inside that folder, there should be a bitcoin-wallet file inside it which is the tool that you're going to use.
  • Open your command prompt and cd to that directory, enter: cd "C:\Program Files\Bitcoin\bin"
    -> this is important since this will change command prompt's working directory where bitcoin-wallet.exe tool is located, in this case, inside "bin" folder.
    Of course, as stated above, if Bitcoin Core is installed to a different directory, cd to its 'bin' folder instead.
  • Then to use salvage command with bitcoin-wallet tool: bitcoin-wallet --wallet="full path to your wallet.dat" salvage
    For example: if your corrupted wallet.dat is saved in "D:\testdir\wallet.dat", it should be --wallet="D:\testdir\wallet.dat"
    -> To create the example, create a temporary folder in "D:", name it "testdir" and paste your corrupted wallet.dat in it.
    That's only for the example, you can use any folder that you want and make sure to enter its path in "--wallet=<path>" arg.
  • Command should finish without any response, otherwise, there's an error.
  • If it finished without errors, load the wallet.dat to Bitcoin Core and see if it's now fixed.
    -> If there's no error, go to your "testdir" where the corrupted wallet.dat is, if salvage command is successful, there should be a backup file there named "wallet.dat.nnnnnnn.bak"
    which is the original corrupted wallet.dat.
    In that case, open Bitcoin Core and use the menu: "File->Restore Wallet", browse to that "testdir" directory and open wallet.dat.
    Bitcoin Core will try to restore that salvaged wallet, and if there's no issue, it should load and rescan.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
bettercrypto
Sr. Member
****
Offline Offline

Activity: 1526
Merit: 280



View Profile WWW
May 24, 2023, 09:38:16 AM
 #33

Hello, I have mistakenly deleted my bitcoin wallet from my additional M.2. hard drive (D:) when I removed the Bitcoincore software, I hadn't realised but I had forgotten to save the last wallet I made...
I have since recovered the lost files from the drive but the wallet file is not in the correct format.
 From the recovered files the original Bitcoin core installation now has a missing path & I can see the wallet folder as normal & the files look ok, but the .dat which is 952KB will not load, saying the file is not in the correct format.

I have done some research & looked into this topic https://bitcoin.stackexchange.com/questions/9127/dumping-private-keys-from-wallet-dat-from-command-line-pywallet-py-alternatives

I am not good with things like this & I failed to get the py wallet to see the .dat file, which was placed in the same folder. I wonder if there is anything else I can try or am I on the right track, just not going through the procedure correctly?

Any help that results in the wallet working again will recieve a reward.


Cheers.



From what I see in your problem, your wallet file is probably not in the correct format. Just wondering are you sure your Bitcoin core wallet is installed and running properly?

now if your .dat file is not in the correct format what to do is:

* open the bitcoin core wallet
* press Help in the menu
* the debug window is finished
* next is wallet repair
* When you click on wallet repair, select the .dat file that has been recovered
* then click the repair button

Quote
I am using Bitcoin Core 22.0 & I also wonder if the deleted wallet.dat can be used with a pruned blockchain wallet or does it have to be how I had the original installation unpruned?

If it wasn't cut in the original installation, yes it can still be used in a pruned blockchain wallet it just needs to scan the blockchain for transactions that happened before the wallet was lost.

source: https://github.com/ameijer/bitcoin_wallet_recovery_tool
           https://resources.nunchuk.io/wallet-recovery/core-recovery/


▄████████████████████████▄
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
▀████████████████████████▀
EVO.io 
BRIDGING THE GAP
BETWEEN CRYPTO
AND PLAY 
█████████████████████████
█████████████████████████
████████▀▀░░█░░▀▀████████
██████▀▄░░▄▄█▄▄░░▄▀██████
█████░░░█▀▄▄▄▄▄▀█░░░█████
████░░░███████████░░░████
████▀▀▀███████████▄▄▄████
████░░░███████████░░░████
█████░░░█▄▀▀▀▀▀▄█░░░█████
██████▄▀░░▀▀█▀▀░░▀▄██████
████████▄▄░░█░░▄▄████████
█████████████████████████
█████████████████████████

██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
 
ROULETTE
SLOTS
GAME SHOWS
MANY MORE
|
DEPOSIT BONUS
 
UP
TO
1 BTC + 150 
FREE
SPINS
|████████████▄▄▀▀█
░▄▄▄██████████
██▀▄░▄▄▄███▄███
██▄▀███████
█▀▀████████████
░█████████████████
██████████████████
███████▄▄████▀████
█▄▄██▄█▀▀███▀█████
░█▀██▀▀▀▀███████
▀█▀██▀████████████
██▀█▀▀▀█▀█▀█████████
██▄▄▀▄▄▄█▄▄██████████▄
[ 
Play Now
]
nc50lc
Legendary
*
Online Online

Activity: 2604
Merit: 6420


Self-proclaimed Genius


View Profile
May 24, 2023, 10:28:47 AM
 #34

now if your .dat file is not in the correct format what to do is:

* open the bitcoin core wallet
* press Help in the menu
* the debug window is finished
* next is wallet repair
* When you click on wallet repair, select the .dat file that has been recovered
* then click the repair button
There's no clikable "repair" option in Bitcoin core; also, "debug window" is the "console" of the old versions.
Where did you get this guide?

If it wasn't cut in the original installation, yes it can still be used in a pruned blockchain wallet it just needs to scan the blockchain for transactions that happened before the wallet was lost.
He wouldn't be sure if his unpruned blocks are enough to scan his wallet.dat file,
In situations like this, having a full blockchain is worth to have since he'll be rescanning restored wallet.dat files.

It's also corrupted so it may have to be rescanned from scratch after a salvage attempt.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 24, 2023, 07:58:06 PM
 #35

This is where I get jittery  Undecided once again thanks for the info & given there is more than one way to do this, I think I will try the 'recovery' option with the recovered wallet.dat that is likely not in the correct format.

I'll have access to the newly installed PC later tonight.

whanau
Member
**
Offline Offline

Activity: 121
Merit: 36


View Profile
May 24, 2023, 08:26:11 PM
 #36

I would wait until Bitcoin core has finished downloading the blockchain and scanning your wallet, (assuming you have transplanted it)
Either the wallet will work or you should get an error message.

The wallet may not be corrupt, something wrong with the original software you restored could have made bitcoin core 'think' it was corrupt..
Wait until you get a new message from the new bitcoin core so that the appropriate action can be taken.
Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 24, 2023, 09:31:38 PM
 #37

I have not transplanted the wallet .dat as yet & Bitcoin Core has fully downlaoded the blockchain.

I take it there is a wallet.dat automatically created by Bitcoin Core, not created by me deliberatley saving a wallet. Will do as you advise & overwrite that wallet with mine.

I'll update as to what errors I encounter.
whanau
Member
**
Offline Offline

Activity: 121
Merit: 36


View Profile
May 24, 2023, 09:43:56 PM
 #38

shut down bitcoin core

locate the newly created empty wallet which will be in C:\Users\YourUserName\Appdata\Roaming\Bitcoin. This folder may be hidden so  use Windows,  'show hidden files'..
delete all the files in the wallet directory (but not the directory itself)

copy 'yourwallet.dat' to this location - make sure it is called wallet.dat

restart bitcoin core and wait.

The software will be scanning the wallet from the year dot so it will take some time (hours and hours).

Should you shut down bitcoin core before scanning has finished, you will get a 'failed to open wallet' message or similar. This is of course true, but means the scanning wasn't finished.

Wait until scanning finishes and hopefully the wallet opens or you get an error message from bitcoin core.

We will then be in a known position and can deduce what to do.

Good luck
Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 24, 2023, 10:15:16 PM
Last edit: May 25, 2023, 12:26:10 AM by Tigerbill
 #39

Copy that & thanks for the clear instructions. Smiley

I confirm the Wallets Folder was empty in C:\Users\MyUserName\Appdata\Roaming\Bitcoin
I copied my wallet.dat inside the empty wallet folder & restarted the Bitcoin Core Program, this was at 11:57pm & I am leaving the PC on for the next 18 hrs.
There were no warnings or errors  Smiley

Fingers & toes are crossed. Cheers.
Tigerbill (OP)
Jr. Member
*
Offline Offline

Activity: 62
Merit: 1


View Profile
May 25, 2023, 03:33:52 PM
 #40

I have just checked & Bitcoin Core is still the same, I have looked in open wallet & it's blank/greyed out, no wallets are available.
Pages: « 1 [2] 3 4 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!