gyzer (OP)
Jr. Member
Offline
Activity: 50
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 22, 2011, 07:10:38 PM |
|
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.
|
|
|
|
wolftaur
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 112
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 22, 2011, 07:15:35 PM |
|
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!!!!"
|
|
|
wolftaur
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 112
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 22, 2011, 07:36:58 PM |
|
https://en.bitcoin.it/wiki/Key_poolIf 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!!!!"
|
|
|
byronbb
Legendary
Offline
Activity: 1414
Merit: 1000
HODL OR DIE
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 22, 2011, 09:56:17 PM |
|
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
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 182
Merit: 100
Finding Satoshi
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 22, 2011, 11:30:30 PM |
|
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
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 23, 2011, 12:19:37 AM |
|
Every transaction on the network gets recorded in the block chain and stored on every node.
|
|
|
|
gyzer (OP)
Jr. Member
Offline
Activity: 50
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 23, 2011, 02:46:38 AM |
|
I'm more confused now than I was before...
|
|
|
|
netrin
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 322
Merit: 251
FirstBits: 168Bc
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 23, 2011, 04:07:17 AM |
|
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)
|
|
|
|
aahzmundus
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 23, 2011, 04:21:40 AM |
|
"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 (OP)
Jr. Member
Offline
Activity: 50
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 24, 2011, 07:03:59 PM |
|
"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
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 103
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 24, 2011, 08:38:00 PM |
|
|
Working on protecting the community!
|
|
|
Fishbones
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 25, 2013, 11:29:17 AM |
|
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-walletSo are we there yet? i.e., How often do we need to backup a wallet with current wallet applications?
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 25, 2013, 11:35:54 AM |
|
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?
|
|
|
|
Fishbones
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 28, 2013, 01:46:49 PM |
|
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
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 28, 2013, 01:53:01 PM |
|
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).
|
|
|
|
Abdussamad
Legendary
Offline
Activity: 3654
Merit: 1571
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 28, 2013, 07:32:28 PM |
|
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
Activity: 3472
Merit: 4790
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 29, 2013, 02:38:51 PM |
|
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.
|
|
|
|
|