Bitcoin wallet dat
If you have a backup of your Bitcoin wallet and need to restore it in Bitcoin-Qt, here is how to do it in Ubuntu.
First, if you have bitcoin stored in your wallet now, move them somewhere else. This process will overwrite your current wallet and you will lose those bitcoins.
Also, close the bitcoin client completely. I don’t know if it is bad to do this with bitcoin running, but we will have to restart it anyway when we are done, so just turn it off.
When you are ready, go to the bitcoin data directory using:
cd ~/.bitcoin
You should see a file called wallet.dat. Just to be extra careful, I backup this file using:
cp wallet.dat wallet.dat.bak
When I saved my backup, I renamed it to “bitcoin-qt-wallet”, but the wallet file you want to restore should be called wallet.dat, so rename to that if you have to. Now just copy it into the ~/.bitcoin directory. I do this all in one command using:
cp bitcoin-qt-wallet ~/.bitcoin/wallet.dat