Advice on Wallet.dat

6 replies 159 views
Posts: 17 · Reputation: 221
#1Jul 10, 2022, 06:59 AM
Hey everyone, I just found my BTC wallet.dat file on an old desktop from around 2012/2013. The problem is, I have no clue how to transfer or update this file to a newer computer since the hard drive on that old machine is jam-packed with blockchain data and I can't even open the BTC software. I did some searching around here, but this topic seems to be pretty complicated and I'm sure it must've been discussed a lot before. Any help would be super appreciated. Thanks in advance!
6 Reply Quote Share
coin_sigmaLegendary
Posts: 1275 · Reputation: 5553
#2Jul 11, 2022, 01:18 PM
You can try to dump private keys from this wallet.dat file but before you take any action make a copy of your wallet.dat file to make sure if anything happens to the wallet you still have a backup copy. You can try  to install the latest version of Bitcoin Core and import it since you have a backup copy if it fails you can make another copy of the original file and try to dump the private key using pywallet.py you can download it here https://github.com/jackjack-jj/pywallet and use this command below without pass with pass
1 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#3Jul 11, 2022, 02:51 PM
Not sure if I get it right but; you want to load it to a new computer with newly installed Bitcoin Core? You can, even with limited drive space as long as the wallet.dat is loaded right at the start of its initial block download. The latest Bitcoin Core v26.0 can still load an old non-HD wallet without requiring it to be migrated into a descriptor wallet. So this is what you need, basically: Install Bitcoin Core in your new computer, do not open yet.Paste a copy of your wallet.dat somewhere in that computer.Open Bitcoin Core with GUI for simplicity, set your preferred settings in the Welcome Screen. (make sure to set a directory with enough space or enable pruning).Once Open, Restore the wallet quickly! Use the menu: "Load->Restore Wallet...", find the wallet.dat file, set a wallet name and it should load (with a warning about future depreciation of legacy wallets)Once it loads, let Bitcoin Core sync and your balance will show once it reached blocks of year 2012~2013 (if there's any)If it shows another error, your wallet.dat may be corrupted or from another wallet or something else, share the error here and do not sync Bitcoin Core yet if pruned mode is on. BTW, not all old wallet.dat files are from Bitcoin Core, most of those straight copy of the old Bitcoin software use the same default wallet name.
4 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#4Jul 11, 2022, 04:53 PM
That is mainly used in the very old version when Bitcoin Core didn't have multi-wallet support. Something our friendly neighborhood AI chat bot would answer. Now, it's not recommended because Bitcoin Core now has a native way of importing wallet.dat files like the one in my instructions above. Additionally, it's not good to replace files while Bitcoin Core is running as it may introduce inconsistencies or even file corruption in some cases.
3 Reply Quote Share
0xMaxiFull Member
Posts: 87 · Reputation: 378
#5Jul 11, 2022, 08:39 PM
If you are only interested in the keys and the corresponding addresses are known, then you can also inspect the old wallet on an offline machine, right? What does Bitcoin Core actually do when restoring old non-HD wallets? Does it convert them into HD wallets with the old key pool added?
5 Reply Quote Share
HyperRavenFull Member
Posts: 175 · Reputation: 633
#6Jul 11, 2022, 11:24 PM
Yes. However, you would have to manually search up your addresses to search for balance. Or else, you'd be able to sign transactions with your wallet or export your private keys  even if you are offline. No. You have to run -upgradewallet manually for the wallet to be converted to a HD wallet. All your addresses that you've used or generated are retained. Your keypool will be flushed immediately if you are using a version later than Bitcoin Core 0.23.0 when upgrading wallet.
1 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#7Jul 12, 2022, 01:44 AM
Yes, but it depends on what you mean by "inspect", if through simple open as text, even if the wallet isn't encrypted, the keys wont be readable. If through "hex viewer" tools, it's possible with unencrypted legacy wallet files and master keys for descriptor wallets. If encrypted, you'll have to rely on wallet.dat-compatible tools. I wouldn't recommend it unless the wallet.dat is corrupted though since you can still use the instructions on an offline machine. Bitcoin Core doesn't need internet to restore or load wallet.dat files to be able to export the master keys/private keys. It doesn't convert, "Restore" simply creates a wallet-name directory inside wallets directory and copy the selected wallet.dat file there, then attempts to load it. The only update that it'll do is to update the keypool to 1000 with the old keypool intact, it'll remain non-HD unless imported with an HDSeed. There are other commands that will upgrade, import HDSeed or migrate (to descriptor) the old wallet.dat file.
3 Reply Quote Share

Related topics