Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: samek97 on August 17, 2014, 09:09:26 AM



Title: Backup question
Post by: samek97 on August 17, 2014, 09:09:26 AM
Hello, I would like to ask a question with a specific example.

Let's say I use bitcoin core. I backed up my wallet.dat file with 1 BTC balance, then I spent 0.2 BTC leaving my balance with 0.8 BTC.

Suddenly my computer crashed and I lost all file on It but I still have my backup which I did at 1 BTC balance.

So, when I will paste my backed up wallet.dat file on other computer what balance will I get? Is it 0.8 BTC?

Like If I backup my wallet and then spend some of the bitcoins, my backed up wallet automatically updates the balance to lower or?


Thanks.


Title: Re: Backup question
Post by: shorena on August 17, 2014, 09:30:34 AM
Hello, I would like to ask a question with a specific example.

Let's say I use bitcoin core. I backed up my wallet.dat file with 1 BTC balance, then I spent 0.2 BTC leaving my balance with 0.8 BTC.

Suddenly my computer crashed and I lost all file on It but I still have my backup which I did at 1 BTC balance.

So, when I will paste my backed up wallet.dat file on other computer what balance will I get? Is it 0.8 BTC?

Yes when you restore you wallet.dat you will have the amount of BTC you had last (not at the time of the backup). That is because the wallet.dat does not contain your bitcoins, but the private keys you need to spend your coins. There is actually no single place where the bitcoins are. The blockchain ist just a long list of inputs and outputs which together form transactions. If you have a private key that allows you use an unspend output of 1 BTC, you "control" or "have" 1 BTC.




Title: Re: Backup question
Post by: BurtW on August 17, 2014, 01:14:17 PM
That is true.

It is very important to note that there is a limit to this.  You should back up your wallet.dat file at least every 50 send transactions or so and you MUST back up your wallet.dat file after about 90 send transactions.  This is because every send uses a new private key and each backup contains all the private keys you have used so far plus the next 100 private keys you will use.