<p><code>-salvagewallet</code> will extract only the private keys from your wallet. When it does that, it may also end up corrupting your wallet if it was not already corrupted. <code>-salvagewallet</code> should only be used as a last resort.</p>

<p>Because only the private keys are pulled out, all transaction and comment information is lost. That means that you will lose all of your labels and your wallet balance. You will need to rescan the blockchain be starting Bitcoin Core with <code>-rescan</code>.</p>

CC BY-SA 3.0
2018-01-12T01:26:52.773Z
Thanks for the response. I did try to rescan. It  rescanned very fast, and still no balance. When I try to add the backup wallet file that I had made earlier, it always makes a new wallet file, as if there is no file there.
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T01:30:34.683Z
When you use a backup, you must name it `wallet.dat` otherwise Bitcoin Core won't know it is there. Rescanning should take a very long time unless you are not fully synced.
Ava Chow
CC BY-SA 3.0
2018-01-12T01:33:43.247Z
Yes, I did name it wallet.dat , it says that it is fully synced. Still no balance. When I used salvagwallet, it also made a wallet bak file. When I try to run with that file, even when renamed, it just makes a new wallet, again.
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T01:37:33.630Z
Is the backup from before or after you used salvagewallet? What makes you think that it makes a new wallet file?
Ava Chow
CC BY-SA 3.0
2018-01-12T01:39:16.353Z
Yes, I have tried the backup that I made before I used salvagewallet. I can see in the bitcoin folder that it is making a new wallet each time. It also has a new receiving address.
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T01:43:37.130Z
If it is making a new wallet every time and you can see that file, then you are not naming your wallet file correctly. The underlying file system does not allow for two files to share the same name (which includes the extension).
Ava Chow
CC BY-SA 3.0
2018-01-12T01:45:32.920Z
it seems to be naming the new wallet "wallet" without the .dat,
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T01:51:12.127Z
This is in the debug file: 

Renamed wallet.dat to wallet.dat.1515627016.bak
2018-01-10 23:30:16 Salvage(aggressive) found 5256 records
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T01:53:08.693Z
No, it's just that your file explorer is not showing the extension, which is default behavior on windows. In Windows, click "View" and then click "File name extensions" to see the full file names. What you should then see is the new wallet is wallet.dat and your backup is wallet.dat.dat.
Ava Chow
CC BY-SA 3.0
2018-01-12T02:05:12.203Z
Thank you very much. That did it. This is an old wallet file, from one of the first versions of bitcoin core. I don`t remember having any coins on it back then, but wanted to make sure that there were no private keys that were not showing up on the new program, which is why I ran salvage, I probably should have moved my known coins first. Anyway, how do I check for old private keys?
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T02:10:07.813Z
Is it normal for salvage to have found 5256 records?
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T02:10:53.927Z
You don't/can't. All private keys (old and new, whatever the distinction for that is) are loaded regardless and don't just "hide somewhere". `salvagewallet` will make things worse and make it _more_ likely that private keys don't appear as it is known to corrupt uncorrupted wallets.
Ava Chow
CC BY-SA 3.0
2018-01-12T02:18:36.507Z
So when I ran salvagewallet, it made a backup (bak) file and it also made a new wallet file. What is the new wallet file for? Is it just an empty new wallet, or did it try to import keys to the new wallet?
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T02:21:23.577Z
It is a new wallet file with only the private keys it was able to extract imported into that wallet. Note that those private keys are not necessarily actually your private keys (they could just be garbage data that looks like a private key) and that it may not actually find all of your private keys.
Ava Chow
CC BY-SA 3.0
2018-01-12T02:26:46.300Z
So, when I use the new wallet that was created, it shows zero balance. It this right?
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T02:38:16.077Z
Without a rescan, it will show zero balance as there is no transaction information known to the wallet.
Ava Chow
CC BY-SA 3.0
2018-01-12T02:55:02.213Z
Well, it`s odd. Even with a rescan and the sync up to date, it shows zero balance.
Chad Michael Libby
CC BY-SA 3.0
2018-01-12T01:19:53.940Z
2018-01-12T01:19:53.940Z
Ava Chow
<p>I used the salvage wallet command in bitcoin. Now the new and old wallet files both say zero balance. Can anybody help me understand what`s going on?</p>

<command-line-options>
Used salvagewalllet, now it shows zero balance
Chad Michael Libby
# Used salvagewalllet, now it shows zero balance

(Asked by: username_0 on 2018-01-12)

I used the salvage wallet command in bitcoin. Now the new and old wallet files both say zero balance. Can anybody help me understand what`s going on?

**Tags:** command-line-options


---

## 1 answers

### Answer by username_1 on 2018-01-12. Score: 1

`-salvagewallet` will extract only the private keys from your wallet. When it does that, it may also end up corrupting your wallet if it was not already corrupted. `-salvagewallet` should only be used as a last resort.

Because only the private keys are pulled out, all transaction and comment information is lost. That means that you will lose all of your labels and your wallet balance. You will need to rescan the blockchain be starting Bitcoin Core with `-rescan`.

> **Comments:**
> **username_0**: Thanks for the response. I did try to rescan. It  rescanned very fast, and still no balance. When I try to add the backup wallet file that I had made earlier, it always makes a new wallet file, as if there is no file there.  
> **username_1**: When you use a backup, you must name it `wallet.dat` otherwise Bitcoin Core won't know it is there. Rescanning should take a very long time unless you are not fully synced.  
> **username_0**: Yes, I did name it wallet.dat , it says that it is fully synced. Still no balance. When I used salvagwallet, it also made a wallet bak file. When I try to run with that file, even when renamed, it just makes a new wallet, again.  
> **username_1**: Is the backup from before or after you used salvagewallet? What makes you think that it makes a new wallet file?  
> **username_0**: Yes, I have tried the backup that I made before I used salvagewallet. I can see in the bitcoin folder that it is making a new wallet each time. It also has a new receiving address.  
> **username_1**: If it is making a new wallet every time and you can see that file, then you are not naming your wallet file correctly. The underlying file system does not allow for two files to share the same name (which includes the extension).  
> **username_0**: it seems to be naming the new wallet "wallet" without the .dat,  
> **username_0**: This is in the debug file:   Renamed wallet.dat to wallet.dat.1515627016.bak 2018-01-10 23:30:16 Salvage(aggressive) found 5256 records  
> **username_1**: No, it's just that your file explorer is not showing the extension, which is default behavior on windows. In Windows, click "View" and then click "File name extensions" to see the full file names. What you should then see is the new wallet is wallet.dat and your backup is wallet.dat.dat.  
> **username_0**: Thank you very much. That did it. This is an old wallet file, from one of the first versions of bitcoin core. I don`t remember having any coins on it back then, but wanted to make sure that there were no private keys that were not showing up on the new program, which is why I ran salvage, I probably should have moved my known coins first. Anyway, how do I check for old private keys?  
> **username_0**: Is it normal for salvage to have found 5256 records?  
> **username_1**: You don't/can't. All private keys (old and new, whatever the distinction for that is) are loaded regardless and don't just "hide somewhere". `salvagewallet` will make things worse and make it _more_ likely that private keys don't appear as it is known to corrupt uncorrupted wallets.  
> **username_0**: So when I ran salvagewallet, it made a backup (bak) file and it also made a new wallet file. What is the new wallet file for? Is it just an empty new wallet, or did it try to import keys to the new wallet?  
> **username_1**: It is a new wallet file with only the private keys it was able to extract imported into that wallet. Note that those private keys are not necessarily actually your private keys (they could just be garbage data that looks like a private key) and that it may not actually find all of your private keys.  
> **username_0**: So, when I use the new wallet that was created, it shows zero balance. It this right?  
> **username_1**: Without a rescan, it will show zero balance as there is no transaction information known to the wallet.  
> **username_0**: Well, it`s odd. Even with a rescan and the sync up to date, it shows zero balance.  

---

