Bitcoin Forum

Other => Beginners & Help => Topic started by: Quantus on July 16, 2011, 05:26:56 PM



Title: So can i just Swap out wallet.dat files?
Post by: Quantus on July 16, 2011, 05:26:56 PM


Say my computer just bursts into flames and melts into a pool of black goo and scorched metal.

Now I have a saved copy of the Wallet.dat file in a Turecrpt 256bit-27 digit password protected file saved on my Dropbox account.

Assuming the back up is resent can I just download bitcoin onto another computer and replace the wallet.dat file and I"m good?


Title: Re: So can i just Swap out wallet.dat files?
Post by: kinlo on July 16, 2011, 05:33:28 PM


Say my computer just bursts into flames and melts into a pool of black goo and scorched metal.

Now I have a saved copy of the Wallet.dat file in a Turecrpt 256bit-27 digit password protected file saved on my Dropbox account.

Assuming the back up is resent can I just download bitcoin onto another computer and replace the wallet.dat file and I"m good?

Close.

2 things you need to remember:

- Your wallet.dat get's updated every time you create a new address.  Make sure you backup the latest version, so you have all latest keys.  But if you have a backup from one day old: don't worry, bitcoin pre-creates keys so your backups are still valid for some times

- You will need to start bitcoin with the rescan option so it will "find" the money again when you're using a different wallet.


Title: Re: So can i just Swap out wallet.dat files?
Post by: Quantus on July 16, 2011, 05:42:58 PM
I don't see that option :(


Title: Re: So can i just Swap out wallet.dat files?
Post by: Yuusha on July 16, 2011, 05:44:06 PM
Create a shortcut to bitcoin.exe, right click, properties, add -rescan to the target.


Title: Re: So can i just Swap out wallet.dat files?
Post by: Quantus on July 16, 2011, 05:47:03 PM
like this?
C:\Program Files (x86)\Bitcoin\bitcoin.exe -rescan
space or no space?


Title: Re: So can i just Swap out wallet.dat files?
Post by: Yuusha on July 16, 2011, 05:49:44 PM
Yeah, that's right. That should work just fine.


Title: Re: So can i just Swap out wallet.dat files?
Post by: Smalleyster on July 16, 2011, 05:52:36 PM
Create a shortcut to bitcoin.exe, right click, properties, add -rescan to the target.

"Create a shortcut to xxx.exe"

How does one do this in Linux?

TIA


Title: Re: So can i just Swap out wallet.dat files?
Post by: Yuusha on July 16, 2011, 05:53:49 PM
Create a shortcut to bitcoin.exe, right click, properties, add -rescan to the target.

"Create a shortcut to xxx.exe"

How does one do this in Linux?

TIA
Run the Bitcoin client the way you usually do, but add -rescan to the end of the command. I think.


Title: Re: So can i just Swap out wallet.dat files?
Post by: kinlo on July 16, 2011, 05:54:26 PM
if you're on linux, just open your terminal and type bitcoin -rescan to start the application.

Do note that you only have to do this once after changing wallet.dat, no need to start it this way every time.

Doing a rescan will re-process all blocks, so it does take quite some time....


Title: Re: So can i just Swap out wallet.dat files?
Post by: Dargo on July 16, 2011, 06:02:00 PM
My understanding is that you only need to backup your wallet.dat file after you make payments out from the public key (100 payments assuming you have 100 private keys initially when your public key is generated). But you can receive as many payments as you like to your public key without any need update wallet.dat. Is this correct, or am I confused?


Title: Re: So can i just Swap out wallet.dat files?
Post by: JoelKatz on July 16, 2011, 06:07:24 PM
My understanding is that you only need to backup your wallet.dat file after you make payments out from the public key (100 payments assuming you have 100 private keys initially when your public key is generated). But you can receive as many payments as you like to your public key without any need update wallet.dat. Is this correct, or am I confused?
Yes, that's correct. Nothing really happens when you receive a payment, your client just notices the payment in the block chain and updates the displayed total.


Title: Re: So can i just Swap out wallet.dat files?
Post by: Smalleyster on July 16, 2011, 06:13:08 PM
if you're on linux, just open your terminal and type bitcoin -rescan to start the application.

Do note that you only have to do this once after changing wallet.dat, no need to start it this way every time.

Doing a rescan will re-process all blocks, so it does take quite some time....

I don't want to open a terminal or type.

I am looking for a way to have an icon on the desktop that I can just click.

That is easy in windows, but I have not yet found a way in Linux.


Title: Re: So can i just Swap out wallet.dat files?
Post by: kinlo on July 16, 2011, 06:17:45 PM
My understanding is that you only need to backup your wallet.dat file after you make payments out from the public key (100 payments assuming you have 100 private keys initially when your public key is generated). But you can receive as many payments as you like to your public key without any need update wallet.dat. Is this correct, or am I confused?

Well, you need to backup your wallet.dat when you start using new private keys.

Every wallet.dat has 100 bitcoin addresses in them.  Every bitcoin adres has one private key, one public key, and one address.  Everytime you use a new adres, it takes one out of a pool of pre-made addresses, and adds a new address in the pool.  So a backup of yesterday still contains all adresses which I use today if I stay under the 100 already pre-allocated.   Basicly backup your wallet.dat regularly, but don't worry if it is a bit too old.

Bitcoin addresses are created and used in 4 cases:

- When you go to your address book and you create a new address for receiving bitcoins.
- When you are receiving bitcoins on the selected address, the gui just creates a new address so you don't have to click the new address button
- When sending bitcoins (*) for internal reasons
- When mining a new block (but unless you're running a pool, chances of mining a new block are slim to zero) (*)

(*) = These addresses ARE generated and are stored in your wallet.dat, BUT YOU DO NOT SEE THEM, not even in the address book!


Title: Re: So can i just Swap out wallet.dat files?
Post by: kinlo on July 16, 2011, 06:19:12 PM
if you're on linux, just open your terminal and type bitcoin -rescan to start the application.

Do note that you only have to do this once after changing wallet.dat, no need to start it this way every time.

Doing a rescan will re-process all blocks, so it does take quite some time....

I don't want to open a terminal or type.

I am looking for a way to have an icon on the desktop that I can just click.

That is easy in windows, but I have not yet found a way in Linux.


You don't want a icon on your desktop.  Re-scanning your wallet is a very  resource consuming action and has no benefits at all, UNLESS you've just replaced your wallet.dat.  You do NOT want to accidentally start your bitcoin client in rescan mode...


Title: Re: So can i just Swap out wallet.dat files?
Post by: Smalleyster on July 16, 2011, 06:43:02 PM
if you're on linux, just open your terminal and type bitcoin -rescan to start the application.

Do note that you only have to do this once after changing wallet.dat, no need to start it this way every time.

Doing a rescan will re-process all blocks, so it does take quite some time....

I don't want to open a terminal or type.

I am looking for a way to have an icon on the desktop that I can just click.

That is easy in windows, but I have not yet found a way in Linux.


You don't want a icon on your desktop.  Re-scanning your wallet is a very  resource consuming action and has no benefits at all, UNLESS you've just replaced your wallet.dat.  You do NOT want to accidentally start your bitcoin client in rescan mode...

Yes I do, and I *fully* understand the implications.

Than you


Title: Re: So can i just Swap out wallet.dat files?
Post by: Yuusha on July 16, 2011, 06:47:32 PM
Yes I do, and I *fully* understand the implications.

Than you
Create a file, name it bitcoin.sh (or *anything*.sh), open it in a text editor, type in:

Code:
bitcoin -rescan

Save the file, place it wherever you want, run it.


Title: Re: So can i just Swap out wallet.dat files?
Post by: The00Dustin on July 16, 2011, 06:49:34 PM
Create a shortcut to bitcoin.exe, right click, properties, add -rescan to the target.

"Create a shortcut to xxx.exe"

How does one do this in Linux?

TIA
What distro?  What desktop manager?  I probably won't be able to help you from those answers, but it should make it more possible for someone to (or for you to figure it out by searching, or maybe asking at linuxquestions.org).  I had a Fedora 8 box with Gnome and had 4 shortcuts on the desktop to use realvnc to connect to various machines.  These shortcuts certainly had multiple parameters, so it is possible, and probably simple, I just don't remember how because it was a long time ago.


OR do what Yuusha said.  You might have to chmod +x it first, though.


Title: Re: So can i just Swap out wallet.dat files?
Post by: Yuusha on July 16, 2011, 06:59:10 PM
OR do what Yuusha said.  You might have to chmod +x it first, though.
Yeah, forgot that. Right clicking and then going to permissions and making the file executable should be enough, though, if your OS supports this. Ubuntu does, for example.


Title: Re: So can i just Swap out wallet.dat files?
Post by: Smalleyster on July 16, 2011, 10:04:48 PM
Thanks guys!

The *.sh and chmod were the essentials I had completely forgotten.

Was a DOS guy with a smattering of Unix, but that was well into last century. 8^)