Author

Topic: Corrupted wallet.dat (Read 820 times)

newbie
Activity: 12
Merit: 2
May 05, 2024, 09:19:29 AM
#80
Has there been any progress on this?  I've gone through the CLI, but got an error output of:
-snip-
All hope lost in recovering this?
Through Bitcoin Core and its tools? No since you've already tried "salvage" and it can't do anything.
Try the other options like pywallet or other tools that can search for raw private keys from a file or directory and hope that there's still intact data in your corrupted wallet file.

For pywallet (link), use --recover command on a disk (preferably a small partition) where a copy of your "untouched" wallet.dat is located.
Example command is:
Code:
python pywallet.py --recover --recov_device="RECOVERY_DIRECTORY" --recov_size=1Gio --recov_outputdir="OUTPUT_DIRECTORY"
Edit "RECOVERY_DIRECTORY" and "OUTPUT_DIRECTORY" accordingly.

Thanks for the info, I will look into it!
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
May 04, 2024, 10:59:29 PM
#79
Has there been any progress on this?  I've gone through the CLI, but got an error output of:
-snip-
All hope lost in recovering this?
Through Bitcoin Core and its tools? No since you've already tried "salvage" and it can't do anything.
Try the other options like pywallet or other tools that can search for raw private keys from a file or directory and hope that there's still intact data in your corrupted wallet file.

For pywallet (link), use --recover command on a disk (preferably a small partition) where a copy of your "untouched" wallet.dat is located.
Example command is:
Code:
python pywallet.py --recover --recov_device="RECOVERY_DIRECTORY" --recov_size=1Gio --recov_outputdir="OUTPUT_DIRECTORY"
Edit "RECOVERY_DIRECTORY" and "OUTPUT_DIRECTORY" accordingly.
newbie
Activity: 8
Merit: 0
May 04, 2024, 07:03:15 PM
#78
You  might need to download java and run this in java. So check how to run java in computer there. Then after your done you can delete java app.
 https://github.com/ameijer/bitcoin_wallet_recovery_tool
newbie
Activity: 12
Merit: 2
May 04, 2024, 08:15:00 AM
#77
Has there been any progress on this?  I've gone through the CLI, but got an error output of:

Salvage: Database salvage found errors, all data may not be recoverable.
Salvage: WARNING: Unexpected end of file while reading salvage output.
Salvage(aggressive) found no records in C:\Users\XXXXX\AppData\Roaming\Bitcoin\wallets\Old Try\wallet.dat.1714828383.bak.

All hope lost in recovering this?
jr. member
Activity: 62
Merit: 1
June 23, 2023, 07:01:53 PM
#76
I have not yet managed to get around to the next part of this nightmare, there's been too much going on IRL & TBH I have also put it on the long arm.
I will have access to the newly installed computer again after Sunday, so I'll hopefully get around to this sometime soon.
jr. member
Activity: 62
Merit: 1
May 30, 2023, 07:31:54 PM
#75
Thanks again for the help, I think I I will try to proceed with the pywallet recovery tool.
I looked at that when this happened initially, purely becuase the Bitcoin client said the wallet I was trying to load was in the wrong format.
I didn't get it working & came here for help.

Thanks to you all & if I get the wallet back there's something for all that helped.

I am not holding my hopes up of finding the key but I won't give up.

I'll tackle this job sometime this week & post back.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
May 29, 2023, 11:34:26 PM
#74
C:\Program Files\Bitcoin\daemon>bitcoin-wallet --wallet="C:\Users\My Username\AppData\Roaming\Bitcoin\wallets\My Wallet\wallet.dat" salvage
Failed to load database path 'C:\Users\My Username\AppData\Roaming\Bitcoin\wallets\My Wallet\wallet.dat'. Data is not in recognised format.

Am I still doing something wrong?
This time, bitcoin-wallet tool ran successfully but since there's an error, it can't salvage your wallet file since the keys are unrecoverable.
That usually happen if the deleted data that you've recovered (the wallet.dat file) were already immensely overwritten by new files.

So your option now is to use other wallet/private key recovery tools.
One option is to use pywallet's --recover option to check if there are data similar to private keys or intact private keys recoverable from your drive/wallet file.
But as a heads-up, it's not as "easy" as bitcoin-wallet tool to setup and use,
read this topic for some info about the tool and command: https://bitcointalksearch.org/topic/m.60653031
jr. member
Activity: 62
Merit: 1
May 29, 2023, 10:04:38 PM
#73
Hello, have you tried my suggestion on the first page in this post.

Hello, I am so sorry I completely missed this in my confusion at the time & being new to the forum doesn't help.

I wonder if you can possibly walk me through what steps I need to do to get this up & running? As you might be able to tell I am noob at this stuff & not very good with it all.

Thank you for the nudge reminder.  Smiley
newbie
Activity: 28
Merit: 0
May 29, 2023, 09:34:38 PM
#72
 Hello, have you tried my suggestion on the first page in this post.
jr. member
Activity: 62
Merit: 1
May 29, 2023, 09:18:07 PM
#71
Yes the space was in the wallet folder name /My Wallet/ I tried renaming it without a space & the same error continued. I also tried straight from the daemon folder too, the data was not in recognised format.

I also made a test wallet in the Bitcoin Core software & overwrote the newly created .dat file, the next time I load the client it shuts down after telling me the data is not in recognised format.

I will need to look at what options I have & thanks for the message. I will take it into consideration.

I'm gutted this hasn't worked out.
member
Activity: 119
Merit: 36
May 29, 2023, 08:35:27 PM
#70
bitcoin-wallet --wallet="C:\Users\My Username\AppData\Roaming\Bitcoin\wallets\My Wallet\wallet.dat" salvage

Should there be a space??  If the path is correct, then probably the wallet is corrupt.

You could try renaming the folder MyWallet  (no space).
or a final check,  if you still have wallet.dat in the daemon folder, just

bitcoin-wallet --wallet=wallet.dat salvage

Failing that see your private messages
jr. member
Activity: 62
Merit: 1
May 29, 2023, 08:20:18 PM
#69
Hi, I think I did everything correct this time with CTRL-C & then CTRL:-V  in the right place in the command, but I got this different error which makes me think the .dat file is corrupt.

C:\Program Files\Bitcoin\daemon>bitcoin-wallet --wallet="C:\Users\My Username\AppData\Roaming\Bitcoin\wallets\My Wallet\wallet.dat" salvage
Failed to load database path 'C:\Users\My Username\AppData\Roaming\Bitcoin\wallets\My Wallet\wallet.dat'. Data is not in recognised format.

Am I still doing something wrong?

Cheers.
jr. member
Activity: 62
Merit: 1
May 27, 2023, 11:30:28 AM
#68
Ok, I got to the point of the list below & clicked on the path to my wallet folder highlight and copy it (Ctrl+C) I then pasted the command in command prompt: salvage --wallet="\wallet.dat" salvage
'salvage' is not a recognised as an internal or external command, operable program or batch file.
My bad (I typed salvage instead of bitcoin-wallet), the command should be: bitcoin-wallet --wallet="\wallet.dat" salvage
But my screenshot shows the correct command anyways:


Awesome, thanks again.

Update: we are just home & so tired but I wanted to let you know I will do the job Monday evening in approx 20 hrs time.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
May 27, 2023, 01:18:47 AM
#67
Ok, I got to the point of the list below & clicked on the path to my wallet folder highlight and copy it (Ctrl+C) I then pasted the command in command prompt: salvage --wallet="\wallet.dat" salvage
'salvage' is not a recognised as an internal or external command, operable program or batch file.
My bad (I typed salvage instead of bitcoin-wallet), the command should be: bitcoin-wallet --wallet="\wallet.dat" salvage
But my screenshot shows the correct command anyways:
jr. member
Activity: 62
Merit: 1
May 27, 2023, 12:59:35 AM
#66
I understand!

I have had to unplug everything & we are off to Donington this weekend but I'll do this on Sunday night. Smiley

It is not wise to let someone else use your PC whilst you are trying to do this. They may inadvertently delete something or do something unknown.

I appreciate the sound advice & my lad is on a different M.2 when he's on it & it's actually a different PC, I still have the original M.2 safe in a box outside the PC along with a clone in a hard case.

Thank you to you both & I'll post back as soon as I get this working, I actually feel confident I can get this to work now.

I'm such a derp when it comes to commands..

Have a great weekend.


member
Activity: 119
Merit: 36
May 27, 2023, 12:19:14 AM
#65
It is not wise to let someone else use your PC whilst you are trying to do this. They may inadvertently delete something or do something unknown.

look carefully at the information nc50lc has provided.

salvage --wallet="\wallet.dat" salvage ??

did you put in the first bit of the command? have a look at the 3rd line down on his screen print

in the daemon folder:-

bitcoin-wallet --wallet="\wallet.dat" salvage    then enter..

don't forget the first steps as the is telling the command where to look for your wallet.

jr. member
Activity: 62
Merit: 1
May 26, 2023, 09:02:07 PM
#64
Hi, i got the PC back late tonight, my son was using it...

Ok, I got to the point of the list below & clicked on the path to my wallet folder highlight and copy it (Ctrl+C) I then pasted the command in command prompt: salvage --wallet="\wallet.dat" salvage
'salvage' is not a recognised as an internal or external command, operable program or batch file.

Everything was fine up to this point & I did not close the command prompt or any of the folder windows during this process, I guess this is very likely my error.

The instructions & images are really helpful but I'm sorry I must be doing something wrong again & misunderstanding the method, does the Bitcoin Core program need to be running?

Cheers.

    [/li]
    [li]Use salvage: go back to command prompt and type: salvage --wallet="\wallet.dat" salvage
    [/li]
    [li]If it finished without any error, the command is successful, like this:
    [/li]
    [li]Then, the folder where your wallet.dat should have these file, the original corrupted wallet.dat is the backup ".bak" file:
    [/li]
    [/list]
    [/quote]

    I retried the method & can 'cd' to the daemon directory, I placed my wallet folder into the wallets folder in C:users\username\appdate\roaming\bitcoin\wallets\my wallet folder with wallet.dat inside. Highlight the address to the wallet.dat & CTRL+C  to the wallet location.
    I then use the salvage command in command prompt & it says: salvage --wallet="\wallet.dat" 'salvage' is not a recognised as an internal or external command, operable program or batch file.
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 11:27:16 PM
    #63
    Wow I'm just away to bed & came to see you have replied. I'll take a good look at these later tonight, it is the early hours of the morning here.

    I promise to make this worth your while when I get the wallet back & thank you for doing this for me.
    It's nice to be able to go to sleep with the hope of your kind assistance being the solution to getting the wallet back, thank you for that.

    Bless you sir.
    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 25, 2023, 11:02:50 PM
    #62
    Thank once again & I am sorry for you to have to repeat these instructtions. I chose to do this in order & this was left until last because I am so unsure of what I'm doing.
    I am not good with command prompt & I will try again later tonight because I am just too tired atm. If I get similar errors from my next attempt,  I will then know it is my complete misunderstanding of this & I'll keep trying to understand.
    Perhaps these screenshots will make it easier to follow:

    • Find "bitcoin-wallet" tool, it's inside your "daemon" folder:
    • Click on the path to highlight and copy it (Ctrl+C):
    • Open cmd and 'change directory' to that folder, type: cd ""
      The working directory will change into that directory:

      (Do not close command prompt)
    • Paste your wallet.dat in any folder that you want (or just keep it in wallets folder):
    • Click on the path to highlight and copy it (Ctrl+C):
    • Use salvage: go back to command prompt and type: bitcoin-wallet --wallet="\wallet.dat" salvage
    • If it finished without any error, the command is successful, like this:
    • Then, the folder where your wallet.dat should have these file, the original corrupted wallet.dat is the backup ".bak" file:
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 10:10:45 PM
    #61
    Hi, this is where I am lost, I cannot seem to locate the 'bin' file in the install directory in Program Files on C:
    Is the 'bin' file created after making a new wallet?, currently I have no wallets loaded.

    In C:Program Files/Bitcoin I have:
    deamon folder
    share folder
    bitcoin.conf
    bitcoin.qt
    COPYING
    readme
    uninstall

    In the daemon folder I have:
    bitcoin-cli
    bitcoind
    bitcoin-tx
    bitcoin-wallet
    test_bitcoin

    Thanks.
    As I've mentioned twice already, there's no "bin file".
    It's the folder where bitcoin-wallet is located and the directory where you should use "cd" (change directory) in command prompt.
    Please check my previous replies in this thread since I've already addressed most of these concerns and separate whanau's replies with mine.

    To answer this shortly: it's your old installation since there's a "daemon" folder, which is equivalent to the "bin" folder of the new version.
    And in your reply, there's a "bitcoin-wallet" file inside it; which is what you need to perform salvage. (if the version is too old, it may not contain the salvage command)

    The workflow is this simple (without repeating the already given instructions):
    • Find Bitcoin Core's installation directory (where you installed Bitcoin Core), not the 'bitcoin' data directory in your 'appdata/roaming' folder.
    • Open cmd and cd to the directory above. The trailing "C:\Users\YOUR_USERNAME>" in command prompt will change into that directory after entering the cd command.
    • Use the provided salvage command.
    • Load the salvaged wallet to Bitcoin Core.

    Take note that salvage's success still depends if the keys/master key in your wallet.dat are still intact.

    Thanks once again & I am sorry for you to have to repeat these instructtions. I chose to do this in order doing what I thought was the easiest route & this option was left until last because I am so unsure of what I'm doing.
    I am not good with command prompt & I will try again later tonight because I am just too tired atm. If I get similar errors from my next attempt,  I will then know it is my complete misunderstanding of this & I'll keep trying to understand.

    This is a brand new installation of Windows 10 on a completely different hard drive, this is not the old installation of Bitcoin Core.
    I thought I had installed the latest version of Bitcoin Core. 24.0.1. Is this version correct?

    I cannot explain the daemon folder being there.
    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 25, 2023, 09:59:37 PM
    #60
    Hi, this is where I am lost, I cannot seem to locate the 'bin' file in the install directory in Program Files on C:
    Is the 'bin' file created after making a new wallet?, currently I have no wallets loaded.

    In C:Program Files/Bitcoin I have:
    deamon folder
    share folder
    bitcoin.conf
    bitcoin.qt
    COPYING
    readme
    uninstall

    In the daemon folder I have:
    bitcoin-cli
    bitcoind
    bitcoin-tx
    bitcoin-wallet
    test_bitcoin

    Thanks.
    I've mentioned twice already, there's no "bin file".
    It's the folder where bitcoin-wallet is located and the directory where you should use "cd" (change directory) in command prompt.
    Please check my previous replies in this thread since I've already addressed most of these concerns and separate whanau's replies with mine.

    To answer this shortly: it's your old installation since there's a "daemon" folder, which is equivalent to the "bin" folder of the new version.
    And in your reply, there's a "bitcoin-wallet" file inside it; which is what you need to perform salvage. (if the version is too old, it may not contain the salvage command)

    The workflow is this simple (without repeating the already given instructions):
    • Find Bitcoin Core's installation directory (where you installed Bitcoin Core), not the 'bitcoin' data directory in your 'appdata/roaming' folder.
    • Open cmd and cd to the directory above. The trailing "C:\Users\YOUR_USERNAME>" in command prompt will change into that directory after entering the cd command.
    • Use the provided salvage command.
    • Load the salvaged wallet to Bitcoin Core.

    Take note that salvage's success still depends if the keys/master key in your wallet.dat are still intact.
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 09:46:41 PM
    #59
    You are running the command prompt/ powershell as an administrator??

    I have used all of the versions of commands as administrator & then normally without admin rights.

    I notice you mention Powershell, I am using command prompt in Windows 10 Pro.
    member
    Activity: 119
    Merit: 36
    May 25, 2023, 09:34:19 PM
    #58
    You are running the command prompt/ powershell as an administrator??
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 09:03:07 PM
    #57
    I think I am out of ideas.

    try just running bitcoin-wallet.exe
    see what it says
    then bitcoin-wallet --wallet
    see what it says should be no wallet file or similar

    Damn it, I just don't understand why the command prompts are not functioning.  Huh
    I have opened the Bitcoin QT & there are no wallets available, I will leave it on overnight again.

    When I try to run the bitcoin-wallet exe in the daemon folder, it disappears before I can see anything.

    Almost forgot to say thank you for being here.
    member
    Activity: 119
    Merit: 36
    May 25, 2023, 08:59:41 PM
    #56
    I think I am out of ideas.

    try just running bitcoin-wallet.exe
    see what it says
    then bitcoin-wallet --wallet
    see what it says should be no wallet file or similar
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 08:56:07 PM
    #55
    I tried this in command prompt with Bitcoin Core open & closed & got the same error.

     "bitcoin-wallet --wallet=wallet.dat salvage" is not a recognised as an internal or external command, operable program or batch file.

    "bitcoin-wallet.exe --wallet=wallet.dat salvage" is not a recognised as an internal or external command, operable program or batch file.

    This is unreal, nothing seems to work the way it should.
    member
    Activity: 119
    Merit: 36
    May 25, 2023, 08:52:24 PM
    #54
    I think that is a windows oddity

    try with quotation marks around the lot. sometimes windows doesn't like spaces..

     "bitcoin-wallet --wallet=wallet.dat salvage"

    then
     "bitcoin-wallet.exe --wallet=wallet.dat salvage"
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 08:47:00 PM
    #53
    OK I suspect the path to your wallet may be wrong try this

    copy your wallet to

    "C:\Program Files\Bitcoin\
    and copy your wallet there. Then run

    bitcoin-wallet --wallet=wallet.dat salvage

    no "" around wallet.dat

    I confirm bitcoin-wallet is a program for me, so I copied the wallet folder with all my recovered files to the main Bitcoin directory in Program Files, I used command prompt without admin rights, typed: bitcoin-wallet --wallet=wallet.dat salvage

    Received this error: 'bitcoin-wallet' is not a recognised as an internal or external command.

    If I try to run the bitcoin-wallet program, it just disappears in a flash.
    member
    Activity: 119
    Merit: 36
    May 25, 2023, 08:37:30 PM
    #52
    OK I suspect the path to your wallet may be wrong try this

    copy your wallet to

    "C:\Program Files\Bitcoin\bitcoin-wallet" assuming bitcoin-wallet is a folder.
    If its a program then just

    "C:\Program Files\Bitcoin\
    and copy your wallet there. Then run

    bitcoin-wallet --wallet=wallet.dat salvage

    no "" around wallet.dat
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 08:21:32 PM
    #51
    Gotcha & it's amazing that I actually thought to try that & it came up with this error 'the system cannot find the file specified'
    I did retry the  command again from your text cd "C:\Program Files\Bitcoin\bitcoin-wallet but the same error comes up & I also tried the command prompt in admin mode but the same error 'the system cannot find the file specified'

    At least I do know the password  Smiley

    If I can get this wallet back online, I will treat both of you for taking the time out to help me like this.
    member
    Activity: 119
    Merit: 36
    May 25, 2023, 08:17:50 PM
    #50
    forget bin for now
    cd "C:\Program Files\Bitcoin\bitcoin-wallet if bitcoin-wallet is a folder otherwise
    cd "C:\Program Files\Bitcoin
    then run
    bitcoin-wallet --wallet="full path to your wallet.dat" salvage

    I hope you know the password if the wallet is encrypted otherwise we are wasting our time.
    DON'T Publish it! Grin
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 08:08:03 PM
    #49
    Thanks for the quick reply & I have tried your idea to copy all the files into the wallet from my recovered files, unfortunately there are still no wallets to load.

    I have tried the command prompt cd "C:\Program Files\Bitcoin\bin" & got this error 'the system cannot find the file specified'
    member
    Activity: 119
    Merit: 36
    May 25, 2023, 07:29:09 PM
    #48
    You wrote:

    In the daemon folder I have:
    bitcoin-cli
    bitcoind
    bitcoin-tx
    bitcoin-wallet  *** is the executable file
    ^^^So, its in the daemon folder. ,^^ as nc50lc says:-

    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"

    test_bitcoin



    I do have these from the original deleted but recovered wallet folder:
    database folder
    .walletlock
    db
    wallet.dat

    No harm sticking them in the C:\Users\MyUserName\Appdata\Roaming\Bitcoin\wallets folder and see what happens.. Shut down bitcoin core first.

    Do you know you can always make another empty wallet for testing from the files menu in bitcoin core??
    You could do that and paste the above in that folder  overwriting what was just created.

    good luck

    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 05:53:13 PM
    #47
    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=" 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.
    [/quote]

    Hi, this is where I am lost, I cannot seem to locate the 'bin' file in the install directory in Program Files on C:
    Is the 'bin' file created after making a new wallet?, currently I have no wallets loaded.

    In C:Program Files/Bitcoin I have:
    deamon folder
    share folder
    bitcoin.conf
    bitcoin.qt
    COPYING
    readme
    uninstall

    In the daemon folder I have:
    bitcoin-cli
    bitcoind
    bitcoin-tx
    bitcoin-wallet
    test_bitcoin

    Thanks.
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 04:31:28 PM
    #46
    I do have these from the original deleted but recovered wallet folder:
    database folder
    .walletlock
    db
    wallet.dat

    I think I did encrypt the wallet but not entirely sure & is called wallet.dat, I didn't rename it.

    I'll try the restore method soon.

    Thanks again.

    Just to see what happened I tried the 'restore' option from the wallet file I copied onto my D: drive & pointed Bitcoin Core to that file, typed in the wallet name & received a message saying Restore wallet failed.
    Wallet file verification failed to load database C:\Users\MyUserName\Appdata\Roaming\Bitcoin\wallets\My wallet
    Data is not in recognised format.

    Next I will try the 'repair' option.
    member
    Activity: 119
    Merit: 36
    May 25, 2023, 04:23:58 PM
    #45
    A bit strange. Huh Seems like bitcoin core is not picking up the wallet file
    Out of interest, is the wallet file encrypted?

    wallet.dat is all lowercase, no spaces windows hasn't named it wallet.dat.dat or something weird??

    For good measure I would shut down bitcoin core and reboot windows (power down)
    Then open bitcoin core again. If you end up with the same greyed out wallet option then follow nc50lc's advice.

    If that advice doesn't work more drastic measures may be necessary. I have my own recovery software which I do not wish to make public.
    Assuming your wallet is encrypted, so safe, If all else fails and you want me to try my software then send me a pm.

    Good luck
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 03:26:34 PM
    #44
    I am surprised that the wallet.dat file isn't seen

    nc50lc has provided good advice ..
    A sole 'wallet.dat' file inside wallets folder should be automatically loaded as "default wallet" once Bitcoin Core is started.

    i would just add to check that in C:\Users\MyUserName\Appdata\Roaming\Bitcoin there are the following files in the wallets folder

    wallet.dat
    walletlock
    db.log
    and a folder called database

    As you use windows walletlock may have an extension or be hidden.


    In C:\Users\MyUserName\Appdata\Roaming\Bitcoin I have the following files.

    blocks
    chainstate
    wallet (with my wallet.dat inside)
    .lock
    anchors.dat
    banlist.json
    debug
    fee_estimates.dat
    mempool.dat
    peers.dat
    settings.json

    These files are not present in the wallet folder:
    walletlock
    db.log
    and a folder called database


    I really appreciate everything you have done to help thus far.

    Cheers.
    member
    Activity: 119
    Merit: 36
    May 25, 2023, 02:14:15 PM
    #43
    I am surprised that the wallet.dat file isn't seen

    nc50lc has provided good advice ..
    A sole 'wallet.dat' file inside wallets folder should be automatically loaded as "default wallet" once Bitcoin Core is started.

    i would just add to check that in C:\Users\MyUserName\Appdata\Roaming\Bitcoin there are the following files in the wallets folder

    wallet.dat
    walletlock
    db.log
    and a folder called database

    As you use windows walletlock may have an extension or be hidden.
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 11:05:22 AM
    #42
    Thanks, yes I restarted the Bitcoin Core program & it's the same.
    I'll try the 'restore' option later this evening, I will have to check back in the thread for the instructions to do this task.
    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 25, 2023, 10:38:03 AM
    #41
    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.
    A sole 'wallet.dat' file inside wallets folder should be automatically loaded as "default wallet" once Bitcoin Core is started.
    (update note: this is not applicable to the later versions.)
    Since it's in the 'wallets' folder, it should also be available in the Open wallet menu.
    So it seems like there's an issue with your restored wallet.dat file.

    Can you try to load it via "File->Restore..."?
    Close Bitcoin Core, move your wallet.dat file somewhere else, Open Bitcoin Core and use that restore menu
    then in the file explorer that popped-up, browse to the location of the wallet.dat file and select it.
    If it loaded, a new wallet file will be created with the same keys from your wallet file; if not, it's corrupted and you should use salvage as I've instructed.
    jr. member
    Activity: 62
    Merit: 1
    May 25, 2023, 10:33:52 AM
    #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.
    jr. member
    Activity: 62
    Merit: 1
    May 24, 2023, 05:15:16 PM
    #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.
    member
    Activity: 119
    Merit: 36
    May 24, 2023, 04: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
    jr. member
    Activity: 62
    Merit: 1
    May 24, 2023, 04: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.
    member
    Activity: 119
    Merit: 36
    May 24, 2023, 03: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.
    jr. member
    Activity: 62
    Merit: 1
    May 24, 2023, 02: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.

    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 24, 2023, 05: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.
    sr. member
    Activity: 1498
    Merit: 271
    DGbet.fun - Crypto Sportsbook
    May 24, 2023, 04: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/

    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 23, 2023, 09:43:21 PM
    #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\".

    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.

    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=" 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.
    member
    Activity: 119
    Merit: 36
    May 23, 2023, 01: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 

    jr. member
    Activity: 62
    Merit: 1
    May 23, 2023, 12: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:
    newbie
    Activity: 1
    Merit: 0
    May 21, 2023, 09:42:22 PM
    #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.
    jr. member
    Activity: 62
    Merit: 1
    May 21, 2023, 01: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
    member
    Activity: 119
    Merit: 36
    May 21, 2023, 01: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\\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
    jr. member
    Activity: 62
    Merit: 1
    May 21, 2023, 10:21:23 AM
    #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.
    member
    Activity: 119
    Merit: 36
    May 20, 2023, 06: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??)

    jr. member
    Activity: 62
    Merit: 1
    May 20, 2023, 05:33:08 PM
    #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.
    member
    Activity: 119
    Merit: 36
    May 20, 2023, 05:07:35 PM
    #23
    this may help.

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

    Obviously choose your version of windows.
    jr. member
    Activity: 62
    Merit: 1
    May 20, 2023, 05: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.

    member
    Activity: 119
    Merit: 36
    May 20, 2023, 04: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.
    jr. member
    Activity: 62
    Merit: 1
    May 20, 2023, 04:43:34 PM
    #20
    Ok tried running the QT as admin & we still get the same error: Method not found 32601
    jr. member
    Activity: 62
    Merit: 1
    May 20, 2023, 04:30:47 PM
    #19
    Are you running bitcoin core as an Administrator?? That might help

    No I havn't tried that yet, will it make the 'bin' file appear in the folders? Our 'bin' file is no where to be found.
    member
    Activity: 119
    Merit: 36
    May 20, 2023, 04:28:27 PM
    #18
    Are you running bitcoin core as an Administrator?? That might help
    jr. member
    Activity: 62
    Merit: 1
    May 20, 2023, 04:27:01 PM
    #17
    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/

    Where did you get your Bitcoin Core from?

    Don't use https://bitcoin.org/en/download as this is really outdated and apparently not kept current.

    I know it has to be down to my error, I had no idea that was not current. I'll try to find another wallet but not sure as to where I'll find one. Trouble is I am in the UK & we have to use a damn VPN to get the bitcoin client.

    Thanks for posting.
    hero member
    Activity: 714
    Merit: 1010
    Crypto Swap Exchange
    May 20, 2023, 04:24:03 PM
    #16
    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/

    Where did you get your Bitcoin Core from?

    Don't use https://bitcoin.org/en/download as this is really outdated and apparently not kept current.
    jr. member
    Activity: 62
    Merit: 1
    May 20, 2023, 02:34:07 PM
    #15
    Thanks for the responses & this just seems to get harder to understand, we are using bitcoin core 22.0, this is as far I i can tell the latest version, I used the command in the QT again & got this message: Method not found (code -32601)

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

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

    There is still no 'bin' file.

    I feel at a complete loss as to how I am going to get this done, I figure I have lost the coins forever.
    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 19, 2023, 10:27:39 PM
    #14
    Thank you but this is so odd, we do not seem to have a 'bin' folder in the Bitcoin Core directory.
    -snip-
    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?
    Okay, so you're using an older version of Bitcoin Core.
    Then, bitcoin-wallet tool is in your "daemon" folder.

    You won't be able to fully scan the wallet.dat with a pruned blockchain.
    But you can at least test if it'll load without error on a freshly installed Bitcoin Core after performing "salvage" to the corrupted restored wallet.dat.
    member
    Activity: 119
    Merit: 36
    May 19, 2023, 05:47:12 PM
    #13
    If you are using windows and are looking for the directory containing the wallet it will usually be in

     C:\Users\YourUserName\Appdata\Roaming\Bitcoin


    My suggestion would be to do a fresh install of bitcoin core and once up and running, close down bitcoin core(QT) replace the newly created wallet.dat file with a copy of your wallet. The nre start bitcoin core and wait..

    jr. member
    Activity: 62
    Merit: 1
    May 19, 2023, 02:45:35 PM
    #12
    Thank you but this is so odd, we do not seem to have a 'bin' folder in the Bitcoin Core directory. There is nothing like that in the folders, I have the Bitcoin installation on another PC & now have my cloned M.2 drive with the deleted files connected via USB.

    In my install on both PC's that we use, these folders are all we have:
    deamon
    doc
    bitcon qt.exe
    COPYING.txt
    readme.txt
    bitcoin uninstall.exe

    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?
    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 19, 2023, 06:06:00 AM
    #11
    Is the 'bin' folder the 'recycle bin' on my original drive?
    Seems like there's a misunderstanding with the usage of bitcoin-wallet tool...
    My suggestion to use "salvage" is for a possible fix to your already-recovered but corrupted wallet.dat file.
    If successful, the corrupted wallet.dat may work in Bitcoin Core without the previous loading error.

    It's a tool included with Bitcoin Core, which should be in the "bin" folder inside the directory where you've installed it.
    You can install Bitcoin Core to a separate working PC to use be able to use the tool, I'd suggest not to use it in the drive where the deleted files were stored.
    jr. member
    Activity: 62
    Merit: 1
    May 18, 2023, 02:44:29 PM
    #10
    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.
    [/quote]

    Is the 'bin' folder the 'recycle bin' on my original drive?
    jr. member
    Activity: 62
    Merit: 1
    May 18, 2023, 01:00:18 PM
    #9
    No I used EaseUS data recovery for the scan & found the tree of Bitcoin Core folders that have been deleted & the wallet folder is also there.

    I will use  the backup drive I am going the clone later on tonight & keep the original drive safe.
    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 18, 2023, 02:11:48 AM
    #8
    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?
    Do you mean in bitcoin-wallet tool?
    You can put a copy of the corrupted wallet.dat wherever you want and then point to that copy's path.

    Even though it'll automatically create a backup of the to-be-salvaged wallet.dat file, it's still best not to use the original file, always use a copy of it.
    jr. member
    Activity: 62
    Merit: 1
    May 17, 2023, 07:21:04 PM
    #7
    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.
    legendary
    Activity: 2534
    Merit: 6080
    Self-proclaimed Genius
    May 16, 2023, 03:21:18 AM
    #6
    I have the full tree of files that have File path lost showing the same data same as in the app data folder for Bitcoin, so i feel sure the DAT file for the wallet I created is the right one.
    Bitcoin Core saves the wallet.dat file in a folder with the wallet name that you've set, it's inside the wallets folder.
    So the path to the correct wallet.dat should look like this: "bitcoin/wallets//wallet.dat"
    The wallet file's name should strictly be "wallet.dat" and not any other ".dat" file.

    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.
    newbie
    Activity: 28
    Merit: 0
    May 16, 2023, 02:18:49 AM
    #5
     Hi, maybe this will help. You  might need to download java and run this in java. So check how to run java in computer there. Then after your done you can delete java app.
     https://github.com/ameijer/bitcoin_wallet_recovery_tool
    hero member
    Activity: 714
    Merit: 1010
    Crypto Swap Exchange
    May 16, 2023, 12:55:12 AM
    #4
    I hope you first made a forensic image copy of your filesystem before making changes to it with any recovery tool. That way, if one tool fails, you could always and repeatedly restore the initial state of your filesystem and try another, better tool again. A forensic image copy saves all sectors of a filesystem and not only the occupied ones according to the filesystem's directory.

    Flash drives can make serious problems, though. As Windows usually issues TRIM commands when files are deleted, some flash drives may not report back proper data from now marked unused sectors after they've done their garbage collection and wear leveling of flash cells.

    As you're using Windows, did you check if there's some Previous Versions of the deleted folder/files? No past backups of your wallet.dat (if it's a Core HD wallet, older backups are fine)?
    jr. member
    Activity: 62
    Merit: 1
    May 15, 2023, 01:02:23 PM
    #3
    Hi, thanks for the message & info, I used EaseUS data recovery software for this, the two other ones I tried didn't show the deleted files structure, but EaseUS did.
    I have the full tree of files that have File path lost showing the same data same as in the app data folder for Bitcoin, so i feel sure the DAT file for the wallet I created is the right one.

    I'll take a good look at the links you posted & see where I go from there.

    I really appreciate the help, thank you.
    legendary
    Activity: 3374
    Merit: 3095
    Playbet.io - Crypto Casino and Sportsbook
    May 15, 2023, 08:23:17 AM
    #2
    What tool did you use when recovering deleted files?
    Maybe the files you just recently recovered is not actually the wallet.dat file.

    About pywallet you can use --recover to recover your wallet.dat from the hard drive.

    There is already a guide here how to do it check this link below.

    - https://bitcointalksearch.org/topic/guide-recover-your-deleted-keys-38004

    Or try the command posted here below

    - https://bitcointalksearch.org/topic/m.60653031
    jr. member
    Activity: 62
    Merit: 1
    May 14, 2023, 05:15:16 PM
    #1
    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.

    Jump to: