Author

Topic: Recovering old wallet.dat (Read 918 times)

legendary
Activity: 2604
Merit: 2353
August 25, 2020, 09:37:51 AM
#43
Huh
Where exactly please?
In which field?
Are you sure about that?
Yes. You can enter the master private key at: https://iancoleman.io/bip39/.

Scroll to BIP32 root key and paste your xpriv there. After that, scroll a bit further to change your derivation path to suit your needs.
Yes you're right it works...  Wink
But the adresses are all in legacy format while I have legacy and bech32 adresses in my wallet.
The private keys seem to be the same at least, so how can I display the adresses in the bech32 format please?
Choose BIP141 at the derivation path part, choose P2WPKH.
Yes this way I find them. ✔️

I'm assuming your wallet isn't using BIP84 since it's generating both? If it doesn't work out for you, try BIP84.
I don't know, it's just the bitcoincore wallet
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
August 25, 2020, 09:13:10 AM
#42
Huh
Where exactly please?
In which field?
Are you sure about that?
Yes. You can enter the master private key at: https://iancoleman.io/bip39/.

Scroll to BIP32 root key and paste your xpriv there. After that, scroll a bit further to change your derivation path to suit your needs.
Yes you're right it works...  Wink
But the adresses are all in legacy format while I have legacy and bech32 adresses in my wallet.
The private keys seem to be the same at least, so how can I display the adresses in the bech32 format please?
Choose BIP141 at the derivation path part, choose P2WPKH.

I'm assuming your wallet isn't using BIP84 since it's generating both? If it doesn't work out for you, try BIP84.
legendary
Activity: 2604
Merit: 2353
August 25, 2020, 09:02:55 AM
#41
Huh
Where exactly please?
In which field?
Are you sure about that?
Yes. You can enter the master private key at: https://iancoleman.io/bip39/.

Scroll to BIP32 root key and paste your xpriv there. After that, scroll a bit further to change your derivation path to suit your needs.
Yes you're right it works...  Wink
But the adresses are all in legacy format while I have legacy and bech32 adresses in my wallet.
The private keys seem to be the same at least, so how can I display the adresses in the bech32 format please?
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
August 25, 2020, 08:32:34 AM
#40
Huh
Where exactly please?
In which field?
Are you sure about that?
Yes. You can enter the master private key at: https://iancoleman.io/bip39/.

Scroll to BIP32 root key and paste your xpriv there. After that, scroll a bit further to change your derivation path to suit your needs.
legendary
Activity: 2604
Merit: 2353
August 25, 2020, 08:13:20 AM
#39
the master private key could be entered at iancoleman.io  
Huh
Where exactly please?
In which field?
Are you sure about that?
newbie
Activity: 13
Merit: 1
April 29, 2020, 06:18:10 PM
#38
Sorry about the radio silence, pandemic and school have been a bit distracting. I'll probably delete the block chain since I wont be needing it and use pywallet to try and extract the privkeys. Thank you all for the advice, I'll come back with the outcome.
newbie
Activity: 1
Merit: 0
April 19, 2020, 07:12:19 AM
#37
I've had success recovering old wallets using a combination of PhotoRec and Pywallet
Seems like you already have the wallet.dat, but if you are not sure if you have the correct one you can use PhotoRec to search the disk for wallets.

Then use Pywallet

1. Backup your wallet

2.
Code:
pywallet.py --dumpwallet --datadir c:\  --wallet=wallet.dat --recover --recov_device=C:\\wallet.dat --recov_size=416Gio --recov_outputdir=c:\

3. You might need to rename the output file as 'wallet.dat'

4. Place the new wallet in your bitcoin datadirectory

5. Start Bitcoin-QT with the --rescan flag



HCP
legendary
Activity: 2086
Merit: 4318
April 19, 2020, 12:57:43 AM
#36
Another clarification just for my own sake of knowledge, does the key dump from Core actually contain the old wallet data?  I had the Wallet file in the bitcoin wallet directory but was never able to actually open it in btc, and the bitcoin core install was new to this machine. Does the dump keys command take data from all wallets directories or only the ones that have successfully been opened?

Since I was never able to open the wallet or even load it, I suspected that the key dump didnt even include it, but to be fair I have no idea how this all works.
Bitcoin Core only works on ONE wallet file at a time (unless you explicitly tell it otherwise)... generally, and by default, this will be whatever file is called wallet.dat in Bitcoin Core's "datadir"... just having your "old" wallet file in the directory is not enough, unless it is actually called wallet.dat

So, if Bitcoin Core never successfully opened the wallet.dat file... then there is simply no way it could have dumped the keys out.

If you are unable to open the "old" wallet.dat with Bitcoin Core... it crashes or gives and error... then try nc50lc's suggestion of the --salvagewallet command. If that doesn't work either... then your last resort is probably going to be attempting to dump the keys using PyWallet.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 18, 2020, 10:22:25 PM
#35
Since I was never able to open the wallet or even load it, I suspected that the key dump didnt even include it, but to be fair I have no idea how this all works.
Since there are a bunch of corrupted data in your block files,
try to run Bitcoin Core with a fresh data directory containing a new copy of your old wallet.dat, then open core while offline.
Create a folder to any directory other than the default, then set that temporarily in a bitcoin.conf file inside '%appdata%\bitcoin' folder.

Example (Windows):
  • Create a folder name "bitcoin_temp" to "D" drive.
  • Paste the copy of your wallet.dat inside that folder.
  • Open %appdata% (Win+R, type  %appdata%) then open Bitcoin folder.
  • Create a bitcoin.conf file inside, new->text doc->rename including the extension from "New Text Document.txt" into "bitcoin.conf".
  • Open it using a text editor and type datadir=D:\bitcoin_temp
  • Disable your internet and open Bitcoin-qt, then do the dumpwallet command.
Change the data directory depending where you created the folder.

If the wallet turned out corrupted, start bitcoin-qt with --salvagewallet.
  • Create a shortcut of bitcoin-qt, right-click the shortcut and select properties.
  • In the "target" add --salvagewallet at the end and apply/ok.
  • it should look like this: "C:\Program Files\Bitcoin\bitcoin-qt.exe" --salvagewallet
  • Then open Bitcoin Core using that shortcut.
newbie
Activity: 13
Merit: 1
April 18, 2020, 04:59:37 PM
#34
Personally, I suspect that this is not in fact an "old" wallet at all... but is in fact an empty wallet.dat that was generated fairly recently (within the last 3 years or so).

Its possible that the keys I extracted were of the blank wallets I created when first messing around with Bitcoin core before making this post. Hence why I asked a bit about how it extracts the private keys.

Another clarification just for my own sake of knowledge, does the key dump from Core actually contain the old wallet data?  I had the Wallet file in the bitcoin wallet directory but was never able to actually open it in btc, and the bitcoin core install was new to this machine. Does the dump keys command take data from all wallets directories or only the ones that have successfully been opened?

Since I was never able to open the wallet or even load it, I suspected that the key dump didnt even include it, but to be fair I have no idea how this all works.
HCP
legendary
Activity: 2086
Merit: 4318
April 16, 2020, 10:29:49 PM
#33
Looking at the dump again, trying not to dox myself, I see the extended private master key and then the plethora of addresses and private keys before them, as well as an hdseed=1, reserve=1 and hdkeypath=m/0... on each line. My keys all start with K or L, don't see any 5's and my addresses all start with 3. The other problem I'm seeing is how ill copy and paste over 4000 strings into Electrum.
The wallet was made around 2012, and could have been used up until around 2015, which is when my brother gave me the laptop.

These two pieces of this puzzle just don't really fit together... "3"-type addresses are "P2SH" addresses and prior to SegWit being introduced were mainly used for "Multi Signature" addresses. However, Bitcoin Core did not produce these address types by default... indeed, creating MultiSig addresses in a Bitcoin Core wallet was a very manual task!

Also, HD wallet functionality was only introduced in Bitcoin Core v0.13.0... which was released on 23 August 2016!!! Shocked

So quite why a Bitcoin Core wallet.dat made in 2012 would have "3" addresses and an "hdseed" in it is very confusing. Huh NOTE that it is not possible to upgrade an "old" wallet to be "HD". You had to create a brand new "HD" wallet file.


Personally, I suspect that this is not in fact an "old" wallet at all... but is in fact an empty wallet.dat that was generated fairly recently (within the last 3 years or so).
legendary
Activity: 3374
Merit: 3095
BTC price road to $80k
April 16, 2020, 07:58:37 PM
#32
~snip~

Did you just paste the private keys to Electrum?

You mentioned earlier that the addresses of your backup start from "3" Am I right?

You need to add "P2WPKH-P2SH" when importing it to Electrum so that it will show the same addresses on Electrum.

Here's the sample:



The XXX must be your private keys.

Ow, it seems someone already mentions this.

Anyway, if you have the list of all 2000 addresses you can use the public key and check them if those addresses have balances.

You can use this tool https://bitcoin-wall.com/check/
Paste all addresses to check each address so that you can find which address that has balance before you import it to Electrum.

The alternative for bulk balance check http://www.homebitcoin.com/easybalance/
newbie
Activity: 13
Merit: 1
April 16, 2020, 07:11:43 PM
#31
What do you mean "identical"? Same addresses?

You've mentioned that it's an old wallet, how old is that exactly? wallet.dat older than 2017 can't have SegWit addresses.
And you should be informed that Altcoin wallet.dat might work when imported to Bitcoin Core but obviously won't have any balance or history.

Identical just as in, after importing all the keys, none of the tabs changed except for the addresses tab. I'll leave Electrum open for a while, to let it sync. The wallet was made around 2012, and could have been used up until around 2015, which is when my brother gave me the laptop.

Electrum shows what appear to be all 2000 "receiving" addresses in the appropriate tab and the green network icon. If these are the keys from the old wallet.dat then it is showing 0 transactions and balance for all balances.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 13, 2020, 10:13:26 PM
#30
Few side notes, In the keys dump file there is also 2000 strings, all starting with 0014, next to unique addresses.

Another clarification just for my own sake of knowledge, does the key dump from Core actually contain the old wallet data?  I had the Wallet file in the bitcoin wallet directory but was never able to actually open it in btc, and the bitcoin core install was entirely new. Does the dump keys command take data from all wallets or only the open ones?
1. It must be your addresses' "redeem script" since those are P2SH-P2WPKH addresses.

2. Core should keep the old addresses even after changing the hdseed (like changed passphrase, sethdseed command, etc).
Newer keys/addresses however will have an issue with old backups if the wallet had changed the hdseed after that backup.

Awesome sauce, So i found a way in notepad++ and imported every single (2000) private keys into Electrum, but balance is empty and no history has shown. Matter of fact, Electrum looks identical, other than the fact that its a new wallet.
2000 addresses will take a while to update the history and balance, is Electrum properly connected (Green circle at the lower-right?).

What do you mean "identical"? Same addresses?

You've mentioned that it's an old wallet, how old is that exactly? wallet.dat older than 2017 can't have SegWit addresses.
And you should be informed that Altcoin wallet.dat might work when imported to Bitcoin Core but obviously won't have any balance or history.
newbie
Activity: 13
Merit: 1
April 13, 2020, 07:59:16 PM
#29
Then create an imported wallet to Electrum using "Import Bitcoin addresses or private keys" and paste them like this:
Take note that Electrum might need a few seconds to sync, minutes if it's your first time using it.

Awesome sauce, So i found a way in notepad++ and imported every single (2000) private keys into Electrum, but balance is empty and no history has shown. Matter of fact, Electrum looks identical, other than the fact that its a new wallet.

Few side notes, In the keys dump file there is also 2000 strings, all starting with 0014, next to unique addresses.

Another clarification just for my own sake of knowledge, does the key dump from Core actually contain the old wallet data?  I had the Wallet file in the bitcoin wallet directory but was never able to actually open it in btc, and the bitcoin core install was entirely new. Does the dump keys command take data from all wallets or only the open ones?
HCP
legendary
Activity: 2086
Merit: 4318
April 12, 2020, 09:50:39 PM
#28
The advantage of using IanColeman's tool is that you can easily export a CSV file with the private keys in derivation path order... which also means (with a small amount of text manipulation in something like Notepad++) you can easily create a list of keys in the appriopriate format to import into Electrum.

dumpwallet while useful, outputs keys in a very 'random' order. Undecided
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 12, 2020, 09:35:12 PM
#27
the master private key could be entered at iancoleman.io  
There's no point in doing that since he already got the list of private keys and addresses just below the "extended private masterkey".
iancoleman's BIP39 tool will just derive the same list (change have different derivation path)
unless he changed the passphrase before which created a bunch of different set of keys/addresses.

What he need now is to find which addresses have a balance.
copper member
Activity: 1652
Merit: 1325
I'm sometimes known as "miniadmin"
April 12, 2020, 07:38:33 PM
#26
---

My bad... I had never heard about the service itself, the domain name sounded sketchy, and I've had enough BS for the day. Sorry for not checking all the facts before replying; I just read "private key, enter, website" and kinda triggered
HCP
legendary
Activity: 2086
Merit: 4318
April 12, 2020, 04:58:21 PM
#25
the master private key could be entered at iancoleman.io 

LOL, NEVER EVER enter any private key anywhere. Even less, in a service no one has ever heard of. Be safe out there,
What do you mean a service no one has ever heard of? Huh

Ian Coleman's BIP39 Mnemonic Code Converter is one of the most widely used/known websites for dealing with BIP39 mnemonics and/or master private keys: https://iancoleman.io/bip39/

It is 100% opensource and can even be downloaded and used completely offline. It's a very handy resource for wallet/private key recovery. But yes, I would not recommend using the online version of this for anything other than testing "dummy" mnemonics/private keys.
copper member
Activity: 1652
Merit: 1325
I'm sometimes known as "miniadmin"
April 12, 2020, 11:52:27 AM
#24
the master private key could be entered at iancoleman.io 

LOL, NEVER EVER enter any private key anywhere. Even less, in a service no one has ever heard of. Be safe out there,
member
Activity: 95
Merit: 10
April 12, 2020, 11:38:45 AM
#23
To check their balance, simply copy an address (addr=) and paste it on a blockexplorer (https://blockstream.info/), just take note of the private keys of the ones with balance.

Awesome, I have the addresses and all their keys, but in the dump there are, about 4000 address lines and the first few lines have all shown no transactions or balance.

Don't know if this is ELI5 enough (old post of mine -edited-):
Quote from: me
  • Start 'Bitcoin-qt' as administrator, then open 'window->console'
  • Enter walletpassphrase your-passphrase 240
  • Enter dumpwallet keys.txt (you can change 'keys' into any name that you want)
  • Go to the installation directory of your Bitcoin core and find "keys.txt", open it and find the addresses' private keys, list of strings that start with '5', 'K' or 'L'.
  • Download Electrum Windows Stand-alone Executable from electrum.org
  • If your addresses starts with '3' or 'bc1', you'll need to import each prv keys to electrum using the option "Import Bitcoin addresses or private keys" by pasting each keys per line using:
    p2wpkh-p2sh:YOUR_Private_key if your addresses starts with '3'
    p2wpkh:YOUR_Private_key if your addresses starts with 'bc1'
  • If they start with '1', just paste the private keys.

Looking at the dump again, trying not to dox myself, I see the extended private master key and then the plethora of addresses and private keys before them, as well as an hdseed=1, reserve=1 and hdkeypath=m/0... on each line. My keys all start with K or L, don't see any 5's and my addresses all start with 3. The other problem I'm seeing is how ill copy and paste over 4000 strings into Electrum.

the master private key could be entered at iancoleman.io 
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 11, 2020, 11:58:34 PM
#22
Looking at the dump again, trying not to dox myself, I see the extended private master key and then the plethora of addresses and private keys before them, as well as an hdseed=1, reserve=1 and hdkeypath=m/0... on each line. My keys all start with K or L, don't see any 5's and my addresses all start with 3. The other problem I'm seeing is how ill copy and paste over 4000 strings into Electrum.
That's troublesome indeed...

If you do not want to check the balance using blockexplorer, then try to at least import the first few index to Electrum and see if they have a balance.
To find them, just open "find" (Windows? Ctrl+F) and search for m/0'/0'/0 then copy the private key at the start of the line,
then find m/0'/0'/1 and do the same until you collected a few of them.

Then create an imported wallet to Electrum using "Import Bitcoin addresses or private keys" and paste them like this:
Code:
p2wpkh-p2sh:K1111111111111111111PRIVATEKEY1111111111111111111111
p2wpkh-p2sh:K1111111111111111111PRIVATEKEY2111111111111111111111
p2wpkh-p2sh:K1111111111111111111PRIVATEKEY3111111111111111111111
p2wpkh-p2sh:K1111111111111111111PRIVATEKEY4111111111111111111111

Take note that Electrum might need a few seconds to sync, minutes if it's your first time using it.
newbie
Activity: 13
Merit: 1
April 11, 2020, 11:49:24 PM
#21
To check their balance, simply copy an address (addr=) and paste it on a blockexplorer (https://blockstream.info/), just take note of the private keys of the ones with balance.

Awesome, I have the addresses and all their keys, but in the dump there are, about 4000 address lines and the first few lines have all shown no transactions or balance.

Don't know if this is ELI5 enough (old post of mine -edited-):
Quote from: me
  • Start 'Bitcoin-qt' as administrator, then open 'window->console'
  • Enter walletpassphrase your-passphrase 240
  • Enter dumpwallet keys.txt (you can change 'keys' into any name that you want)
  • Go to the installation directory of your Bitcoin core and find "keys.txt", open it and find the addresses' private keys, list of strings that start with '5', 'K' or 'L'.
  • Download Electrum Windows Stand-alone Executable from electrum.org
  • If your addresses starts with '3' or 'bc1', you'll need to import each prv keys to electrum using the option "Import Bitcoin addresses or private keys" by pasting each keys per line using:
    p2wpkh-p2sh:YOUR_Private_key if your addresses starts with '3'
    p2wpkh:YOUR_Private_key if your addresses starts with 'bc1'
  • If they start with '1', just paste the private keys.

Looking at the dump again, trying not to dox myself, I see the extended private master key and then the plethora of addresses and private keys before them, as well as an hdseed=1, reserve=1 and hdkeypath=m/0... on each line. My keys all start with K or L, don't see any 5's and my addresses all start with 3. The other problem I'm seeing is how ill copy and paste over 4000 strings into Electrum.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 11, 2020, 02:47:18 AM
#20
An alternative command aside from one in the link by ETFbitcoin is dumpwallet.
Use it instead of dumpprivkey if you have more than one address that have a balance or don't know which ones have a balance.
To check their balance, simply copy an address (addr=) and paste it on a blockexplorer (https://blockstream.info/), just take note of the private keys of the ones with balance.

Don't know if this is ELI5 enough (old post of mine -edited-):
Quote from: me
  • Start 'Bitcoin-qt' as administrator, then open 'window->console'
  • Enter walletpassphrase your-passphrase 240
  • Enter dumpwallet keys.txt (you can change 'keys' into any name that you want)
  • Go to the installation directory of your Bitcoin core and find "keys.txt", open it and find the addresses' private keys, list of strings that start with '5', 'K' or 'L'.
  • Download Electrum Windows Stand-alone Executable from electrum.org
  • If your addresses starts with '3' or 'bc1', you'll need to import each prv keys to electrum using the option "Import Bitcoin addresses or private keys" by pasting each keys per line using:
    p2wpkh-p2sh:YOUR_Private_key if your addresses starts with '3'
    p2wpkh:YOUR_Private_key if your addresses starts with 'bc1'
  • If they start with '1', just paste the private keys.

Then send them to the wallet of your choice,
If you want to use Electrum: Instead of creating an imported wallet, just create a new 'standard wallet' and sweep (Wallet->Private keys->Sweep) the keys using the same format as above.
newbie
Activity: 13
Merit: 1
April 11, 2020, 01:47:21 AM
#19
If you want to continue:
Shutdown Bitcoin Core, delete rev/blk01638.dat and the newer block files (not older blk), then start Bitcoin Core again.
It will re-sync starting from the blocks inside that file.

Or consider using Electrum, just make sure that you'll do everything while offline.

Thank you greatly with your help so far. If I were to use Electrum, I would need to extract the private keys from the wallet, correct? Whats the "Explain like I'm 5" way of doing it, bearing in mind I dont have an address or python knowledge. I can attempt the Bitcoin core method too, but seeing how my drive is probably not capable of it for much longer, I will eventually need to use Electrum.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 11, 2020, 12:18:39 AM
#18
This error also appeared very often in the log, and by often i mean several every few or so lines.

It appears that one of your blk file is corrupted, particularly: "blk01638.dat".
Or if your disk is now full, you're out of space.

That's quite unfortunate because it must be deleted and every succeeding block files as well to be able to continue.

If you want to continue:
Shutdown Bitcoin Core, delete rev/blk01638.dat and the newer block files (not older blk), then start Bitcoin Core again.
It will re-sync starting from the blocks inside that file.

Or consider using Electrum, just make sure that you'll do everything while offline.
newbie
Activity: 13
Merit: 1
April 10, 2020, 08:35:26 PM
#17
Next time use a 500+ GB SSD on a modern computer when syncing the blockchain, it will save you time.

That error looks like you don't have enough space, or did you not delete files other than wallet.dat that you copied along with the wallet.dat?

Will try and get the keys through that tactic. And I'd say space then, I  only copied the wallet.dat over.

I could have done it on my SSD but most of them are used for work and games and didnt feel like moving around and deleting lots. I just used the HDD since it was useless and empty. But if more space is all i need to open it, i'll find a way.

I went to install an older version, 0.6.2.1, but once again my inexperience has bested me because i have no idea how to install it. And I'm just as experienced when it comes to Python as well.
legendary
Activity: 3472
Merit: 1722
April 10, 2020, 07:31:04 PM
#16
If your HDD only has 4 GB left and you still haven't finished syncing just import the dumped keys as suggested above by BitMaxz.

Importing them into Electrum is very simple: https://electrum.readthedocs.io/en/latest/faq.html#can-i-import-private-keys-from-other-bitcoin-clients

Next time use a 500+ GB SSD on a modern computer when syncing the blockchain, it will save you time.

That error looks like you don't have enough space, or did you not delete files other than wallet.dat that you copied along with the wallet.dat?
newbie
Activity: 13
Merit: 1
April 10, 2020, 07:16:40 PM
#15
Just wait for it to finish, it could take minutes to hours depending on your PC's specs.

It was able to open the wallet to 99% completion as seen in the pictures, but then came up with this error, also seen.

Took about 3 hours to "open", 11000000 ms

https://imgur.com/a/wL1DXrr

https://imgur.com/a/VpXhcLO

This error also appeared very often in the log, and by often i mean several every few or so lines.

https://imgur.com/a/F5Z3Uno

I will attempt to find the right bitcoin core version and try that tactic.

After you installed this you don't need to sync the wallet(Put the old files of your friend) you can directly go to the console and use the command posted by hosseinimr93 above.
Or use this command below to dump all of your wallet private keys.
Code:
dumpwallet /path/to/dump.txt
Let me know if you are going to try this method and I believe it won't get an error if you use the exact version of the Bitcoin core compatible for your old wallet.dat.

https://imgur.com/a/zcfAI8l

luckily the old debug file still exists and i have exact dates
legendary
Activity: 3374
Merit: 3095
BTC price road to $80k
April 10, 2020, 05:59:41 PM
#14
Did you try to ask your friend if when he installed the Bitcoin core wallet?

I think its easier to dump the private key if you install an old version of the Bitcoin core wallet.
Try to ask your friend if what year he installed the Bitcoin core and generated that wallet and then find it the wallet from here below.

Sample 2013-2014 wallet versions
- https://github.com/bitcoin/bitcoin/releases?after=v0.9.2rc1

After you installed this you don't need to sync the wallet(Put the old files of your friend) you can directly go to the console and use the command posted by hosseinimr93 above.
Or use this command below to dump all of your wallet private keys.
Code:
dumpwallet /path/to/dump.txt


Let me know if you are going to try this method and I believe it won't get an error if you use the exact version of the Bitcoin core compatible for your old wallet.dat.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 10, 2020, 07:01:14 AM
#13
Seems like it has to go through the entire block chain to load the wallet and find its transactions?

It's just issued a "recan" of the blockchain for your wallet's transactions, it will not download anything if your node isn't pruned or not fully synced.
That's normal for newly loaded wallet file.

Just wait for it to finish, it could take minutes to hours depending on your PC's specs.
newbie
Activity: 13
Merit: 1
April 10, 2020, 06:34:14 AM
#12
As of now the only error I've gotten with the wallet is that saying it was unable to load because the block chain became synchronized. The main problem I'm having is the wallet just not opening and taking forever to load.

https://imgur.com/a/epuaqOy

Seems like it has to go through the entire block chain to load the wallet and find its transactions?

https://imgur.com/a/05JBGkn

I'll leave the wallet opening for as long as possible and check the log after the error occurs. Worst case, I go back to the Electrum solution.

Also the harddrive only has about 4GB left before full, so hopefully transactions slow down until i figure this out haha. I'm using a totally blank (other than bitcoin core) HDD for this and dont have other options for storing the 280+GB chain.
HCP
legendary
Activity: 2086
Merit: 4318
April 10, 2020, 04:20:00 AM
#11
Yes... Shutdown Bitcoin Core, then you need to replace the 'new' wallet.dat in the Bitcoin Core "data directory", with a copy of the of 'old' wallet.dat that you're wanting to load. Then start Bitcoin Core.

Like I said, if you're getting weird errors when trying to load the 'old' wallet.dat... check the debug.log!
newbie
Activity: 13
Merit: 1
April 10, 2020, 01:39:34 AM
#10
To make sure I've done this correctly, when i import the old wallet, should i be doing that in the wallet directory? What I've done so far is make a new wallet in bitcoin core, shut it down, and then replace the wallet.dat with the old one. But now, as I type that out, it seems kind of stupid.

Theoretically, it should open it. If it doesn't, it might also be worth checking the "debug.log" file for the relevant errors. It might output something more useful there than what it shows in the error dialog box messages.
HCP
legendary
Activity: 2086
Merit: 4318
April 08, 2020, 10:41:32 PM
#9
I'll try just importing the wallet.dat again and see if it works now that its synchronized, and if not I'll try to use pywallet to hopefully pull the privatekeys from the wallet and import them into Electrum.
Just remember... after Bitcoin Core is synced, make sure that you shut it down completely before doing anything with the wallet.dat files. Once it is completely shutdown, then you can put the 'old' wallet.dat into the "datadir" and then restart Bitcoin Core.

Theoretically, it should open it. If it doesn't, it might also be worth checking the "debug.log" file for the relevant errors. It might output something more useful there than what it shows in the error dialog box messages.
newbie
Activity: 13
Merit: 1
April 08, 2020, 09:53:21 PM
#8
Before you do anything else, I hope you've been working on copies of the wallet.dat that you found and that you still have the 'original' wallet.dat that you copied from the old laptop.

If you have successfully installed and synced the latest Bitcoin Core... then the only file you would require from the old laptop is "wallet.dat"... anything else might cause a lot of unexpected issues if you overwrite things in the Bitcoin Core directory.

If it's giving errors when you try to import just the "wallet.dat" and nothing else, then the wallet.dat might be corrupted Undecided

You might need to attempt to use the "pywallet.py" on this old wallet and dump the private keys that way... I'm kinda curious as to why pywallet.py was even in that Bitcoin folder that you found... it is NOT part of Bitcoin Core, it's a Python script that was used for, amongst other things, extracting private keys from "broken" wallet files.


First thing I did after getting the wallet was dupe it a few times so I'm set on that front.
 I'll try just importing the wallet.dat again and see if it works now that its synchronized, and if not I'll try to use pywallet to hopefully pull the privatekeys from the wallet and import them into Electrum.
HCP
legendary
Activity: 2086
Merit: 4318
April 08, 2020, 08:59:26 PM
#7
As of right now i have the entire chain synchronized and downloaded, and every file from the bitcoin in the old computer now on my new computer. At first I did have a pruned block chain of about 10 GB but i remember an error saying the wallets last use was too long ago and that it had to use either the full chain or a larger prune to update.
Yes, if you have pruned, you'll struggle to get it work when trying to open a "new" wallet.dat... as it'll need to rescan... which it can't do because, obviously, it'll be missing blocks. You definitely need a fully synced Bitcoin Core with the full 250+gigs of blocks.

Before you do anything else, I hope you've been working on copies of the wallet.dat that you found and that you still have the 'original' wallet.dat that you copied from the old laptop.


Quote
I made a new wallet in Bitcoin Core and imported all of those files, consisting of a database folder, .lock, .walletlock, blkindex.dat, db.log, debug.log, peers.dat, pywallet.py, readme (seems to be for a python extension?), wallet.dat and a wall.dat.bak.
If you have successfully installed and synced the latest Bitcoin Core... then the only file you would require from the old laptop is "wallet.dat"... anything else might cause a lot of unexpected issues if you overwrite things in the Bitcoin Core directory.


Quote
Anytime im synced with the chain and try to open the wallet it just says "opening for seemingly forever" but eventually says it failed to open because the wallet de-synced.
Was this having imported all those old files? or just copying in the old "wallet.dat" and nothing else? Huh


If it's giving errors when you try to import just the "wallet.dat" and nothing else, then the wallet.dat might be corrupted Undecided

You might need to attempt to use the "pywallet.py" on this old wallet and dump the private keys that way... I'm kinda curious as to why pywallet.py was even in that Bitcoin folder that you found... it is NOT part of Bitcoin Core, it's a Python script that was used for, amongst other things, extracting private keys from "broken" wallet files.

If you don't already have Python installed, you'd need to install the latest version of Python 2.7 (from here: https://www.python.org/downloads/release/python-2716/ ), make sure you have the latest PyWallet file (from here: https://github.com/jackjack-jj/pywallet ) and then try using the --dumpwallet command to extract whatever you can out of the wallet.dat

There is a lot of useful stuff in the PyWallet thread, but do note that this utility is no longer maintained and the dev is not active: https://bitcointalksearch.org/topic/pywallet-22-manage-your-wallet-update-required-34028


Again... whatever you do, make sure you're working on a copy of the 'old' wallet.dat
newbie
Activity: 13
Merit: 1
April 08, 2020, 08:00:57 PM
#6
I moved the topic as that may be a better place to discuss this.


If I were you, I'd copy-paste the whole folder into the computer you want to perform the recovery and proceed from there. First with the client you found at the laptop, in case there is some incompatibility between old clients and newer ones; I'm not really tech-savy, so this might not be the case at all.

Using "prune" is rather easy; you just need to do the following:


The old computer is sadly dead so all i have is the wallet folder i took from it.

As of right now i have the entire chain synchronized and downloaded, and every file from the bitcoin in the old computer now on my new computer. At first I did have a pruned block chain of about 10 GB but i remember an error saying the wallets last use was too long ago and that it had to use either the full chain or a larger prune to update. I made a new wallet in Bitcoin Core and imported all of those files, consisting of a database folder, .lock, .walletlock, blkindex.dat, db.log, debug.log, peers.dat, pywallet.py, readme (seems to be for a python extension?), wallet.dat and a wall.dat.bak.

Anytime im synced with the chain and try to open the wallet it just says "opening for seemingly forever" but eventually says it failed to open because the wallet de-synced.



The topic began in the newbie section so pardon my ignorance, but where am I inputting these commands? As of right now i only have Bitcoin core and the folder with the imported wallet.
Theres the console in bitcoin core but i cant actually open the wallet in bitcoin core and havent used bitcoin core other than this.

To OP:

You don't need to download the blockchain. You can export your private keys and import them to another wallet like Electrum. But I recommend you to first check if you have any received transaction. 
Use listreceivedbyaddress command. It will show you addresses that have received transactions.

If there was received transaction for any of addresses, use the command below to export the private key of that address (addresses)

Code:
dumpprivkey "your bitcoin address"

legendary
Activity: 2380
Merit: 5213
April 08, 2020, 08:00:27 PM
#5
If that were the case, and you wanted to load the wallet from there withouth downloading the 200+GB of blockchain, you could use the "prune" command and limit the size of the blockchain stored locally.
Even if prune mode is enabled, the whole blockchain must be downloaded. The purpose of prune mode is only decreasing the storage size.
In prune mode, while new data is downloaded, old data get deleted. It doesn't mean that old blocks don't need to be downloaded.



To OP:

You don't need to download the blockchain. You can export your private keys and import them to another wallet like Electrum. But I recommend you to first check if you have any received transaction.  
Use listreceivedbyaddress command. It will show you addresses that have received transactions.

If there was received transaction for any of addresses, use the command below to export the private key of that address (addresses)

Code:
dumpprivkey "your bitcoin address"

You can also export all your private keys using dumpwallet command.

Note that if the wallet is locked, you should add the command below before other commands.

Code:
walletpassphrase "your password" "timeout"
timeout is in seconds and is the time wallet keeps your password. In other words, your wallet will be locked after timeout ends.

After you exported private keys of addresses that have balance, go to Electrum. (Download Electrum only from https://electrum.org)

Create a new wallet and select "Import bitcoin addresses and private keys"

Enter your private keys. Then you will have access to your bitcoins if there is any.
legendary
Activity: 2282
Merit: 1252
Heisenberg
April 08, 2020, 07:54:11 PM
#4
Great idea; but Wallet Software board might be better than Tech Support?
Since some of issues the bitcoin support board handles involve bitcoincore,  i reckon it best fits there.  Wallwt software board handles issues mostly with other wallets such as electrum armory etc.  That has been my observation in the past.
copper member
Activity: 1652
Merit: 1325
I'm sometimes known as "miniadmin"
April 08, 2020, 07:17:27 PM
#3
I kept all the files within except for the old block chain, which at the time was only a couple gigabytes, but am having troubles opening it in a new wallet in bitcoin core. I synchronized with the chain and made a wallet with the new wallet.dat but it says that it may be corrupted, but when i include files like, .walletlock db.log and blk.index, it says its loading the wallet, but for an insane amount of time.

If I were you, I'd copy-paste the whole folder into the computer you want to perform the recovery and proceed from there. First with the client you found at the laptop, in case there is some incompatibility between old clients and newer ones; I'm not really tech-savy, so this might not be the case at all.

That, asuming you are not trying to recover that wallet in the old laptop... If that were the case, and you wanted to load the wallet from there withouth downloading the 200+GB of blockchain, you could use the "prune" command and limit the size of the blockchain stored locally. You will most likely need a password (unless your brother was a bit reckless), so ask your brother for some guidance on this....

Using "prune" is rather easy; you just need to do the following:

Open the Core config file, and add this line

Code:
prune=N

Where prune is the size in MiB you want to give to the blockchain

You could also use this instead of editing the config file

Code:
"C:\Users\\AppData\Roaming\Bitcoin\bitcoin-qt.exe" -prune=550



So long that it usually says it failed because the chain desynced after 4 or so hours. There are more files that i kept within the wallet like pywallet.py and such and truly im not even sure this wallet is from bitcoin, so any help will be appreciated, ill keep an eye on this post.

If you found the wallet.dat file inside a Bitcoin file, it's most likely a Bitcoin wallet. Besides, if it's that old, there were almost no Altcoins at the time.



---
Great idea; but Wallet Software board might be better than Tech Support?

legendary
Activity: 2282
Merit: 1252
Heisenberg
April 08, 2020, 06:51:38 PM
#2
Hey I must admit that i also have little knowledge about recovering old wallet.dat wallets, but i suggest that you move this topic to the Bitcoin Technical Support Board. There are some very helpful members with technical knowledge who frequent that board.

To move the topic, just click on "Move topic" button on the bottom left of your topic page.
I hope all works out for you  Wink
newbie
Activity: 13
Merit: 1
April 08, 2020, 06:41:25 PM
#1
Hi! Beginner here.

Long story short, my brother gave me his old laptop years ago and recently I found a bitcoin folder in the temp directory. I kept all the files within except for the old block chain, which at the time was only a couple gigabytes, but am having troubles opening it in a new wallet in bitcoin core. I synchronized with the chain and made a wallet with the new wallet.dat but it says that it may be corrupted, but when i include files like, .walletlock db.log and blk.index, it says its loading the wallet, but for an insane amount of time. So long that it usually says it failed because the chain desynced after 4 or so hours. There are more files that i kept within the wallet like pywallet.py and such and truly im not even sure this wallet is from bitcoin, so any help will be appreciated, ill keep an eye on this post.

Also i told my brother about this already and he said its fine that I try and recover the wallet, but he also doesnt really know how either.
Jump to: