Bitcoin Forum
May 06, 2024, 03:42:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Unable to open corrupted wallet dat file  (Read 107 times)
olvin (OP)
Jr. Member
*
Offline Offline

Activity: 36
Merit: 4


View Profile
March 01, 2023, 06:36:31 AM
 #1

I got a backup wallet.dat file of bitcoin core having some coins in it.
I opened it at notepad ++
Saw gibberish words writing unable to understand.
Mistakenly, I deleted some words from that file.
Now the bitcoin core show that the wallet.dat file has got corrupted and is unable to open it.
Is there any way to recover it, repair it.
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714966978
Hero Member
*
Offline Offline

Posts: 1714966978

View Profile Personal Message (Offline)

Ignore
1714966978
Reply with quote  #2

1714966978
Report to moderator
1714966978
Hero Member
*
Offline Offline

Posts: 1714966978

View Profile Personal Message (Offline)

Ignore
1714966978
Reply with quote  #2

1714966978
Report to moderator
1714966978
Hero Member
*
Offline Offline

Posts: 1714966978

View Profile Personal Message (Offline)

Ignore
1714966978
Reply with quote  #2

1714966978
Report to moderator
mk4
Legendary
*
Offline Offline

Activity: 2758
Merit: 3830


Paldo.io 🤖


View Profile
March 01, 2023, 06:39:17 AM
 #2

Do you have a previous backup of your operating system? You might be able to do a rollback to the date before you try to edit the file. Do some research on what the steps are as I haven't used Windows for a while now (which I assume you are using).

As for the random gibberish, well, you're not really meant to see some words on that file.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4845



View Profile
March 01, 2023, 06:47:17 AM
 #3

If you are using Windows, right click on the wallet file and click on 'Restore Previous Versions'. That should be able to restore the wallet back to the previous version. On other OS, there should be a way to restore back previous version too.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
olvin (OP)
Jr. Member
*
Offline Offline

Activity: 36
Merit: 4


View Profile
March 01, 2023, 06:51:14 AM
 #4

Ok got it.
witcher_sense
Legendary
*
Offline Offline

Activity: 2338
Merit: 4318

🔐BitcoinMessage.Tools🔑


View Profile WWW
March 01, 2023, 07:04:44 AM
Merited by hugeblack (4)
 #5

1) You can try to restore a previous version of wallet file by right-clicking on it and choosing "Restore Previous Versions" option. For detailed instructions, visit this page https://support.microsoft.com/en-us/windows/recover-lost-or-deleted-files-7bf065bf-f1ea-0a78-c1cf-7dcf51cc8bfc

2) Check this location for previous backups for the same file: C:\Users\<user>\AppData\Roaming\Notepad++\backup

3) If you have file versioning enabled, go to backup folder and search for a timestamp before the moment you made a change. You can enable timestamped backups in Settings > Preferences > Backup by selecting "Verbose backup". It will protect you from accidential overwrites in the future.

4) Also try this:

How to Recover Overwritten Notepad File

Some users complained that they had written over a text file on their PC (accidentally saved over the notepad file). Any file recovery program can’t help them recover the file on this occasion. How can they restore overwritten text file? In fact, the information from the previous versions of a notepad file is saved in a file in the Windows system; but it is "hidden" by default.

How to use the hidden files to recover overwritten text file:

    Open File Explorer.
    Navigate to the folder that contains the overwritten notepad file.
    Select View from the menu bar.
    Click Options from its submenu.
    Choose Change folder and search options from the drop-down list.
    Select View tab.
    Select Show hidden files, folders, and drives to display hidden files and directories.
    Click Apply and OK button to confirm changes.
    Open the hidden files in the same directory; one of them is the exact copy of the previous version of your overwritten file.


█▀▀▀











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











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

Activity: 36
Merit: 4


View Profile
March 01, 2023, 08:15:06 AM
 #6

1) You can try to restore a previous version of wallet file by right-clicking on it and choosing "Restore Previous Versions" option. For detailed instructions, visit this page https://support.microsoft.com/en-us/windows/recover-lost-or-deleted-files-7bf065bf-f1ea-0a78-c1cf-7dcf51cc8bfc

2) Check this location for previous backups for the same file: C:\Users\<user>\AppData\Roaming\Notepad++\backup

3) If you have file versioning enabled, go to backup folder and search for a timestamp before the moment you made a change. You can enable timestamped backups in Settings > Preferences > Backup by selecting "Verbose backup". It will protect you from accidential overwrites in the future.

4) Also try this:

How to Recover Overwritten Notepad File

Some users complained that they had written over a text file on their PC (accidentally saved over the notepad file). Any file recovery program can’t help them recover the file on this occasion. How can they restore overwritten text file? In fact, the information from the previous versions of a notepad file is saved in a file in the Windows system; but it is "hidden" by default.

How to use the hidden files to recover overwritten text file:

    Open File Explorer.
    Navigate to the folder that contains the overwritten notepad file.
    Select View from the menu bar.
    Click Options from its submenu.
    Choose Change folder and search options from the drop-down list.
    Select View tab.
    Select Show hidden files, folders, and drives to display hidden files and directories.
    Click Apply and OK button to confirm changes.
    Open the hidden files in the same directory; one of them is the exact copy of the previous version of your overwritten file.


But my problem is -
Few days back I deleted those words from the wallet.dat file, saved the file at computer and also uninstalled the notepad++
Now I remember I did mistake, so in order to check it again, I installed notpad++ and opened the file. In this case how can i get the previous version of the file restored?

Or is there any way to atleast get the private key from the corrupted file.

Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4845



View Profile
March 01, 2023, 09:13:57 AM
 #7

Or is there any way to atleast get the private key from the corrupted file.
The file is encrypted, all characters seen can not be interpreted.

It is always advisable to backup your master private key instead because Bitcoin Core does not support seed phrase. Wallet file can corrupt to the extent that you may not be able to restore it to its original version, but keys backup can never fail unless you misplace it and did not see it again.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5588


Self-proclaimed Genius


View Profile
March 01, 2023, 01:46:44 PM
 #8

Is there any way to recover it, repair it.
Try to run "salvage" on a copy of that wallet using Bitcoin Core's bitcoin-wallet tool.
The result will depend on the deleted parts, if the (encrypted) master key is intact, it should be able to restore it to a usable state.

Follow this post to use the command:
Try Bitcoin Core's bitcoin-wallet tool's "salvage".
"bitcoin-wallet" is in the "bin" folder inside Bitcoin Core's installation directory (where bitcoind and bitcoin-cli are located).

To use it, open Terminal, cd to the directory where bitcoin-wallet is.
Then use the command (provide the full path to the wallet.dat file):
Code:
bitcoin-wallet --wallet="E:\Folder\wallet.dat" salvage

It wont return with any response (unless it failed) but you will see a backup file (wallet.dat.xxxxx.bak) where the wallet.dat is located.
The new wallet.dat is the "salvaged" wallet.

If you don't know how to "cd" (change directory), simply type cd "path_to_the_directory" in your Command Prompt window, in this case bitcoin core's bin folder.
e.g. (Windows default): cd C:\Program Files\Bitcoin\bin

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1]
  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!