Bitcoin Forum
August 01, 2024, 11:08:23 PM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do I verify that my wallet.dat file is not damaged?  (Read 762 times)
susanne (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 30, 2012, 03:11:52 AM
 #1

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?
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
November 30, 2012, 09:40:28 AM
 #2

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.


Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1086


Ian Knowles - CIYAM Lead Developer


View Profile WWW
November 30, 2012, 09:49:19 AM
 #3

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.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
susanne (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 30, 2012, 03:58:36 PM
 #4

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.
knight22
Legendary
*
Offline Offline

Activity: 1372
Merit: 1000


--------------->¿?


View Profile
November 30, 2012, 04:02:09 PM
 #5

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

DannyHamilton
Legendary
*
Online Online

Activity: 3472
Merit: 4763



View Profile
November 30, 2012, 05:53:50 PM
 #6

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.
susanne (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 30, 2012, 06:15:52 PM
 #7

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!