Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: BitcoinBarrel on June 13, 2013, 06:46:14 PM



Title: Do you have to Backup your Wallet.dat after each new address?
Post by: BitcoinBarrel on June 13, 2013, 06:46:14 PM
I have read a few stories of people backing up their wallets and later after trying to restore the wallet.dat find only address up until the point the backup was produced. Has this been changed in the new released of Bitcoin-qt or is this still an issue?


Title: Re: Do you have to Backup your Wallet.dat after each new address?
Post by: kjj on June 13, 2013, 08:28:00 PM
There is a config file value that changes the size of the keypool.  The default is 100 keys, and has been for a long time, but can be changed easily.

If you back up your wallet, the backup copy has the next 100 (or whatever) keys that your node will use.

Note that this may cause branching issues.  For example, if you save your wallet at time A, then use some keys, then save your wallet at time B, then restore back to A, you will have lost some keys that were in B, but weren't in A.  Of course, you will never have seen those keys unless you went poking around in the file, so losing them isn't a big deal.  And if you are poking around inside the wallet using something other than the bitcoin client, we hope that you understand what you are doing well enough to avoid losing keys.