Author

Topic: How do I verify that my wallet.dat file is not damaged? (Read 765 times)

newbie
Activity: 11
Merit: 0
Thank you for answering my questions.  Smiley

I prefer to keep only digital copies of the keys, passwords, etc, because they can be encrypted and it's easier to make backup copies.
legendary
Activity: 3472
Merit: 4801
A good backup strategy should include periodic recoveries to ensure that the backups are useable.

That being said, you could print out (or write down) your private keys on a regular basis.  Then you could just look at the paper with your eyes and see if it is "damaged".  If it is faded, and you can no longer read the ink, or if the paper burns up in a fire, or if a piece of the paper including some portion of a private key is torn off, then the "backup" is "damaged".

If you have a large sum of bitcoin that you are concerned about, you could also consider printing out a paper wallet and sending a large percentage of your bitcoin to that paper wallet, keeping just a small percentage in your digital wallet for your daily use.  This way if you discover that the backup of your digital wallet is corrupt (or stolen), you will only risk losing this small portion of your holdings.


1. I make regular backups of all important files, but how do I verify that my wallet.dat file is not damaged?
Try recovering it somewhere (another computer?)

2. What if my hard drive has bad sectors and can it affect the wallet.dat file?
Depending on how many bad sectors and where they are located, yes it is possible.

3. Will the wallet.dat file still open even if it has like a few bytes missing?
I learned something new here in Mr. Gornick's post above.  Apparently it will?!  That's nice to know.  I hadn't realized that before this.

4. Could I be backing up a damaged file and not being aware of it?
Absolutely.  It is possible.  As long as your wallet successfully runs, the odds aren't high, but it isn't impossible.


5. What if my computer crashes or there is a power failure while the wallet.dat file is being modified by the bitcoin software?
In most cases you will be ok, but a good backup strategy will certainly reduce the risk.
legendary
Activity: 1372
Merit: 1000
--------------->¿?
Thanks for answering some of the questions.

It's technical uncertainties like these and the fear of losing everything that prevent a lot of people and companies from adopting bitcoin.

I agree and that is why bitcoin still not ready for mainstream adoption and need more development on that way
newbie
Activity: 11
Merit: 0
Thanks for answering some of the questions.

It's technical uncertainties like these and the fear of losing everything that prevent a lot of people and companies from adopting bitcoin.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
If you have another computer available the best way to check that your backed up wallet is fine would be to install bitcoin on the second computer then copy the wallet (and the blockchain files to save time) and start bitcoin-qt up with the -rescan option.

Once it has scanned your balance should be the same as on your other computer - if so then one other test might be to make sure your password is accepted.
legendary
Activity: 2506
Merit: 1010
5. What if my computer crashes or there is a power failure while the wallet.dat file is being modified by the bitcoin software?

The database system for the wallet is BDB.  i has crash recovery and will in most instances be able to recover automatically.  If it rolls back from a failed attempt to try to write a transaction, that transaction probably didn't get broadcast and thus can disappear without any problem.   If it did get broadcast but the crash prevented it from being stored in the wallet, then the node will learn of the transaction from peers in the network  or worst case, learn about it once there is a new block.

newbie
Activity: 11
Merit: 0
Some newbie questions:

1. I make regular backups of all important files, but how do I verify that my wallet.dat file is not damaged?

2. What if my hard drive has bad sectors and can it affect the wallet.dat file?

3. Will the wallet.dat file still open even if it has like a few bytes missing?

4. Could I be backing up a damaged file and not being aware of it?

5. What if my computer crashes or there is a power failure while the wallet.dat file is being modified by the bitcoin software?
Jump to: