Bitcoin Forum
December 05, 2016, 08:58:08 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Do you just need to backup your wallet.dat once?  (Read 7135 times)
gyzer
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 22, 2011, 07:10:38 PM
 #1

This might sound a bit stupid but I encountered something last night that made me scratch my head concerning what I THOUGH I knew about backing up your wallet.dat.

So first this is why I'm asking:

Last night I had done a transfer from my mining pool to my wallet. During the confirmation process, at like 2 confirmations, my computer froze. On top of this my wallet.dat was currently being read by the Bitcoin client from an opened TrueCrypt encrypted volume in a file. When I restarted my computer and I opened up the encrypted volume again the wallet.dat was corrupt. I then copied over an older backup of my wallet.dat, it was a few hours older, and I let it scan all of the blocks and I ended up not loosing anything.

Now I know that I shouldn't ever work directly out of an encrypted volume to prevent something like this from happening again but it got me to thinking: Do I need to constantly be backing up my wallet.dat or will just one backup do? I mean it seems that when a wallet.dat doesn't have the current info from the subsequent blocks that it just scans the network and gets that info pretty quickly. Won't that then using an older backup just eventually find the blocks with my transactions and add them to the older wallet.dat?

If I've got this entirely wrong please help me out with this.
1480971488
Hero Member
*
Offline Offline

Posts: 1480971488

View Profile Personal Message (Offline)

Ignore
1480971488
Reply with quote  #2

1480971488
Report to moderator
1480971488
Hero Member
*
Offline Offline

Posts: 1480971488

View Profile Personal Message (Offline)

Ignore
1480971488
Reply with quote  #2

1480971488
Report to moderator
1480971488
Hero Member
*
Offline Offline

Posts: 1480971488

View Profile Personal Message (Offline)

Ignore
1480971488
Reply with quote  #2

1480971488
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480971488
Hero Member
*
Offline Offline

Posts: 1480971488

View Profile Personal Message (Offline)

Ignore
1480971488
Reply with quote  #2

1480971488
Report to moderator
wolftaur
Member
**
Offline Offline

Activity: 112


View Profile
June 22, 2011, 07:15:35 PM
 #2

Back it up periodically. When you conduct certain types of transactions the client will make new keys. For example, if you receive coins at your 'default' address, the client automatically makes a new address for you. If you send coins and receive 'change' you'll often have new keys for that as well.

If you have an old enough backup there may be keys you were using that were generated after your last backup. There's also a parameter you can put in the config file that says how big of a key pool you want it to pre-generate, you may want to look into that as well.

"MOOOOOOOM! SOME MYTHICAL WOLFBEAST GUY IS MAKING FUN OF ME ON THE INTERNET!!!!"
Ukigo
Hero Member
*****
Offline Offline

Activity: 924


View Profile
June 22, 2011, 07:20:38 PM
 #3

As i know backup needed after EVERY sending transaction.
And after several receiving too.
I myself backing up after each transaction.

"...Enemies are everywhere ! Angka is all rage ! Be a good soldiers, blow everything... " <-- Pol Pot (C)
wolftaur
Member
**
Offline Offline

Activity: 112


View Profile
June 22, 2011, 07:36:58 PM
 #4

https://en.bitcoin.it/wiki/Key_pool

If you run a recent client you have 100 unused keys in your wallet, and thus only need to back it up after every so many transactions. This was added to prevent having to back up after _EVERY_ single transaction. Every time you use one of the keys from the pool it'll make and store a new key, so that each time you back up your wallet, the next 100 keys you would use are in the backup.

https://en.bitcoin.it/wiki/Running_Bitcoin contains instructions for the different things you can specify on command line or in the bitcoin config file, and you can increase (or decrease) the pool size using one of the parameters.

"MOOOOOOOM! SOME MYTHICAL WOLFBEAST GUY IS MAKING FUN OF ME ON THE INTERNET!!!!"
Ukigo
Hero Member
*****
Offline Offline

Activity: 924


View Profile
June 22, 2011, 07:54:55 PM
 #5

I am using v.0.3.21. Not that old.
For me reliability is all that matters )
I have been reading those docs. Also have read several posts
with above mentioned recommendations.As i understand this -
opinions wary about how often to backup after receive of coins.
Maybe newer versions handle it better, who knows ?
But they are can as well contain some yet undiscovered bugs.
So i stick with my approach. A little bit of paranoia never hurts )

"...Enemies are everywhere ! Angka is all rage ! Be a good soldiers, blow everything... " <-- Pol Pot (C)
byronbb
Legendary
*
Offline Offline

Activity: 1400


HODL OR DIE


View Profile
June 22, 2011, 09:56:17 PM
 #6

I have 2 wallets. 1 for small transactions. 1 for hoarding. The hoard sits in the bitcoin folder as an encrypted wallet.dat. When I want to open it up I rename the current wallet.dat to wallet.bak and decrypt the hoard one. I do my transaction and then reverse the process. Remember, any change to a wallet renders its backup as worthless. A good rule is to never over write a wallet.dat with another.

noedaRDH
Full Member
***
Offline Offline

Activity: 182


Finding Satoshi


View Profile
June 22, 2011, 11:30:30 PM
 #7

If I set up a wallet to only receive and never use it to send, will the original wallet.dat work? I won't need to always update the wallet.dat do I? I just want to avoid exposing my wallet file to the internet as much as possible until I need to spend all of it.

1NwGKiLcAngD1KiCCivxT6EDJmyXMGqM9q

Ask not what Bitcoin can do for you - ask what you can do for Bitcoin.
Litt
Sr. Member
****
Offline Offline

Activity: 350


View Profile
June 23, 2011, 12:19:37 AM
 #8

Every transaction on the network gets recorded in the block chain and stored on every node.
gyzer
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 23, 2011, 02:46:38 AM
 #9

I'm more confused now than I was before...
Ukigo
Hero Member
*****
Offline Offline

Activity: 924


View Profile
June 23, 2011, 03:46:18 AM
 #10

I'm more confused now than I was before...
You still can make backup after EVERY transaction.
It's quite simple. Do not think about it too much. All will be Ok )

"...Enemies are everywhere ! Angka is all rage ! Be a good soldiers, blow everything... " <-- Pol Pot (C)
netrin
Sr. Member
****
Offline Offline

Activity: 322


FirstBits: 168Bc


View Profile
June 23, 2011, 04:07:17 AM
 #11

Receiving coins to a previously used address will not (significantly) alter your wallet.dat (no new address/keys are generated nor need to be backed up).

When you send coins, one or more addresses will be drained of all of their address/keys and the remainder will be returned to a new address in your wallet.dat (at least one new address/key will be generated).

At any point you have 100 more keys in your current wallet.dat beyond the latest address displayed in the GUI.

--

Question: Is there any single user action that will return to more than one address or in some other way generate more than one key?

(I have assuming that if I have numerous addresses containing a small number of BTC each and I send a moderate number of BTC, then the total remainder will be returned to a single address in my wallet.dat)

Greenlandic tupilak. Hand carved, traditional cursed bone figures. Sorry, polar bear, walrus and human remains not available for export.
aahzmundus
Hero Member
*****
Offline Offline

Activity: 644


Invest & Earn: https://cloudthink.io


View Profile
June 23, 2011, 04:21:40 AM
 #12

"Modern" wallets generate more keys then you see in your client, that way you don't have to back up your wallet after each new address.

There are 100 keys generated each time you need more keys to accept/receive coins.

As long as your backup each time you generate a new 100 keys, your backup is good, however there is no real way to know when that happens.

I would say have two wallets, have one where you only have two addresses you use, and keep most of your coins there. Keep that encrypted 99% of the time... you don't need to have it running to check balance and send coins.  Use the other one more often and back it up weekly offsite using something like wuala.

gyzer
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 24, 2011, 07:03:59 PM
 #13

"Modern" wallets generate more keys then you see in your client, that way you don't have to back up your wallet after each new address.

There are 100 keys generated each time you need more keys to accept/receive coins.

As long as your backup each time you generate a new 100 keys, your backup is good, however there is no real way to know when that happens.

I would say have two wallets, have one where you only have two addresses you use, and keep most of your coins there. Keep that encrypted 99% of the time... you don't need to have it running to check balance and send coins.  Use the other one more often and back it up weekly offsite using something like wuala.

So your saying have two backups then?
bitprotection
Member
**
Offline Offline

Activity: 103



View Profile
June 24, 2011, 08:38:00 PM
 #14

http://www.bitprotection.info  Grin

Working on protecting the community!
Fishbones
Full Member
***
Offline Offline

Activity: 122


View Profile
July 25, 2013, 11:29:17 AM
 #15

Quote
Make regular backups

You need to backup your wallet on a regular basis to make sure that all recent Bitcoin change addresses and all new Bitcoin addresses you created are included in your backup. However, all applications will be soon using wallets that only need to be backed up once.

Taken from http://bitcoin.org/en/secure-your-wallet

So are we there yet? i.e., How often do we need to backup a wallet with current wallet applications?
CIYAM
Legendary
*
Offline Offline

Activity: 1820


Ian Knowles - CIYAM Lead Developer


View Profile WWW
July 25, 2013, 11:35:54 AM
 #16

So are we there yet? i.e., How often do we need to backup a wallet with current wallet applications?

If you are using the Satoshi client then you still need to take regular backups - some other wallet apps use "deterministic" keys (which typically require you to backup a "seed" and a long "pass phrase" for wallet recovery).

Maybe someone has created a wallet comparison table?

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

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Fishbones
Full Member
***
Offline Offline

Activity: 122


View Profile
July 28, 2013, 01:46:49 PM
 #17

So are we there yet? i.e., How often do we need to backup a wallet with current wallet applications?

If you are using the Satoshi client then you still need to take regular backups - some other wallet apps use "deterministic" keys (which typically require you to backup a "seed" and a long "pass phrase" for wallet recovery).

Maybe someone has created a wallet comparison table?


OK, What would be considered best practice for a regular backup...after every transaction, every 50, 90 etc transactions?
CIYAM
Legendary
*
Offline Offline

Activity: 1820


Ian Knowles - CIYAM Lead Developer


View Profile WWW
July 28, 2013, 01:53:01 PM
 #18

OK, What would be considered best practice for a regular backup...after every transaction, every 50, 90 etc transactions?

Although I tend to backup up every transaction that is not necessary - I'd recommend getting into a regular habit that suits the # of tx's you make (so if you only tend to make a few every month then once per month would be fine but if you do end up doing a *lot* of tx's in any particular month you might need to backup more often at least for that month).

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

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Abdussamad
Legendary
*
Offline Offline

Activity: 1204



View Profile WWW
July 28, 2013, 07:32:28 PM
 #19

So are we there yet? i.e., How often do we need to backup a wallet with current wallet applications?

If you are using the Satoshi client then you still need to take regular backups - some other wallet apps use "deterministic" keys (which typically require you to backup a "seed" and a long "pass phrase" for wallet recovery).


Just to add the team behind the Satoshi client is also considering going deterministic. So this is indeed the future.

OK, What would be considered best practice for a regular backup...after every transaction, every 50, 90 etc transactions?

That hasn't changed since 2011. 100 transactions is still the max before you take a backup. Do it after 90 if it makes you feel better.

If you are worried about backups I suggest switching to armory or electrum. Both are deterministic and as mentioned before this is the future course of action for the bitcoin-qt client as well. You only have to backup a deterministic wallet once.

DannyHamilton
Legendary
*
Offline Offline

Activity: 1624



View Profile
July 29, 2013, 02:38:51 PM
 #20

OK, What would be considered best practice for a regular backup...after every transaction, every 50, 90 etc transactions?

Best practice?  Not sure about that.  Here's my thoughts on the matter:

There is a reasonable possibility that a recent backup could be damaged or otherwise unusable.  As such, I recommend keeping copies of the most recent few backups created.

The reference client (known as "Bitcoin-Qt", "the satoshi client", or "bitcoind") uses a new address (and private key) from the key pool every time you choose to generate a new address from the user interface AND every time you send a transaction.  If you keep an approximate count of the number of new addresses you've used and then create a backup every 25 addresses or so, then you can keep the 3 most recent backups and still be able to recover all your current bitcoins from any one of them.

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!