Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: wetcat33333 on September 23, 2018, 09:49:32 PM



Title: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on September 23, 2018, 09:49:32 PM
Hi, so I installed bitcoin and did a bit of mining back in 2011, forgot about it until a friend of my started talking about bitcoin and I remembered I had tried it so he suggested I look on my old hard drive for a wallet.dat file, I did and I found one.  I am installing bitcoin core now, downloading part of the chain, I added prune 1000 because it's just too much for my machine.  I did try to open the old wallet by replacing the wallet.dat file with my old file but got a message saying it was corrupted. I am waiting until bitcoin finishes downloading to try it again but if it doesn't work - any suggestions?

Thanks!


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: Btcspot on September 23, 2018, 11:01:39 PM
 Make sure you dont overwrite the original wallet.dat and just place it there after you delete the default wallet or youll lose money. Keep it in safe place and make copies.  You can try this

    Open bitcoin-qt

    In bitcoin-qt open console

    In console you can type "help" <return> for commands. Enter your password like this: walletpassphrase passphrasetimeout in seconds. If you dont have password then type dumprivkey (with your address) will dump your private key

    Copy that key

    Open Electrum you can get it in electrum.org site

    Choose "New" and "restore wallet"

    Enter the copied private key and enter
    You should see your funds. [mod edit: no begging]


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on September 23, 2018, 11:04:39 PM
Thanks, if it works I will :)  I doubt there is much in there though I don't remember spending a lot of time on it.


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: Abdussamad on September 24, 2018, 07:41:00 AM
you have to replace the wallet.dat before you download the chain because it's looking for unspent outputs related to your wallet as it downloads the chain. if you do it later you have to run rescan. also you only replace it after you've shutdown core. never replace the file while core is running. so i suggest shutting down core, replacing the file and then running core and seeing what happens. there's also a recover wallet command line option you can try if the wallet file is corrupted. see salvage wallet: https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments




Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on September 24, 2018, 04:00:56 PM
you have to replace the wallet.dat before you download the chain because it's looking for unspent outputs related to your wallet as it downloads the chain. if you do it later you have to run rescan. also you only replace it after you've shutdown core. never replace the file while core is running. so i suggest shutting down core, replacing the file and then running core and seeing what happens. there's also a recover wallet command line option you can try if the wallet file is corrupted. see salvage wallet: https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments


Yeah, I saw that after I started downloading the chain.  I'm still waiting for it to finish downloading, hopefully it will be done today at some point. I didn't download the entire chain though, I'm wondering if that will be an issue...

Thanks for the info.  I'll post what happens, hopefully I can recover it!


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: bob123 on September 29, 2018, 06:34:03 AM
Yeah, I saw that after I started downloading the chain.  I'm still waiting for it to finish downloading, hopefully it will be done today at some point. I didn't download the entire chain though, I'm wondering if that will be an issue...

What do you mean by "didn't download the entire chain" ?

You can either sync the (full) blockchain or not sync it. You can't just partially sync it on your device.

Did you properly start core and started the syncing process ? If so, it doesn't matter when you paste your wallet.dat file into the data directory.
Simply just download + sync the blockchain, shutdown core, replace the wallet file (never delete a wallet file, always just rename them), start up core again with a rescan.

That's the fastest and most convenient way to check whether you still have funds sitting inside of your wallet. But your local copy of the blockchain has to be fully synced to be able to check different wallet.dat's for their BTC's.


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on March 21, 2019, 05:52:13 AM
I forgot to post the result.  I kept getting a message that wallet file was corrupted.  I sent it to a friend, bitcoin miner from way back, and he checked it and the balance was 0, but he also got the corrupted message and said he had never seen that before so he wanted me to try and check it on my old hard drive but I haven't done it yet.  I don't think there is anything recoverable, if there was anything to begin with.  :(


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: poordeveloper on March 21, 2019, 06:11:44 AM
I forgot to post the result.  I kept getting a message that wallet file was corrupted.  I sent it to a friend, bitcoin miner from way back, and he checked it and the balance was 0, but he also got the corrupted message and said he had never seen that before so he wanted me to try and check it on my old hard drive but I haven't done it yet.  I don't think there is anything recoverable, if there was anything to begin with.  :(
Even if it's corrupt, you may be able to get some results using other methods.

Please note it's strongly recommended to backup your entire drive (or even working with a drive clone, if possible) before trying to recover the keys. A boot CD/USB is a great way to achieve this.

Then, here is a guide on how to use pywallet for searching keys: https://bitcointalk.org/index.php?topic=38004.0 (credits to LoyceV for listing it on his thread (https://bitcointalk.org/index.php?topic=4959742.0)).

As a last resort, I repeat - as a last resort, and working with a backup: the -salvagewallet command may be able to recover some of the keys: https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: calkob on March 23, 2019, 08:46:33 AM
I forgot to post the result.  I kept getting a message that wallet file was corrupted.  I sent it to a friend, bitcoin miner from way back, and he checked it and the balance was 0, but he also got the corrupted message and said he had never seen that before so he wanted me to try and check it on my old hard drive but I haven't done it yet.  I don't think there is anything recoverable, if there was anything to begin with.  :(

Sent it to a friend............ opps  :o I hope you could trust him? how do you know that he didnt just move some Bitcoin from it?


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: Bitcoin_Arena on March 23, 2019, 10:19:02 PM
Sent it to a friend............ opps  :o I hope you could trust him? how do you know that he didnt just move some Bitcoin from it?
What kind of foolish friend would that be?
He will obviously see a recent transaction if the friend did try to move out the Bitcoins


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: elda34b on March 24, 2019, 02:58:22 AM
What kind of foolish friend would that be?
He will obviously see a recent transaction if the friend did try to move out the Bitcoins

Yep, but the problem is how to prove that he is the one who did that transaction.
Anyway, that's not really a good practice unless you've a very trusted friend. As long as OP doesn't give away any file online.


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: keychainX on March 28, 2019, 01:33:05 PM
Hi, so I installed bitcoin and did a bit of mining back in 2011, forgot about it until a friend of my started talking about bitcoin and I remembered I had tried it so he suggested I look on my old hard drive for a wallet.dat file, I did and I found one.  I am installing bitcoin core now, downloading part of the chain, I added prune 1000 because it's just too much for my machine.  I did try to open the old wallet by replacing the wallet.dat file with my old file but got a message saying it was corrupted. I am waiting until bitcoin finishes downloading to try it again but if it doesn't work - any suggestions?

Thanks!

If you are familiar with python, then you can use pywallet.py to dump your key, then you can import it into a lightwallet like electrum. No need to download the whole
blockchain and sync.

Pywallet can be downloaded from here: https://github.com/jackjack-jj/pywallet (its opensource)

Electrum can be downloaded here: https://electrum.org/#download

Anyways, pls post updates how it went.

/KX


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on March 30, 2019, 06:05:50 PM
I forgot to post the result.  I kept getting a message that wallet file was corrupted.  I sent it to a friend, bitcoin miner from way back, and he checked it and the balance was 0, but he also got the corrupted message and said he had never seen that before so he wanted me to try and check it on my old hard drive but I haven't done it yet.  I don't think there is anything recoverable, if there was anything to begin with.  :(
Even if it's corrupt, you may be able to get some results using other methods.

Please note it's strongly recommended to backup your entire drive (or even working with a drive clone, if possible) before trying to recover the keys. A boot CD/USB is a great way to achieve this.

Then, here is a guide on how to use pywallet for searching keys: https://bitcointalk.org/index.php?topic=38004.0 (credits to LoyceV for listing it on his thread (https://bitcointalk.org/index.php?topic=4959742.0)).

As a last resort, I repeat - as a last resort, and working with a backup: the -salvagewallet command may be able to recover some of the keys: https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments

Thanks. I did write down the seed, I found that the other day.


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on March 30, 2019, 06:13:48 PM
I forgot to post the result.  I kept getting a message that wallet file was corrupted.  I sent it to a friend, bitcoin miner from way back, and he checked it and the balance was 0, but he also got the corrupted message and said he had never seen that before so he wanted me to try and check it on my old hard drive but I haven't done it yet.  I don't think there is anything recoverable, if there was anything to begin with.  :(

Sent it to a friend............ opps  :o I hope you could trust him? how do you know that he didnt just move some Bitcoin from it?


I've known him for 20 years. He has plenty of BTC.  He was one of the first miners, he's the one that told me about it back in 2011. But yeah, normally, that's not a good idea. Smiley


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on March 30, 2019, 09:06:58 PM
Hi, so I installed bitcoin and did a bit of mining back in 2011, forgot about it until a friend of my started talking about bitcoin and I remembered I had tried it so he suggested I look on my old hard drive for a wallet.dat file, I did and I found one.  I am installing bitcoin core now, downloading part of the chain, I added prune 1000 because it's just too much for my machine.  I did try to open the old wallet by replacing the wallet.dat file with my old file but got a message saying it was corrupted. I am waiting until bitcoin finishes downloading to try it again but if it doesn't work - any suggestions?

Thanks!

If you are familiar with python, then you can use pywallet.py to dump your key, then you can import it into a lightwallet like electrum. No need to download the whole
blockchain and sync.

Pywallet can be downloaded from here: https://github.com/jackjack-jj/pywallet (its opensource)

Electrum can be downloaded here: https://electrum.org/#download

Anyways, pls post updates how it went.

/KX

I have electrum, just tried to import the old wallet and got this message: "Cannot read file"



Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on March 30, 2019, 10:00:41 PM
I forgot to post the result.  I kept getting a message that wallet file was corrupted.  I sent it to a friend, bitcoin miner from way back, and he checked it and the balance was 0, but he also got the corrupted message and said he had never seen that before so he wanted me to try and check it on my old hard drive but I haven't done it yet.  I don't think there is anything recoverable, if there was anything to begin with.  :(
Even if it's corrupt, you may be able to get some results using other methods.

Please note it's strongly recommended to backup your entire drive (or even working with a drive clone, if possible) before trying to recover the keys. A boot CD/USB is a great way to achieve this.

Then, here is a guide on how to use pywallet for searching keys: https://bitcointalk.org/index.php?topic=38004.0 (credits to LoyceV for listing it on his thread (https://bitcointalk.org/index.php?topic=4959742.0)).

As a last resort, I repeat - as a last resort, and working with a backup: the -salvagewallet command may be able to recover some of the keys: https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments

Thanks. I did write down the seed, I found that the other day.

And why is -salvagewallet a last resort? I tried that back in Sept when I first found the file.


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: HCP on March 30, 2019, 10:21:18 PM
Thanks. I did write down the seed, I found that the other day.
If you have a "seed that you wrote down"... then you didn't have Bitcoin Core. Bitcon Core has never used "12 word seed mnemonics".


I have electrum, just tried to import the old wallet and got this message: "Cannot read file"
And why is -salvagewallet a last resort? I tried that back in Sept when I first found the file.
If it was an Electrum wallet file... and you attempted to load it into Bitcoin Core using -salvagewallet, you probably corrupted the wallet file. Hence why Electrum will no longer be able to read it. "salvagewallet" tries it's best to extract keys, but will irrevocably change the wallet file... so if it wasn't a Bitcoin Core wallet file, it will likely end up corrupted.


So, if you have an Electrum seed, use Electrum, create new wallet file, use "standard wallet -> I already have a seed" option and input the seed... wallet will be regenerated.


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on March 30, 2019, 10:45:15 PM
Thanks. I did write down the seed, I found that the other day.
If you have a "seed that you wrote down"... then you didn't have Bitcoin Core. Bitcon Core has never used "12 word seed mnemonics".


I have electrum, just tried to import the old wallet and got this message: "Cannot read file"
And why is -salvagewallet a last resort? I tried that back in Sept when I first found the file.
If it was an Electrum wallet file... and you attempted to load it into Bitcoin Core using -salvagewallet, you probably corrupted the wallet file. Hence why Electrum will no longer be able to read it. "salvagewallet" tries it's best to extract keys, but will irrevocably change the wallet file... so if it wasn't a Bitcoin Core wallet file, it will likely end up corrupted.


So, if you have an Electrum seed, use Electrum, create new wallet file, use "standard wallet -> I already have a seed" option and input the seed... wallet will be regenerated.

No, the old wallet was a bitcoin wallet. I tried to load it into bitcoin with -salvagewallet months ago. Maybe that corrupted it?  I have another backup copy.

Today I tried electrum and got the error.  The seed I found was not the old seed, it was the new seed :( I might have written itdown somewhere else but who knows...  I took at my old files and I do have an address.dat file.  Do you know of a way to get my old address off of that?


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: HCP on March 31, 2019, 01:53:55 AM
I took at my old files and I do have an address.dat file.  Do you know of a way to get my old address off of that?

According to the wiki...
addr.dat [Versions prior to v0.7.0]
 - Storage for ip addresses to make a reconnect easier

So I doubt that the file you have, has anything related to your wallet or biutcoin addresses in it. :-\



No, the old wallet was a bitcoin wallet.

Today I tried electrum and got the error.  The seed I found was not the old seed, it was the new seed :( I might have written itdown somewhere else but who knows...  
I am confused, because you keep talking about "seeds"??!? ??? Bitcoin Core never utilised "seed mnemonics" (aka 12 word phrases etc) as a backup system. So, unless you are also attempting to recover a completely unrelated Electrum/BIP39 wallet... any seeds you may or may not have written down are completely irrelevant, with regards to recovering your Bitcoin Core wallet.


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on March 31, 2019, 02:29:44 AM
I took at my old files and I do have an address.dat file.  Do you know of a way to get my old address off of that?

According to the wiki...
addr.dat [Versions prior to v0.7.0]
 - Storage for ip addresses to make a reconnect easier

So I doubt that the file you have, has anything related to your wallet or biutcoin addresses in it. :-\

OK.

No, the old wallet was a bitcoin wallet.

Today I tried electrum and got the error.  The seed I found was not the old seed, it was the new seed :( I might have written itdown somewhere else but who knows...  
I am confused, because you keep talking about "seeds"??!? ??? Bitcoin Core never utilised "seed mnemonics" (aka 12 word phrases etc) as a backup system. So, unless you are also attempting to recover a completely unrelated Electrum/BIP39 wallet... any seeds you may or may not have written down are completely irrelevant, with regards to recovering your Bitcoin Core wallet.

Really? I thought I remembered using a seed way back when, maybe not.  I checked my old hard drive, the only thing on it was Bitcoin. I'm going to try pywallet as soon as I figure it out.



Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on March 31, 2019, 03:11:24 PM
So I tried this before I got into pywallet because I read a post about some versions of pywallet being modified to steal bitcoins. I knew it would take some time for me to figure all that out. Anyway, I found this on reddit in response to a guy who had 18 btc in a corrupt wallet. It worked, it loaded the wallet without the corruption error, unfortunately it showed 0 btc   :(

From reddit user musicbunny

"1 in a million:

Make sure you do not lose your backup wallet.dat file.

Make a backup of your backup wallet.dat file. (copy the file)

Cut off the end of the wallet.dat file, so only the first 80% exists. Basically, split the file in two.

Try putting in the first half wallet.dat file you've made from your backup.

If you're lucky it will get to the point of having your 18 btc and then not having bitcoin-qt freak out on you.

If this doesn't work, then you'd probably have to go through the source code of bitcoin-qt and find out how it serializes data/reads data/writes data, and then write a program to get at the data, find the good data, find the bad data, split the two, and then write back."

https://www.reddit.com/r/Bitcoin/comments/1crbne/corrupted_walletdat_with_18_btc_possible_to/


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: HCP on April 01, 2019, 09:02:16 AM
So I tried this before I got into pywallet because I read a post about some versions of pywallet being modified to steal bitcoins. I knew it would take some time for me to figure all that out. Anyway, I found this on reddit in response to a guy who had 18 btc in a corrupt wallet. It worked, it loaded the wallet without the corruption error, unfortunately it showed 0 btc   :(
One possible flaw in the listed method, for your particular case, is that as your "corrupt" wallet was VERY old, it is most likely a "non-HD" wallet... that is to say, it isn't deterministic, and will only contain "randomly generated" private keys...

So, by cutting off a portion of the wallet, even if it loads, it might well be missing private keys that contain coins... and the "fixed" version of the wallet won't be able to regenerate any "missing" keys, as it will just randomly generate new private keys.

HD Bitcoin Core wallets were not a "thing" until August 2016 with version 0.13.0 (https://bitcoin.org/en/release/v0.13.0#hierarchical-deterministic-key-generation) and you're talking about a wallet from 2011...


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: wetcat33333 on April 02, 2019, 01:50:14 AM
So I tried this before I got into pywallet because I read a post about some versions of pywallet being modified to steal bitcoins. I knew it would take some time for me to figure all that out. Anyway, I found this on reddit in response to a guy who had 18 btc in a corrupt wallet. It worked, it loaded the wallet without the corruption error, unfortunately it showed 0 btc   :(
One possible flaw in the listed method, for your particular case, is that as your "corrupt" wallet was VERY old, it is most likely a "non-HD" wallet... that is to say, it isn't deterministic, and will only contain "randomly generated" private keys...

So, by cutting off a portion of the wallet, even if it loads, it might well be missing private keys that contain coins... and the "fixed" version of the wallet won't be able to regenerate any "missing" keys, as it will just randomly generate new private keys.

HD Bitcoin Core wallets were not a "thing" until August 2016 with version 0.13.0 (https://bitcoin.org/en/release/v0.13.0#hierarchical-deterministic-key-generation) and you're talking about a wallet from 2011...

Hmmm.  Well I could try the pywallet just to be sure. I know I tried to mine. Even if it was a tiny amount, I really thought there would have been something in there.  I'll give it a try with the pywallet, can't hurt. Thanks


Title: Re: Help Needed Recovering old wallet.dat file from 2011
Post by: HCP on April 02, 2019, 10:27:11 PM
PyWallet should work OK with an older wallet... it doesn't play nicely with newer versions of wallet.dat as the new data fields confuse it and it generates a number of errors.

I'd definitely recommend giving PyWallet a shot.