Hey everyone
So, I've been trying to move my bitcoin from a wallet.dat file that's saved on a USB stick to my new Trezor hardware wallet, but no luck so far.
Here's what I've done so far:
- I bought bitcoin ages ago and left it on an old MacBook running the Bitcoin Core program that I hardly used.
- Realizing the laptop was dying, I saved my bitcoin by copying the wallet.dat file onto a USB stick.
- To check if it was still there, I downloaded Bitcoin Core onto my desktop Mac last year, swapped the wallet.dat with the one from the USB, and thankfully saw that I had bitcoin available.
- I didn't bother with the private key back then since I thought keeping it on USB would be safe, but my husband convinced me to move it to Trezor.
- I researched a bit to see if I could do this without downloading the entire Bitcoin Core again (it takes forever), followed the instructions, but now I can't find my bitcoin.
- I replaced the wallet.dat file, started downloading BC, then went to the debug console and entered the command dumpprivkey along with the public address of the bitcoin. When I check that address on blockchain.com, I can see there’s bitcoin there, so I know it’s real, but I keep getting an error saying: Private key for address .... is unknown (code -4). What does that mean and what am I doing wrong?
How to move bitcoin from a wallet.dat file to a hardware wallet
13 replies 490 views
I think that you may have forgotten to provide first the password for the wallet (i.e. to unlock the wallet).
For example this is how you unlock for 600 seconds:
And only then you should use dumpprivkey
(Obviously, make sure you do this on a safe computer, since anyone getting access to your private key can spend your funds.)
Thank you, I will try that. But what do you mean by making sure it's done on a safe computer? I use my Mac frequently.. it should be safe.
But also, can I do all these steps if I go offline? Maybe that would be safer?
diamond_forkMember
Posts: 20 · Reputation: 168
#4Dec 7, 2018, 11:00 AM
Could I ask, how exactly? As far as I know, even if you download the blockchain in the "pruned" method, still it downloads the whole blockchain, but saves the disk space by keeping only ~8GB instead of the 350GB when keeping the full blockchain. That is my understanding, and if I am wrong, someone can correct me there...
Downloading the blockchain ofcourse requires you to be online. That is just a requirement to get up to date and get synced with the bitcoin network. Then, you can take your computer offline and try to access your wallet/bitcoins, and try importing your private keys to get it into a more user friendly wallet (like Electrum) or a safer hardware cold-storage wallet.
As long as you are completely sure (and I do mean completely), that you haven't visited any shady websites, and do not have any malware existing on your Mac, then its fine to do it on your Mac. There are ways you can check this (if you don't own any kind of antivirus), like checking for sudden slowdowns on your computer, and random toolbars getting added to your browsers and any behaviour in general that wasn't there when you were using it at first but suddenly appeared suspiciously, after you did a specific thing.
Though I suspect you are fine as the number of malware made for a Mac is less than that of Windows (due to windows having a higher market share and thus making finding a target far easier). You can do stuff like importing private keys offline, but when syncing, that means its downloading the blockchain from "nodes" in the network, thus you need to be online for that. Same goes for transactions, you can sign a transaction on an offline computer, but broadcasting them to the network requires you to be online, so there are some steps that need to be carried online. Also, I doubt doing these processes offline will really help your security that much, as they are mostly meant for computers that are completely offline from the start and you ofcourse use the Mac for daily usage and I don't think there's any use doing transactions offline. Thats just imho, and someone more experienced is welcome to correct my mistakes, if any.
Thank you for your response. Regarding your question:
Could I ask, how exactly? As far as I know, even if you download the blockchain in the "pruned" method, still it downloads the whole blockchain, but saves the disk space by keeping only ~8GB instead of the 350GB when keeping the full blockchain. That is my understanding, and if I am wrong, someone can correct me there...
Researched it online, this is an example: https://en.bitcoin.it/wiki/Transferring_coins_from_Bitcoin-Qt_to_Electrum#:~:text=down%20on%20paper.-,Obtain%20private%20key(s)%20from%20Bitcoin%2DQt,Qt%20click%20Window%20%2D%3E%20Console.&text=Use%20the%20dumpprivkey%20command%20to,as%20have%20money%20in%20them.&text=Do%20not%20send%20this%20private,to%20steal%20your%20bitcoins(!)
It specifically says: This guide is intended for users of Bitcoin-Qt who do not want to wait for their wallet to be synchronized with the network, which may take many hours or days depending on the hardware spec.
Or here: https://www.reddit.com/r/Bitcoin/comments/354tw5/i_need_help_deriving_a_private_key_from_bitcoin/
Again, it says: There's no need to have the blockchain synced to extract the balance.
You're right, there's no need to go online and sync the blocks if you just need to extract the private key(s). But you still need to be synchronized to make transactions. I think it would be faster & easier if you use a light client like Electrum as mentioned above to import your keys and then sweep them to your Trezor address.
Have you managed to get the keys though?
diamond_forkMember
Posts: 20 · Reputation: 168
#7Dec 9, 2018, 12:04 AM
Okay, so yeah that's what I figured. You are basically just exporting the private keys into Electrum for that method. You aren't downloading the blockchain in any mode. For that you can just be offline and do that stuff without any problems. But you still need to remember your passphrase/seed and the address for that to work, if I understand that correctly. What errors are you getting currently?
There is no way to import the "extraneous" private key into Trezor. Its keys are subject to SEED you have chosen . If you want to transfer bitcoins from wallet.dat to Trezor (and avoid downloading the whole blockchain), the only way to do that is to extract the priv key following what NeuroticFish said, import that key to another software wallet (SPV like Electrum is a good option) and send BTC from that wallet to Trezor.
Thank you for your reply xenon131. If I understood well, if I want to import the private keys from wallet.dat, I need to download another software?
But what if I just want to send the coins to Trezor in the easiest way possible with the least hassle possible? Can I do it just by downloading the whole blockchain, wait til it syncs up, load the wallet.dat file with the coin in it, restart BC and send the coin from BC to my Trezor wallet address plus the associated transaction fee? In which case I won't even need to get the private keys? Wouldn't that be the easiest way? Thank you.
Of course that you can sync Bitcoin Core. Just since the blockchain is very big, you'll need plenty of disk space (more than 300GB) and plenty of patience, since depending on the computer specs it may take a lot of time.
If that's OK for you, go for it.
Since you've started with dumprivkeys, then transfer, I guess that people (at least I did) have assumed at start that you want to use Electrum (or similar) afterwards, for transferring the funds and avoiding to downloading the blockchain.
Electrum (which is indeed another wallet software) needs seconds to sync and doesn't store the whole blockchain (it relies on other servers do that for you).
But Electrum needs to be verified, the transfer of private key is considered risky because malware can "see" that and steal your funds (especially on windows)... Well, you need to be careful.
So it's up to you after all what path you continue on.
HyperRavenFull Member
Posts: 175 · Reputation: 633
#10Dec 9, 2018, 07:21 AM
That is the recommended way. I don't recommend anyone trying to extract their private keys either, if they're inexperienced. Synchronizing the Bitcoin Core with your wallet.dat properly is the only way to ensure that you have transferred out all your funds from the wallet properly. You can prune your Bitcoin Core to reduce the disk space requirements as well.
Malwares can steal your private keys, even if you don't dump your private keys. It is more than common. The only risky part is the fact that it is often stored within the clipboard for an extended period of time and someone else uses your computer and view your clipboard history, then you'll expose your entire private key. That and some people don't know how to use it properly.
viper_2016Member
Posts: 2 · Reputation: 54
#11Dec 9, 2018, 08:06 AM
Isn't there a way to just pay someone to do this for us?? There has to be some legitimate business that does just this( recovers people's Bitcoin from their zip drives) so they don't have to download the entire Bitcoin Core or whatever that is. I'm having the same issue of the poster is having. I bought some Bitcoin a few years ago and forgot my login credentials and forgot the email address that I used and forgot which site I even used but I was able to find the file on my computer after remembering that they made me save a file on my computer before I could see my seed phrase however I can't find my seed phrase either. Doesn't that file that we saved on our computers have all that information? And is there someone that we can entrust our ZIP drives to that can sync them to the Bitcoin core to help us put them in a wallet we can use?
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#12Dec 9, 2018, 10:58 AM
Sure, by all means: feel free to pay me, send me your wallet, and I'll send your funds to another address. Risks: trusting me, trusting the email/upload you use, trusting my computer, trusting your own online computer, trusting malware anywhere in between.
It's possible. And it sure as hell isn't recommended!
Talk to Dave: Bitcoin Wallet Recovery Services. And watch out for phishing sites!
Who still uses ZIP drives? But that's a different problem than downloading Bitcoin Core. You don't need to sync 600 GB just to extract your private keys, and you don't even need to sync that much for old addresses to show up in Bitcoin Core.
That sounds like Blockchain.info. Start by reading [overview] Recover Bitcoin from any old storage format.
Who's "we"? I don't know what you saved.
Yes, those people exist. The problem is: you'll only know whether or not you can trust them after you risk your funds. And there are a lot more scammers than honest people willing to "help" you.
As @LoyceV said, we don't know what you saved. But you could find some information or clue on these,
1. Browser history, cookies and cache. You'll need special software to read the cache or cookies though.
2. Email account. Use the search feature with keyword such as "bitcoin", "crypto" or "wallet".
3. Wallet file on specific folder. For example, %AppData%\Roaming\Electrum would store your wallet file if you used Electrum wallet software.
4. Some online wallet have feature to backup wallet to your device. For example, blockchain.info (these days it's blockchain.com) have feature to let you download .aes.json file. You could try searching that either using Windows Explorer or file recovery software (in case you accidentally deleted it).
If you have further question, please create a new thread instead rather than keep using this thread.
viper_2016Member
Posts: 2 · Reputation: 54
#14Dec 9, 2018, 02:36 PM
Will do thank you for all of your help I look forward to chatting with you in the next thread PS if you can't tell I am a complete noob at all of this forum s***. Just saying
Related topics
- Recovering a Bitcoin wallet and address 8
- Issue with Bitcoin Core Wallet after power outage 8
- Transforming my wallet into an HD wallet bitcoin core 26 4
- Help Needed: BTC Purchase via Trust Wallet Where's My Bitcoin? 12
- bitcoin-qt sync issues and slow speeds 6
- CipherSeed: A Comprehensive Guide to Super-Secure Crypto Wallet Backups 5