Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: jlp on May 15, 2017, 01:25:27 AM



Title: Can I delete old copies of wallet.dat?
Post by: jlp on May 15, 2017, 01:25:27 AM
I have Bitcoin Core and wallet.dat.

In the past, I've made backups of wallet.dat by copying them to another disk.  Now, when I open each of the wallet.dat with Bitcoin Core, I see a different balance.  This makes sense because there were transactions between each time I took a backup copy.

Am I correct to assume that I can delete the older copies?  (I read somewhere that I should never delete any wallet.)

Why would the different wallet.dat files show different balances?  Don't they have the same addresses and keys?


Title: Re: Can I delete old copies of wallet.dat?
Post by: achow101 on May 15, 2017, 02:04:32 AM
Am I correct to assume that I can delete the older copies?  (I read somewhere that I should never delete any wallet.)
As long as you still have backups that are more recent versions of the backup that you are deleting, yes, you can delete those. However you should still keep several recent versions of the backup in multiple places to be safe.

Why would the different wallet.dat files show different balances?  Don't they have the same addresses and keys?
No. After 100 addresses are used (including change addresses), a new set of 100 addresses will have been generated which are not part of the previous backup.


Title: Re: Can I delete old copies of wallet.dat?
Post by: jlp on May 15, 2017, 01:41:33 PM

Thanks for your reply.


Why would the different wallet.dat files show different balances?  Don't they have the same addresses and keys?
No. After 100 addresses are used (including change addresses), a new set of 100 addresses will have been generated which are not part of the previous backup.

I didn't make anywhere close to 100 transactions.  Just a handful.  Therefore, shouldn't the same addresses and keys (that had any transactions) exist in all copies of the wallet.dat?  If so, shouldn't Bitcoin Core be able to determine from those addresses and keys, the most up-to-date bitcoin balance (and the same balance) for all copies of wallet.dat?


Title: Re: Can I delete old copies of wallet.dat?
Post by: achow101 on May 15, 2017, 02:47:38 PM
I didn't make anywhere close to 100 transactions.  Just a handful.  Therefore, shouldn't the same addresses and keys (that had any transactions) exist in all copies of the wallet.dat?  If so, shouldn't Bitcoin Core be able to determine from those addresses and keys, the most up-to-date bitcoin balance (and the same balance) for all copies of wallet.dat?
You may need to rescan since it may not rescan when you load an older wallet so it doesn't know about the transactions that were made after the backup was made.