Author

Topic: Why doesn´t the wallet.dat backup work? How to get the walet.dat to work? (Read 302 times)

newbie
Activity: 8
Merit: 0
Ok so I finally got the solution. I had replaced the wallet.dat file in the Bitcoin Core folder on the E:\ drive. But actually it was neccessary to put it on the E:\ drive itself. That made the difference.
The datadir hint helped me there.

So thank you all for your effort and help
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
After copying the old wallet.dat into your data directory (See HCP's post; above this one), make sure to run core with the -reindex command.
The easiest way would be to run core from the command line:

In Windows:

  • Press WIN-key + R
  • Into the Run-command type: cmd
  • Navigate to your core folder (where your .exe is; not the datadir) with cd "PATH_TO_CORE"
  • Run core witht he startup flag: bitcoind.exe -reindex (replace 'bitcoind.exe' with the name of your executable if different)

Use Bitcoin-QT.exe op instead of bitcoind.exe! I don't think bitcoind will run unless you've configured it properly (I haven't either).
Then it is using the root directory of your E: drive as the data directory...

If you look at your E: drive in windows explorer, you should see the following folders:
- blocks
- chainstate
- database

You should also see a number of files like:
- mempool.dat
- peers.dat
- wallet.dat

So, you need to put your old wallet.dat in this location... or change the datadir location to where you want it to be by specifying it when you launch Bitcoin Core using the -datadir commandline argument.

NOTE: If you change the datadir location, you need to copy/move the blocks/chainstate/database folders or Bitcoin Core will resync from the beginning!
It's worth noting that if you actually wanted it in the root of E drive then you've done everything right op. Otherwise, follow HCPs instructions above.
legendary
Activity: 1624
Merit: 2481
After copying the old wallet.dat into your data directory (See HCP's post; above this one), make sure to run core with the -reindex command.
The easiest way would be to run core from the command line:

In Windows:

  • Press WIN-key + R
  • Into the Run-command type: cmd
  • Navigate to your core folder (where your .exe is; not the datadir) with cd "PATH_TO_CORE"
  • Run core witht he startup flag: bitcoind.exe -reindex (replace 'bitcoind.exe' with the name of your executable if different)
HCP
legendary
Activity: 2086
Merit: 4361
Then it is using the root directory of your E: drive as the data directory...

If you look at your E: drive in windows explorer, you should see the following folders:
- blocks
- chainstate
- database

You should also see a number of files like:
- mempool.dat
- peers.dat
- wallet.dat

So, you need to put your old wallet.dat in this location... or change the datadir location to where you want it to be by specifying it when you launch Bitcoin Core using the -datadir commandline argument.

NOTE: If you change the datadir location, you need to copy/move the blocks/chainstate/database folders or Bitcoin Core will resync from the beginning!
newbie
Activity: 8
Merit: 0
It says E:\ as the Datadir as you can see in the screenshot. However E is the drive but only and not the folder

https://drive.google.com/open?id=1xGhu68c6zBp68oUH5Elt7Ec8dxDaYZ5U
HCP
legendary
Activity: 2086
Merit: 4361
That depends on whether or not Bitcoin Core is looking in the right place...

If you start Bitcoin Core and look in "Help -> Debug Window -> Information", what is the value of Datadir?


This is the directory where Bitcoin Core will be looking for your wallet.dat unless you explicitly tell it otherwise. If you did not put your wallet.dat in that directory, then Bitcoin Core will not be reading the correct wallet.dat.
newbie
Activity: 8
Merit: 0
Thank you all so far. I think I should mention that I don´t have the Bitcoin Core Folder in the AppData/roaming section. I did not install on the C drive because I don´t have space there for the 170 gb of the blockchain. So the wallet.dat was created in the BT Core folder on the drive I installed it on. Does that matter?
legendary
Activity: 3472
Merit: 4801
Common issues in Windows...


The file was accidentally renamed to something like:
  • wallet
  • wallet.txt
  • wallet.txt.dat
  • wallet.dat.txt
  • wallet.wallet.dat

(Or some other variation) and Windows is hiding this invalid name from you.

You may need to use a command line in Windows and look at a directory listing to make sure that the file is actually named correctly.  Bitcoin Core will look for the exact filename: wallet.dat

The wallet.dat is placed in the wrong folder for your version of Windows.  Double check to make sure that you know what folder it should be in, and that you actually put the new file in that folder.

One way to be certain that you are looking at the correct folder is to:
  • Shut down Bitcoin Core
  • Remove all copies of wallet.dat from the folder that you think is the correct folder
  • Start up Bitcoin Core
  • If Bitcoin Core can not find a wallet.dat in the expected folder it will create a NEW wallet.dat
  • Shut down Bitcoin Core
  • Look in the folder where you previously removed all wallet.dat files.  There should now be EXACTLY 1 wallet.dat file.  If there is not, then you are probably looking in the wrong folder.

You are accidentally restoring the wrong wallet.dat.
It might be possible that you accidentally put the litecoin wallet.dat file in the folder for Bitcoin Core, or it might be possible that you are accidentally trying to restore a VERY old backup and that you need a newer backup, or it might be possible that you confused your backup wallet.dat with a new wallet.dat.

Double check that you are using your most recent wallet.dat backup file from Bitcoin Core.  If you still have access to the original wallet, and that original wallet still shows the correct balance, then try calculating a checksum on that original wallet and on the backup you are trying to restore.  Make sure the checksums are identical.
HCP
legendary
Activity: 2086
Merit: 4361
I basically build a new computer and now reinstalled Bitcoin Core and Litecoin Core. Before that I had made backups quite frequently. Now that I wanted the coins on my wallet I replaced the existing wallet.dat file with the backup wallet.dat file. But There is no balance shown. Neither on Bitcoin Core nor Litecoin Core.
I typed rescan in the console but it didn´t change anything. And since I have limited technical knowledge of Bitcoin Core I don´t know how to get my coins "back".
Just to clarify... you kept TWO separate backup copies of wallet.dat right? One wallet.dat for Bitcoin Core and one wallet.dat for Litecoin Core?

Just want to make sure you haven't accidentally overwritten the BTC with LTC (or LTC with BTC) Wink


I use Windows 10 64 Home
If you're on Windows 10, your Bitcoin Data directory will by default be: C:\Users\YOURUSERNAME\AppData\Roaming\Bitcoin

This is the location your old BTC wallet.dat needs to be placed. So, after you have closed Bitcoin Core and then replaced the wallet.dat in the data directory with a copy of your old wallet.dat, you should start Bitcoin Core using the "-reindex" option.

Use "Windows+R" or "Start -> Run" and then enter:
Code:
C:\Program Files\Bitcoin\bitcoin-qt.exe -reindex

That should force Bitcoin Core to reindex using the new wallet.dat and the addresses it contains.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
I use Windows 10 64 Home
Yes the backup wallet.dat file was a different size.

Thanks so far

Rename the wallet file in the bitcoin core directory to wallet.dat.bak (or wallet.bak if the extension can't be changed).

Then copy the backup file into the bitcoin data directory where you've just renamed the old wallet file and see if your initial address appears in the addresses window.
newbie
Activity: 8
Merit: 0
 I use Windows 10 64 Home
Yes the backup wallet.dat file was a different size.

Thanks so far
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
I did start Bitcoin Core first and let it download the blockchain. Then I closed it, replaced the wallet.dat file and started it again.
@jackg when typing reindex it says method not found

I don't think you can do it from the debug window.

If you know how to run stuff from the console, run bitcoin core as the app as you would normally and, on the same line, follow with "--reindex".

If you don't know how to use the console, can you post the operating system version you are running?

The import might have gone wrong if there aren't any addresses listed, I'd try reindexing first just to see if there is an issue. Check you have put the right file there (the two should be different sizes, check the size of the backup file is the same size as the file in the data directory).
newbie
Activity: 8
Merit: 0
I did start Bitcoin Core first and let it download the blockchain. Then I closed it, replaced the wallet.dat file and started it again.
@jackg when typing reindex it says method not found
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
There are no addresses, neither receive and send addresses shown.
Just to be sure, you restarted Core when you've changed the wallet.dat right?

Are you sure that you've replaced the file with the correct wallet.dat? Bitcoin Core should automatically rescan the wallet file when you've replaced and restarted the client. Did you mix both of them up by any chance?
newbie
Activity: 8
Merit: 0
There are no addresses, neither receive and send addresses shown.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Well I set a passphrase for the wallet. But I was never asked to type in a password after replacing the wallet.dat.
I waited for Bitcoin Core to fully download the blockchain. Then I replaced the .dat file.

Thank you for your answer so far


I think you might need to run -reindex from the conosle.
Normally if it reindexes once and it's without the wallet, it needs to go back through the blockchain (not sure rescan does it fully).
newbie
Activity: 8
Merit: 0
Well I set a passphrase for the wallet. But I was never asked to type in a password after replacing the wallet.dat.
I waited for Bitcoin Core to fully download the blockchain. Then I replaced the .dat file.

Thank you for your answer so far
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Did you wait for them to fully syncronise? That's normally the problem with replacing from a backup. It might take a while also to get them back to the point where they're fully syncronised.

Beyond that, check the entire wallet file isn't encrypted or something and see if you can chekc your addresses.
You can check your first address before the core syncronises and you might be able to check more.
newbie
Activity: 8
Merit: 0
Hello there

I basically build a new computer and now reinstalled Bitcoin Core and Litecoin Core. Before that I had made backups quite frequently. Now that I wanted the coins on my wallet I replaced the existing wallet.dat file with the backup wallet.dat file. But There is no balance shown. Neither on Bitcoin Core nor Litecoin Core.
I typed rescan in the console but it didn´t change anything. And since I have limited technical knowledge of Bitcoin Core I don´t know how to get my coins "back".

Best regards and thanks
Jump to: