1

I follow the instructions for wallet backup and save them digitally. What's a convenient way to occasionally test my wallet backup. I want to make sure that I'm not doing something stupid & my backup method isn't creating unrecoverable garbage.

I can think of 2 ways for testing

  1. Install the bitcoin client on another computer and import the backup & check balances
  2. Rename my installed folder on the existing computer & do a fresh install on the existing computer.

But these methods are not very convenient. Is there a smarter way around it? e.g. a command line tool that'll check the file integrity and spit out some data with which you are reasonably confident that it's your wallet and has the right amount of coins.

3 Answers 3

1

You can configure Bitcoin QT to use a specific data directory, but it only looks in that place for wallet.dat.

I would (1) close Bitcoin QT, (2) move the existing [data directory]\wallet.dat to another folder (3) copy your backup into the [data directory], and (4) reopen Bitcoin QT.

Don't overwrite your existing wallet.dat with the backup! Step (2) is pretty important in case there's a problem with the backup file.

2
  • This sounds easier than renaming the whole directory. Any idea of how I can do that for an Android/iOS client?
    – user
    Feb 26, 2014 at 18:28
  • I'm not sure, sorry. Feb 26, 2014 at 19:21
0

NEVER play around and fiddle with a working software/wallet for testing backups. Because you can make a mistake. Expert computer users destroy data regularly by mistakes in backups. And when you some time actually need a backup is the worst time for fiddling around, so better have a solution already prepared.

To verify the "account balance" on your wallet you'd need to either download the blockchain (but the pruned version is enough if you're not hardcore paranoid) and need to know which bitcoin addresses you control (="your bitcoins"). Or just look up your addresses on bitcoin.info or biteasy or other website that gives you a view onto the blockchain. Actually it can be a good idea to continuously track your balance with a separate software. If you don't need to hide which bitcoins are yours, simply export a "watching only" wallet from your current software (it's a wallet without the keys needed to actually spend/transact/sign for your coins) and maybe import the watching wallet in some smartphone app or some web wallet, then set up some suitable notifications.

To simply verify the correctness of a wallet.dat, up to date tools may not exist. A 2011 forum thread about the original python wallet tools has a warning at the front: https://bitcointalk.org/index.php?topic=11331.0 And in another question, someone had lost their wallet.dat (or moved+renamed and forgot about it) and it appears the wallet file format is not easy to detect by anything other than the file name. So a wallet verification tool would depend on getting source code from the wallet software and knowing which file and encryption/password to verify it with.

If your backup is a "standard" wallet.dat file you have some(1) chance for it to work in many different wallet softwares and apps. Preferably test on a fresh computer that has never been connected to any network (i.e. installed without cables plugged in. Windows 95 could get hacked while the installation software was running the last phases...). Without an extra physical computer, try using a virtual machine-software and create a fresh "computer inside your computer". If Linux doesn't scare you and your wallet software is available on linux, then you can create a USB-stick with linux on it. Linux Live USB can give you one that runs as a virtual machine, but classical Live USB sticks instead require you to restart your computer with the USB plugged in and might be tricky to get working.

Finally, if you load you wallet backup on an untrusted computer or even a smartphone, you should have prepared in advance a new safe wallet to send your coins to.

And you should NEVER keep a large amount of coins in such a way that it can all be lost or stolen if you get the phone/computer stolen or if you forget a password. Think how much USD/EUR/... cash you would carry with you on a street with risk for pickpockets, robberies, loosing your wallet by clumsiness, etc and use that as a guide for how much bitcoin you should be handling yourself. For bigger sums, first exercise with smaller sums and it is probably wise to spread your risk by using several trusted expert(2) third parties to store your coins, just like you use banks to handle savings accounts. The time when all "banks" can be removed is not yet. Better, safer apps and hardware wallets need to be created.

(1) In http://media01.bitcoinarmory.com/InsideBitcoins_Present.pdf it is explained that wallet encryption works differently in Bitcoin-Qt and Armory, and presumably other wallet software use a weaker but more "standard" wallet encryption. (2) MtGox has proved again and again they are not experts. Most other well-known online wallets/traders are probably trustable with some bigger sums

1
  • 1
    I agree with all your points about safety but installing VM for testing wallets is too much effort IMHO. I was wondering if there's a tool that'll verify the wallet file integrity without jumping through hoops. And it's a good point to test any method with a wallet with a tiny amount.
    – user
    Feb 27, 2014 at 6:08
0

Best method IMHO is to restore the wallet on another (trusty) device, check the balance, spend a little amount of uBTC and verify the other address got the money. Then delete securely the test wallet. A VM in this case is very handy.

The key step is to actually spend and test everything goes as expected. If you don't do it you can't never be 100% confident the backup will work

Checking you got the right balance back is not enough because the checking itself does not require the client to actually know the private key

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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