Pages:
Author

Topic: Recovering old wallet.dat - page 2. (Read 959 times)

member
Activity: 95
Merit: 10
April 12, 2020, 10: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: 2618
Merit: 6452
Self-proclaimed Genius
April 11, 2020, 10: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, 10: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: 2618
Merit: 6452
Self-proclaimed Genius
April 11, 2020, 01: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, 12: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: 2618
Merit: 6452
Self-proclaimed Genius
April 10, 2020, 11:18:39 PM
#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, 07: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: 1724
April 10, 2020, 06: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, 06: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: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
April 10, 2020, 04: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: 2618
Merit: 6452
Self-proclaimed Genius
April 10, 2020, 06: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, 05: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: 4363
April 10, 2020, 03: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, 12: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: 4363
April 08, 2020, 09: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, 08: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: 4363
April 08, 2020, 07: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, 07: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, 07: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: 2366
Merit: 1272
Heisenberg
April 08, 2020, 06: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.
Pages:
Jump to: