Bitcoin Forum

Other => Beginners & Help => Topic started by: JohnAnderson on November 07, 2011, 01:51:41 AM



Title: Let's say I back up my wallet.dat while it's encrypted...
Post by: JohnAnderson on November 07, 2011, 01:51:41 AM
I spend a little here and there with the original wallet and the balance is reduced by a couple of coins. My laptop is stolen along with the original wallet. No matter, I go to my back up and reload it into a new Bitcoin installation. Will it work despite being dated?


Title: Re: Let's say I back up my wallet.dat while it's encrypted...
Post by: RyNinDaCleM on November 07, 2011, 01:59:43 AM
It'll be updated once it is connected to the network! You will need the encryption software used, so you can decrypt it. Though I would send those remaining coins to another wallet address ASAP.


Title: Re: Let's say I back up my wallet.dat while it's encrypted...
Post by: DeathAndTaxes on November 07, 2011, 05:46:38 AM
Yes* but you should make regular backups.

The reason why is when Bitcoin needs new addresses it will generate them.  To avoid the wallet being out of date after each transaction the wallet has a pool of unused addresses called the keypool.  By default it is 100 addresses.

So this means if you:
1) make a backup
2) make transactions that result in 100 new addresses (all from keypool)
3) lose wallet
4) restore from backup

you are fine because all of the 100 "new" addresses came from the keypool.

On the other hand is step #2 was 200 addreses then your backup wouldn't "know" about half of them and you would lose coins.  As long as you periodically backup your wallet then you will be fine.   If you wallet is ever lost (even if encrypted) once you restore the backup immediately move all coins to a brand new address in a brand new wallet for security.





Title: Re: Let's say I back up my wallet.dat while it's encrypted...
Post by: RodeoX on November 07, 2011, 05:37:18 PM
If two copies of a wallet exist and one of them does a transaction, then that one becomes the wallet and invalidates the other.


Title: Re: Let's say I back up my wallet.dat while it's encrypted...
Post by: johnj on November 07, 2011, 06:22:38 PM
If two copies of a wallet exist and one of them does a transaction, then that one becomes the wallet and invalidates the other.

I'm pretty sure this isn't the case...?

AFAIK, you wallet just holds the private keys to access a particular address on the blockchain.


Title: Re: Let's say I back up my wallet.dat while it's encrypted...
Post by: DeathAndTaxes on November 07, 2011, 06:24:13 PM
If two copies of a wallet exist and one of them does a transaction, then that one becomes the wallet and invalidates the other.

That is not true.

If you have two copies of the wallet and one performs a transaction then as long as there are sufficient keys in the keypool the other (backup) copy can be brought up to date by simply connecting it to the network.


Title: Re: Let's say I back up my wallet.dat while it's encrypted...
Post by: RodeoX on November 07, 2011, 08:08:13 PM
If two copies of a wallet exist and one of them does a transaction, then that one becomes the wallet and invalidates the other.

I'm pretty sure this isn't the case...?

AFAIK, you wallet just holds the private keys to access a particular address on the blockchain.

That is not true.

If you have two copies of the wallet and one performs a transaction then as long as there are sufficient keys in the keypool the other (backup) copy can be brought up to date by simply connecting it to the network.

Oh, now I see how wrong I was. I have to stop posting just before lunch.  :-X