Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Cablesaurus on February 08, 2011, 05:42:22 PM



Title: Crap, I reformatted, did I lose my BTC?
Post by: Cablesaurus on February 08, 2011, 05:42:22 PM
I reformatted... I backed up my bitcoin directory... but when I restored it on the fresh OS my wallet was not intact...

I forgot to backup the appsettings/roaming/bitcoin directory.

I made a note of my wallet hash ID prior. Am I screwed?


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: grondilu on February 08, 2011, 05:48:24 PM
Switch this computer off right now (hard switch off: you want to avoid any writting on the disk) and use an other computer to search for "recover formated data" on the web.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: Gavin Andresen on February 08, 2011, 06:23:52 PM
I reformatted... I backed up my bitcoin directory... but when I restored it on the fresh OS my wallet was not intact...

Are you missing your wallet.dat file or is it damaged?

If it is missing, then grondilu's advice is the best anybody can do.
If it is damaged, then it might be possible to extract the private keys from it.

This type of thing is why off-site backups are a really good idea...


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: fabianhjr on February 08, 2011, 07:56:02 PM
Search for recuva or a forensics distro. Booting from a CD or with other computer do a "quick" recovery and search for wallet.dat If it does not appear do a "deep" recovery, -which basically reads bit by bit your hard drive and scans for files such as plaintext, avi, etc-, and search for it. If it is damaged there is still a chance you can recover the keys else you are out of luck.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: LZ on February 08, 2011, 08:03:30 PM
Use something like Dropbox (http://bitcointalk.org/index.php?topic=1359.msg15466#msg15466) next time. :-\


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: theymos on February 08, 2011, 08:30:47 PM
GetDataBack has a good reputation for recovering data from formatted drives. You must run it on some other computer with the target drive attached. You should never attempt recovery by running an OS on the target drive.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: adv on February 09, 2011, 12:18:36 AM
If it is damaged, then it might be possible to extract the private keys from it.
Exist some ready-made tools for this?


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: Stephen Gornick on February 09, 2011, 01:14:52 AM
Use something like Dropbox (http://bitcointalk.org/index.php?topic=1359.msg15466#msg15466) next time. :-\
That might just exchange one risk (risk of loss) for another (risk of theft).  If you synch dropbox between your desktop and your laptop or other device, backing up your wallet to dropbox actually might also mean you are propogating your wallet onto your laptop.
  Here's more on safe backup as well: http://bitcointalk.org/index.php?topic=1679.msg29488#msg29488


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: eMansipater on February 09, 2011, 02:24:46 AM
I am training people to use a TrueCrypt (http://www.truecrypt.org/) file backed up in DropBox (http://db.tt/NXE7TIX) to combine both loss protection and theft protection in a fairly easy to use package.  Still leaves the risk of theft from the running client, but there's not really any way around that unless someone develops an integrated TrueCrypt/Bitcoin client that only prompts for Truecrypt password when you need to transfer money out.  Which would be a pretty sweet deal for mining since you can deposit mined coins in without needing the wallet.dat to be decrypted with the password, so you could securely leave headless machines lying around.  As gruesome as that sounds.

sincerely,
eMansipater

Full disclosure: DropBox link (http://db.tt/NXE7TIX) is a referral link.  It gives both me and any new users extra free space when they sign up.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: BitterTea on February 09, 2011, 04:10:02 AM
You could also use something like GPG for encrypting the file. I use that + Dropbox + a helper application I'm working on that manages encryption, decryption, and backup.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: Luke-Jr on February 09, 2011, 04:40:29 AM
If it was a lot, and this all seems like a lot of work, you might offer a bounty for someone to do it for you. Be sure you trust them.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: Cablesaurus on February 09, 2011, 07:52:36 AM
I'm not complaining from a personal standpoint, it was my stupidity, and while I lost 95btc, many could have lost a lot more. I guess that's my point, if Bitcoin is to survive as a real userfriendly service..... online backup is going to have to be at the top of the list.

You can't have some vendor who knows little about Bitcoin but graciously starts to accept it, and then loses his earnings in a mere system crash.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: grondilu on February 09, 2011, 04:23:28 PM
I'm not complaining from a personal standpoint, it was my stupidity, and while I lost 95btc, many could have lost a lot more. I guess that's my point, if Bitcoin is to survive as a real userfriendly service..... online backup is going to have to be at the top of the list.

You can't have some vendor who knows little about Bitcoin but graciously starts to accept it, and then loses his earnings in a mere system crash.

I don't know what more we could do.  I think the bitcoin community makes it quite clear that you have to make backups of your wallet.  Maybe we could had some reminders in the GUI, but I think it's best to assume the user is responsible from what he does or does not.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: casascius on February 09, 2011, 06:11:27 PM
Perhaps you can initiate a sector-by-sector search of your hard drive for strings that would occur in wallet.dat.  You could use a utility like WinHex for this.  (use Tools - Open Disk - choose the physical disk by disk NUMBER, not by disk LETTER)

As others have said, you should not be BOOTING from this disk, otherwise, doing so rapidly lessens the likelihood of recovery as more sectors are overwritten.

Even if you cannot recover the entire file, if just the private keys themselves can be hand-recovered, you may get back your BTC.  The private keys themselves are only a few dozen bytes and can probably be found in the same sector, or adjacent sectors, to the readable Bitcoin address.

Do you know any of your Bitcoin sending or receiving addresses?  Those appear in the wallet file as strings you could search for.

If I search my wallet.dat, in addition to the addresses, I also find the strings "blockindex" (repeatedly), "defaultkey", and "addrIncoming".  Of course, these strings will probably also occur in the client, so ignore hits that contain lots of other Bitcoin programming-related text.

if you could find disk sectors containing these strings, having a trusted person inspect them plus all the surrounding sectors could probably yield the coins.


Title: Re: Crap, I reformatted, did I lose my BTC?
Post by: ribuck on February 09, 2011, 07:14:02 PM
Do you know any of your Bitcoin sending or receiving addresses?

If you don't know any of your addresses, you could search for all the addresses in the block chain.