Bitcoin Forum
April 18, 2024, 09:10:25 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Corrupted wallet.dat file - attempt to recover  (Read 2712 times)
JungleOnion (OP)
Sr. Member
****
Offline Offline

Activity: 868
Merit: 279


View Profile WWW
September 17, 2017, 06:11:57 AM
 #1

Hey so this is for an altcoin wallet, I'm not sure if this is the right technical support forum to ask this, but because the wallet is based in the bitcoin core wallet I think this inquiry could fit this forum.

Anyway, I made a mistake and deleted the appdata folder for my wallet, when I noticed the mistake I quickly pressed ctrl+z to undo the deleting and the folder came back to the appdata folder, but the wallet client was open meanwhile, so when the files got restored, for some reason the wallet tried to repopulate the files were missing by creating new ones and I think it override the wallet.dat private keys or something. I created the wallet on august 31st 2017, deposited on september 1st, and this happened in september 9th I believe. After this fuck up on september 9th, the wallet address changed, but the wallet.dat still show it was created on august 31st so I think the wallet.dat is corrupted and I saw in the command line that there's this command "-salvage" which the description says its used to attempt to recover corrupted wallet.dat files.

How can I use this command to fix my wallet?

All files I have in the appdata folder are the ones I created in august 31st.
1713474625
Hero Member
*
Offline Offline

Posts: 1713474625

View Profile Personal Message (Offline)

Ignore
1713474625
Reply with quote  #2

1713474625
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713474625
Hero Member
*
Offline Offline

Posts: 1713474625

View Profile Personal Message (Offline)

Ignore
1713474625
Reply with quote  #2

1713474625
Report to moderator
1713474625
Hero Member
*
Offline Offline

Posts: 1713474625

View Profile Personal Message (Offline)

Ignore
1713474625
Reply with quote  #2

1713474625
Report to moderator
1713474625
Hero Member
*
Offline Offline

Posts: 1713474625

View Profile Personal Message (Offline)

Ignore
1713474625
Reply with quote  #2

1713474625
Report to moderator
bl0ckchayn
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
September 17, 2017, 06:54:28 PM
 #2

did you lose your coins and no longer see them in the wallet? some of the bitcoin based altcoin wallets create backups of the wallet file each time they are launched look in the data folder for a backups folder if you have that then you could try using one of the .dat files in there

also, many people have had success with the pywallet tool for recovering the wallet private keys from a corrupt .dat so you could try that:
https://github.com/jackjack-jj/pywallet

morbius55
Full Member
***
Offline Offline

Activity: 217
Merit: 109


View Profile
September 17, 2017, 07:35:12 PM
 #3

did you lose your coins and no longer see them in the wallet? some of the bitcoin based altcoin wallets create backups of the wallet file each time they are launched look in the data folder for a backups folder if you have that then you could try using one of the .dat files in there

also, many people have had success with the pywallet tool for recovering the wallet private keys from a corrupt .dat so you could try that:
https://github.com/jackjack-jj/pywallet


Pywallet doesn't seem to work anymore, I can't even download it (access denied)?
JungleOnion (OP)
Sr. Member
****
Offline Offline

Activity: 868
Merit: 279


View Profile WWW
September 17, 2017, 09:55:02 PM
 #4

did you lose your coins and no longer see them in the wallet? some of the bitcoin based altcoin wallets create backups of the wallet file each time they are launched look in the data folder for a backups folder if you have that then you could try using one of the .dat files in there

also, many people have had success with the pywallet tool for recovering the wallet private keys from a corrupt .dat so you could try that:
https://github.com/jackjack-jj/pywallet



No this one didn't have automatic backups sadly Sad I'll research more about this tool thanks for the info! Hope I can figure it out.
JungleOnion (OP)
Sr. Member
****
Offline Offline

Activity: 868
Merit: 279


View Profile WWW
September 17, 2017, 09:55:42 PM
 #5

did you lose your coins and no longer see them in the wallet? some of the bitcoin based altcoin wallets create backups of the wallet file each time they are launched look in the data folder for a backups folder if you have that then you could try using one of the .dat files in there

also, many people have had success with the pywallet tool for recovering the wallet private keys from a corrupt .dat so you could try that:
https://github.com/jackjack-jj/pywallet


Pywallet doesn't seem to work anymore, I can't even download it (access denied)?

hey I went to the link bl0ckchayn shared and I downloaded without problems.
cissrawk
Sr. Member
****
Offline Offline

Activity: 1218
Merit: 410


Secure your crypto : https://notyourkeys.org


View Profile
September 18, 2017, 09:19:52 AM
 #6

I saw in the command line that there's this command "-salvage" which the description says its used to attempt to recover corrupted wallet.dat files.

How can I use this command to fix my wallet?
first copy or backup your wallet.dat to safe place from your wallet.dat folder (for safety) , after that use cmd and go to directly to your bitcoin-qt.exe and add "-salvagewallet"
example :
Code:
D:\>cd walletfolder
D:\walletfolder>cd bin
D:\walletfolder\bin>wallet.exe -salvagewallet
change to your wallet destination and wallet name like bitcoin-qt.exe or etc.

edit: i notice is not bitcoin wallet so i change a little bit, but if you say based on bitcoin core so maybe same with it.

I'm doing steam artwork.Official thread (Indo, but please pm me even if you're english speaker) : https://bitcointalk.org/index.php?topic=5323281
NOT YOUR KEYS, NOT YOUR MONEY. PLEASE PROTECT YOUR MONEY! More info click here or go to NotYourKeys.org
Trade Crypto and get 10% cashback BTC16CYsf1yonoVAN3jLAJguREmoJfCy5twi4
kazzzidy
Full Member
***
Offline Offline

Activity: 172
Merit: 100


View Profile
September 19, 2017, 10:04:43 AM
 #7

I saw in the command line that there's this command "-salvage" which the description says its used to attempt to recover corrupted wallet.dat files.

How can I use this command to fix my wallet?
first copy or backup your wallet.dat to safe place from your wallet.dat folder (for safety) , after that use cmd and go to directly to your bitcoin-qt.exe and add "-salvagewallet"
example :
Code:
D:\>cd walletfolder
D:\walletfolder>cd bin
D:\walletfolder\bin>wallet.exe -salvagewallet
change to your wallet destination and wallet name like bitcoin-qt.exe or etc.

edit: i notice is not bitcoin wallet so i change a little bit, but if you say based on bitcoin core so maybe same with it.

what does salvagewallet do? Does it delete the old wallet or restore it in the folder?

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
September 19, 2017, 01:09:44 PM
 #8

It attempts to dump all the private keys it can detect (including false positives) from your wallet.dat... it isn't a magic bullet that will magically resurrect a corrupt or damaged wallet.dat and should only be used as a last resort and only on a copy of the file.

Apparently, there have been instances in the past where salvagewallet has actually corrupted a valid wallet file...

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
JungleOnion (OP)
Sr. Member
****
Offline Offline

Activity: 868
Merit: 279


View Profile WWW
September 20, 2017, 05:49:35 AM
 #9

I saw in the command line that there's this command "-salvage" which the description says its used to attempt to recover corrupted wallet.dat files.

How can I use this command to fix my wallet?
first copy or backup your wallet.dat to safe place from your wallet.dat folder (for safety) , after that use cmd and go to directly to your bitcoin-qt.exe and add "-salvagewallet"
example :
Code:
D:\>cd walletfolder
D:\walletfolder>cd bin
D:\walletfolder\bin>wallet.exe -salvagewallet
change to your wallet destination and wallet name like bitcoin-qt.exe or etc.

edit: i notice is not bitcoin wallet so i change a little bit, but if you say based on bitcoin core so maybe same with it.

Hey thanks for the help, I'll try and see how it goes. I'm going to try everything I can to recover that wallet! Shocked
JungleOnion (OP)
Sr. Member
****
Offline Offline

Activity: 868
Merit: 279


View Profile WWW
September 20, 2017, 06:01:42 AM
 #10

So nothing I got an error saying
"wallet.dat corrupt, salvage failed"
 
After I did the salvage in cmd it pop out asking me how I wanted to open the file, because I couldn't find how to open it I opened it in a notepad and then save it as a wallet.dat, opened it in the folder and got that message. Did I do something wrong?
cissrawk
Sr. Member
****
Offline Offline

Activity: 1218
Merit: 410


Secure your crypto : https://notyourkeys.org


View Profile
September 20, 2017, 07:14:43 AM
 #11

So nothing I got an error saying
"wallet.dat corrupt, salvage failed"
 
After I did the salvage in cmd it pop out asking me how I wanted to open the file, because I couldn't find how to open it I opened it in a notepad and then save it as a wallet.dat, opened it in the folder and got that message. Did I do something wrong?

Never got that before, maybe you can try use pywallet or this method https://bitcointalk.org/index.php?topic=22697.0

I'm doing steam artwork.Official thread (Indo, but please pm me even if you're english speaker) : https://bitcointalk.org/index.php?topic=5323281
NOT YOUR KEYS, NOT YOUR MONEY. PLEASE PROTECT YOUR MONEY! More info click here or go to NotYourKeys.org
Trade Crypto and get 10% cashback BTC16CYsf1yonoVAN3jLAJguREmoJfCy5twi4
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
September 20, 2017, 10:58:07 PM
 #12

So nothing I got an error saying
"wallet.dat corrupt, salvage failed"
 
After I did the salvage in cmd it pop out asking me how I wanted to open the file, because I couldn't find how to open it I opened it in a notepad and then save it as a wallet.dat, opened it in the folder and got that message. Did I do something wrong?

That may be your problem, don't use notepad to save the wallet.dat file. There are four different types of file you can save from notepad and getting the encoding wrong on that is going to cause troubles with salvagewallet.

As and addition to what cissrawk posted, go to github.com/jackjack-jj/pywallet to download pywallet (jackjack is a user here also).
JungleOnion (OP)
Sr. Member
****
Offline Offline

Activity: 868
Merit: 279


View Profile WWW
September 24, 2017, 08:32:40 PM
 #13

thanks guys, I'm still trying to figure out all this, I'm encourage to recover that wallet!
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
September 24, 2017, 10:22:10 PM
 #14

thanks guys, I'm still trying to figure out all this, I'm encourage to recover that wallet!

Did you attempt pywallet, did it work or fail?
It normally works a bit better than the regular salvagewallet command does.
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!