Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Garrett Burgwardt on June 19, 2011, 02:40:28 AM



Title: Bitcoin Wallet Backup 101 - A Guide by The Bitcoin Sun
Post by: Garrett Burgwardt on June 19, 2011, 02:40:28 AM
http://thebitcoinsun.com/post/2011/06/18/Bitcoin-Wallet-Backup-101

A simple, easy to follow guide for those of you looking to backup your coins.

Check out our other articles while you're there, and look forward to our next issue, mostly dealing with security (or lack thereof!) in the bitcoin community, coming out soon!


Title: Re: Bitcoin Wallet Backup 101 - A Guide by The Bitcoin Sun
Post by: alexanderanon on June 19, 2011, 05:42:08 AM
Great guide. One question, however. When I make the 7zip encrypted wallet.dat, I have the 7zip wallet.dat AND the old wallet.dat in my bitcoin folder now. Say I copy the 7zip wallet.dat to a USB drive, as the guide suggests. Should I delete the old wallet.dat?



Title: Re: Bitcoin Wallet Backup 101 - A Guide by The Bitcoin Sun
Post by: Garrett Burgwardt on June 19, 2011, 06:06:28 AM
Only delete the wallet.dat if you don't want to use that wallet currently - so for a savings wallet/maximum security, yes you will want to delete that.


Title: Re: Bitcoin Wallet Backup 101 - A Guide by The Bitcoin Sun
Post by: allinvain on June 19, 2011, 08:14:32 AM
Just curious, would you still recommend 7-zip even for linux or is GNU PGP a better choice?


Title: Re: Bitcoin Wallet Backup 101 - A Guide by The Bitcoin Sun
Post by: alexanderanon on June 19, 2011, 09:26:09 AM
Fuck. I almost deleted my wallet. I'm afraid to do anything further because I might REALLY delete it. (Win7 btw)

So I 7zipped it, and deleted the remaining wallet.dat outside the archive. Then, I wanted to do a trial run of extracting it, so I did, but for some reason it made a folder called "wallet" within my bitcoin folder, and put the wallet.dat there, so I was left with a wallet.dat inside a "wallet" folder and my wallet.7z within the broader bitcoin folder. I started up the bitcoin client, expecting it to read the wallet.dat within the folder....but it didn't. I found a newly created wallet.dat OUTSIDE the "wallet" folder. So at this point I had: this newly created wallet.dat in the bitcoin folder, wallet.7z in bitcoin folder, and the wallet.dat extracted from the wallet.7z in its own "wallet" folder...AND zero bitcoins. So what I guessed was that bitcoin client wasn't reading the wallet.dat in the "wallet" folder that 7zip created, but instead this new wallet.dat that it itself had created. I went ahead and deleted this newly created one, copied the wallet.dat from the "wallet" folder and put it into the broader bitcoin folder, and then started the bitcoin client up again. My bitcoins had returned.

So now I have a wallet.dat in this "wallet folder", its usable copy in the broader bitcoin folder, and wallet.7z right next to the usable copy in the bitcoin folder. I'm assuming that the two wallets inside and outside of the "wallet" folder are identical because I just copied the inside one to make the outside one, but I'm not certain enough to go ahead and delete the whole "wallet" folder and clear this whole mess up.

Perhaps this is another part of my confusion. If I 7zip a wallet.dat that has 30 bitcoins, leaving the old wallet.dat, and then I go open up bitcoin client and spend half of my coins, how would this be reflected in the wallet.7z? Couldn't I just delete the wallet.dat that now only has 15 bitcoins, and extract the old one that still has 30? Or is this problem solved by the whole "double counting solution" that I've seen tossed around so often around these here forums....?


Title: Re: Bitcoin Wallet Backup 101 - A Guide by The Bitcoin Sun
Post by: FreeMoney on June 19, 2011, 09:37:41 AM
alex, bitcoin makes a new empty wallet if there is not a wallet.dat in exactly the right place.

Double spending is not possible. The network knows how many coins are associated with each address. What you have in a wallet is a set of keys that can be used to move coins from those addresses. If you load the same wallet on two computers (this is not recommended) they both have access to the coins, but only the first spend will work. A restored backup might think it has access to coins that it doesn't in some circumstances, but it never actually will.