Author

Topic: Bitcoin-QT restore backup (Read 12796 times)

legendary
Activity: 1358
Merit: 1002
March 13, 2013, 08:58:42 AM
#7
Put your corrupted wallet.dat inside the bitcoin data dir and try to access it with pywallet to at least get your private keys out of there.
https://github.com/jackjack-jj/pywallet

PS: Not sure if possible because of wallet corruption, but you have nothing to lose on trying it.
legendary
Activity: 1512
Merit: 1036
March 13, 2013, 08:50:23 AM
#6
Replying to PM here for the benefit of all:

Quote from: Yurkov
I've tried the -salvagewallet command but it didnt do anything other than close the client right after it started. Afterwards I looked for the String "keyA" which I could not find either. Is there anyway of recovering this wallet you think or should I just drop it?
(note: this wallet is about a year-ish old and I backed it up on a flash drive, a while later my laptops HD died and lost the 2 BTC but still had the wallet.dat which I forgot about. Accidentally I deleted it and a few days ago I undeleted it using a software to recover that. Maybe thats why its corrupt?)

Undeleting a file in a file system that has no such inherent feature will "restore" whatever is occupying the sectors and blocks on the hard drive that previously contained the data. If subsequent disk activity caused data writes, the disk space might have been overwritten, and what you recovered is not the original data.

If the only copy of the wallet was on a flash drive, and you deleted the copy that was on the flash drive, then you should have used specialized flash data recovery tools to get data off.

I just created a new v.8 wallet.dat, and found that upon generation it did not have the string keyA in it, although it obviously had at least 100 private keys in it by default. What it did have was a size of 80kB, and a bunch of the word "pool" in it ( 01 04 70 6F 6F 6C ), this looks to be a better test to discover whether the data is really some wallet data or random hard drive garbage.

The data around "pool" entries in the wallet might look like this:
Code:
000076d0h: D3 12 C1 08 0D 00 01 04 70 6F 6F 6C 07 00 00 00 ; Ó.Á.....pool....
000076e0h: 00 00 00 00 D7 00 01 D6 30 81 D3 02 01 01 04 20 ; ....×..Ö0�Ó....
000076f0h: 99 D9 7D 0B 46 E4 83 73 FA D8 32 A3 44 52 D5 60 ; ™Ù}.FäƒsúØ2£DRÕ`
00007700h: 4F 9C 30 9D 71 50 6A 16 DE 4E AA 97 11 AB 19 A3 ; Oœ0�qPj.ÞNª—.«.£
00007710h: A0 81 85 30 81 82 02 01 01 30 2C 06 07 2A 86 48 ;  �…0�‚...0,..*†H
00007720h: CE 3D 01 01 02 21 00 FF FF FF FF FF FF FF FF FF ; Î=...!.ÿÿÿÿÿÿÿÿÿ
00007730h: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ; ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00007740h: FF FF FE FF FF FC 2F 30 06 04 01 00 04 01 07 04 ; ÿÿþÿÿü/0........
00007750h: 21 02 79 BE 66 7E F9 DC BB AC 55 A0 62 95 CE 87 ; !.y¾f~ùÜ»¬U b•Î‡
00007760h: 0B 07 02 9B FC DB 2D CE 28 D9 59 F2 81 5B 16 F8 ; ...›üÛ-Î(ÙYò�[.ø
00007770h: 17 98 02 21 00 FF FF FF FF FF FF FF FF FF FF FF ; .˜.!.ÿÿÿÿÿÿÿÿÿÿÿ

If the flash stick is the only media that might contain the wallet/private keys, then I would recommend you follow the recovery options here to scan the whole storage device for keys:

https://bitcointalksearch.org/topic/guide-recover-your-deleted-keys-38004
legendary
Activity: 1512
Merit: 1036
March 12, 2013, 11:06:12 AM
#5
Thank you all for your help, but I just found out that my backup wallet.dat is somehow corrupt, and Bitcoin-QT cant read it Sad

If my above steps didn't work (where you get an error "corrupted wallet"?), these additional steps might get data out of the wallet (using Bitcoin 0.8.0):

-close Bitcoin, have your backup wallet.dat in the data directory.
-rename the "database" subdirectory in the data directory
-start bitcoin with this command: bitcoin-qt -salvagewallet

If there is still no joy, you should attempt to open the wallet.dat file with a hex editor and see if there are multiple instances of the string "keyA" in the file (the private key is right after this string); if there is no "keyA" then the data is not a recoverable wallet.

I can see if there is any hope of recovering the wallet.dat and send you the recovered Bitcoins if none of these work - contact me via PM for a secure method to send me the best copy of the backup wallet and I'll see what can be done.
sr. member
Activity: 1463
Merit: 265
Pepemo.vip
March 12, 2013, 10:02:55 AM
#4
Thank you all for your help, but I just found out that my backup wallet.dat is somehow corrupt, and Bitcoin-QT cant read it Sad
legendary
Activity: 1512
Merit: 1036
March 11, 2013, 07:06:07 PM
#3
You can send the bitcoins from the old wallet to yourself quite easily:

1. get a receiving address from your wallet (like in your signature)
2. shutdown Bitcoin
3. rename your current wallet to wallet.dat.newestwallet
4. copy the old wallet to the bitcoin data directory
5. start Bitcoin, and after there are some connections, send the balance to your address
6. leave Bitcoin running until you get a confirmation
7. shutdown bitcoin, rename wallet.dat to wallet.old-empty and put back your original wallet
8. Start Bitcoin and see your new balance
legendary
Activity: 2506
Merit: 1010
March 11, 2013, 05:15:57 PM
#2
So i recently got back into bitcoins again, and on my current wallet I have a small amount already. But now I found back my old bitcoin backup where I had 2 BTC sitting for me. Now i've been searching around on how to restore bitcoins and all but I wonder if I need a complete newly installed Bitcoin-QT client to back it up, or can I use my current one with some cents on it to restore my 2 BTC to that? And if so, how?

So you have two wallet.dat files, one that use currently and an older one that should have 2 BTC on it?

There's no "merge" method, unless you manually export the keys from one and import them into another.

The easy way to resolve this is to just import the backup wallet.dat into a new Blockchain.info/wallet and spend those funds to wherever you are running with the small amount today.
 - https://blockchain.info/wallet/import-wallet
sr. member
Activity: 1463
Merit: 265
Pepemo.vip
March 11, 2013, 11:19:33 AM
#1
So i recently got back into bitcoins again, and on my current wallet I have a small amount already. But now I found back my old bitcoin backup where I had 2 BTC sitting for me. Now i've been searching around on how to restore bitcoins and all but I wonder if I need a complete newly installed Bitcoin-QT client to back it up, or can I use my current one with some cents on it to restore my 2 BTC to that? And if so, how?
Jump to: