How to Backup Your Ethereum Wallet and the Blockchain

17Aug 2015

Just like with Bitcoin’s wallet.dat file that contains your wallet address and keys and that you need to backup for safety reasons, Ethereum also has a similar wallet file that you should have a spare copy of. With Ethereum the wallet file has a bit weird name and is not just called wallet.dat, but it has essentially the same purpose and the file works essentially the same way as the wallet.dat with Bitcoin and many other alternative crypto coins. Ethereum’s wallet file is stored in the data directory used by the client to store the blockchain and other files, the default locations for the datadir on different operating systems are listed below.

To get the full path of the data directory on your specific system you can run the geth console and type admin.datadir and you will see a result like on the screenshot above with the full path. Note that the wallet file is not stored in the main datadir folder, but is instead placed in a separate folder under it called keystore. Inside that folder you should see a file with a long name starting with UTC--2015..., this is the wallet file you need to backup. Do note that aside from the wallet file itself you will also need to remember the password (or also back it up along the wallet) that you set when creating your account, without the password needed to unlock it the wallet file won’t be of much use.

If you are moving your Ethereum installation over to a different computer or want to have a copy on another system for solo mining for example, aside from a copy of the wallet file you may also want to make a copy of the blockchain, so that the geth client will not need to download the whole thing again from the network. For the moment the Ethereum blockchain is not that big, but as it continues to grow it can become a very time consuming task to wait for the blockchain to download over the network like it already is with bitcoin for example. So here is how you can also export and then import the Ethereum blockchain should you need to do so.

Export and Import the Ethereum Blockchain:
– Run: geth export blockchain_backup
– Copy the blockchain_backup file to the new system (a bit over 60 MB for the moment)
– On the new system run: geth import blockchain_backup

You can also export and import the blockchain data from a geth console mode, however it seems that when ran inside the console it is doing it much slower than the above method. The commands for the Javascript console are admin.exportChain('blockchain_backup') and admin.importChain('blockchain_backup'), so you can try with them as well, but the first example should be faster.

This is a blog for crypto currency miners and users of Bitcoin (BTC), Litecoin (LTC), Ethereum (ETH), ZCash (ZEC) and many others.
If you find helpful and useful information you can support us by donating altcoins or Bitcoin (BTC) to: 1AxbMZwtcmCByrHiaWwhse5r6ea1YgBwk1
ETH: 0x8d785ff337046444d8afbac169bcb7c0adfb3266 - LTC: LPYFPK7dL1uEtwrAteLmxs7w8Je446gAAJ - ZEC: t1gg5rWxeMBMsyDRMrq5PJdFLiWQ86LGggi