Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: the joint on January 21, 2012, 10:35:52 PM



Title: Backing up wallet...Simple Question
Post by: the joint on January 21, 2012, 10:35:52 PM
I want to make a simple dual-backup of my wallet.

Can I simply do this?

1.)  Exit client.  Insert USB stick.  Copy wallet.dat to USB stick.   Remove and Store USB stick.
2.)  Email copy of wallet.dat to myself.

In the event that my wallet gets corrupted or lost, I can simply reinsert the wallet.dat back into the roaming/Bitcoin folder and reload the client, correct?


Title: Re: Backing up wallet...Simple Question
Post by: vuce on January 21, 2012, 10:37:33 PM
Yes. But you have to do this every so often (every 100 addresses).


Title: Re: Backing up wallet...Simple Question
Post by: the joint on January 21, 2012, 10:40:25 PM
Yes. But you have to do this every so often (every 100 addresses).

You mean I have to make a copy every 100 addresses that my client creates?  Not every 100 blocks?

I'm pretty sure I'm a lonnnnnng ways off from generating 100 addresses.


Title: Re: Backing up wallet...Simple Question
Post by: vuce on January 21, 2012, 10:42:08 PM
Yes. But you have to do this every so often (every 100 addresses).

You mean I have to make a copy every 100 addresses that my client creates?  Not every 100 blocks?

I'm pretty sure I'm a lonnnnnng ways off from generating 100 addresses.

Yes. It will take a while. You could also use a parameter to force pre-generation of any number of addresses - although I wouldn't know how.


Title: Re: Backing up wallet...Simple Question
Post by: the joint on January 21, 2012, 10:44:34 PM
Yes. But you have to do this every so often (every 100 addresses).

You mean I have to make a copy every 100 addresses that my client creates?  Not every 100 blocks?

I'm pretty sure I'm a lonnnnnng ways off from generating 100 addresses.

Yes. It will take a while. You could also use a parameter to force pre-generation of any number of addresses - although I wouldn't know how.

Awesome, thanks!

BTW if anyone else can confirm that'd be great.


Title: Re: Backing up wallet...Simple Question
Post by: jake262144 on January 22, 2012, 12:15:41 AM
Firstly, it's more like doing the backup every 100 actions.
No matter whether you receive funds, send funds, or generate new receiving addresses, each of those actions uses(1) one of the pre-generated keys.

Secondly, you can run bitcoin-qt with the parameter -keypool=<n>  to tweak the pool of pre-generated keys. Sane values are <1000.
Code:
c:\Program Files (x86)\Bitcoin\bitcoin-qt.exe -keypool=256


Notes:
(1) Actually, receiving funds only uses a key from the key-pool if the funds are sent to the address currently listed as "my address". Receiving bitcoins with any other previously-generated address does not influence the key-pool. Therefore, you will generally be safer than you think you are as far as using very old wallet backups is concerned.


Title: Re: Backing up wallet...Simple Question
Post by: Gabi on January 22, 2012, 01:57:41 PM

2.)  Email copy of wallet.dat to myself.

Yes you can but please encrypt it before emailing it to yourself. Giving the private keys to the email service owner? Not a clever thing.


Title: Re: Backing up wallet...Simple Question
Post by: Garr255 on January 24, 2012, 06:21:17 AM
Just an added confirmation, it is wise to backup every 100 actions, not blocks or addresses.


Title: Re: Backing up wallet...Simple Question
Post by: brunoshady on January 27, 2012, 07:47:25 PM
Backup more often, better safe than sorry