0

my situation is the following: I have a laptop with not much space on disk and therefore using bitcoin on a stick (I start bitcoin-qt with the argument "-datadir=location/to/stick). Now I wanted to transfer some bitcoins from my mobile phone to that account. Accidentaly I typed in a wrong directory (which doesnt exist) and bitcoin-qt lead me to the standard bitcoin directory (which is ~/.bitcoin). I didn't realize this and transferred the bitcoins to that address.

Now I would like to change the wallet.dat file from the ~/.bitcoin/ directory with the wallet.dat file from the directory on my stick, because my stick has all the blockchain already loaded. Is this possible?

What I have tried so far:

  • simply changing the wallet.dat files: when I now start bitcoin-qt it goes in a very very long loop (probably even an endless-loop). It just says "Dursuche erneut..." (german), what means translated: "Researching..."
  • doing the above, but with the additional argument "-rescan" ("bitcoin-qt -rescan -datadir=/location/of/stick"): it happens the same as above
  • trying to backup the relevant wallet.dat file inside the console of bitcoin-qt: when trying to back it up i get the error: "Error: Wallet backup failed! (code: -4)"

Can someone help me with this problem? Thanks in advance!

Edit: I wanted to rewrite my problem in another (probably easier understandable) way: I would like to overwrite the wallet.dat file inside the ~/.bitcoin/ folder. But doing so, bitcoin-qt doesnt stop loading (it just says "Researching...". Is there another way to do what I want?

  • Could you raise an issue on Github with that stupid translation? It should say "rescanning" which would make a lot more sense. – user13413 Feb 18 '14 at 21:32
  • »Durchsuche erneut« actually means »rescanning«. The translation is correct, I think. – erik Feb 18 '14 at 22:50
0

You're on the right track -- in fact you're already using the correct command line switch, which is "-rescan". But your mistake is thinking this is a quick solution. It's not. Rescanning the blockchain will take hours, depending on your processor speed.

This is a task you'll want to leave running overnight. If the problem persists even then, record the error message you get once the rescanning has completed, and ask another question with that error message.

Your next option would probably be to actually transfer the Bitcoins using a tool like pywallet, but I'd wait until you've left this rescanning overnight before you try that, and seek guidance on how to use pywallet.

  • I just did this. It didn't finish overnight. And as stupid as I am, I stopped the rescanning right before I went to this site to see your answer... I will rescan again for a full day and will report back then. – brgr Feb 19 '14 at 5:10
  • It worked now, just as you said. I would upvote your answer, but I cannot yet, sorry :/ – brgr Feb 19 '14 at 13:46
  • Thanks Eric, today you re my personal Hero:-) I was impatient as well and aborted the rescanning process because the translation "durchsuche erneut" implied to me that something was wrong, like "none found, tried again" so I aborted the process after 10min. (To that timepoint nothing had been written into the error log which confirmed my decision). The translation should be changed into something clearer like: "Rescanning keys takes some time, do not abort", or the original "rescanning" should be retained because its self-explanatory and has a deeper meaning than the German word "durchsuchen". – user18474 Jul 4 '14 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.