I want to backup my accounts onto a USB or other external device for safe-keeping. How can I do that?
2 Answers
To backup your wallet you will need to make a copy of the key file(s) located in your ethereum directory.
- Linux:
~/.ethereum/keystore
- Mac:
~/Library/Ethereum/keystore
- Windows:
%APPDATA%/Ethereum
The file should look something like this:
UTC--2015-09-18T14-07-57.023663538Z--da78c8721e4ede42cf488304551eb596dd5f93e23
I've suggested just saving the keystore contents, but you can of course backup the entire /ethereum directory; note, however, that this includes the chaindata files, and that's over 115 Gb, as of July 2018.
To import saved wallet files, simply copy them into the keystore directory of your system. Presale versions will end in the *.json
extension, but they will be recognized by the ethereum client.
-
7Don't forget that the keystore files are still protected by a password.– linageeCommented Jan 20, 2016 at 20:30
-
1To clarify, is it is the combination of your key file, and your knowledge of your password that constitutes your wallet. I just want to be absolutely certain before transferring Ether off exchange. That is to say with my key file and password, I could install Geth on a new computer, transfer my key file on a USB stick, and have access to my 'account'/Ether? Commented Feb 3, 2016 at 17:40
-
2Yes for each key file, you need the password for it. Before deleting any key files, one should test the recovery process using small amounts of Ether.– eth ♦Commented Feb 5, 2016 at 23:42
-
2So the only thing I need to save for a full backup of my wallets are the files in ~/.ethereum/keystore - is that correct? Commented Apr 1, 2016 at 3:15
-
2answer is not correct, on Mac the keystore is under
~/Library/Ethereum/keystore
– AdvancedCommented Feb 14, 2017 at 18:23
PLEASE MAKE SURE TO ALSO BACKUP YOUR PASSWORDS
Each key file (as described in @Ethan's answer) is encrypted and only usable with the correct password.
Another safety tip: Before deleting any key files, after you have done the backup, please try the import/restore process on another system to make sure you can send a small amount of Ether. (To import, copy the backed up files to the keystore of the other system.) When you can spend that small amount of Ether, that will give you more confidence that your backup actually works.
-
-
3@alper When you actually try to send Ether, that is when Geth will ask for the password (to unlock the account). That is why I suggest that step. If you are able to send Ether, the password is correct.– eth ♦Commented Jun 15, 2016 at 19:03
-
If I understand correctly, you don't really "back-up" the password - in the sense of copying a password file to another system. You just need to remember it so, when asked by geth in the new system, it can unlock the wallet, right? You more like "write it down", is that right?– AndycCommented Aug 2, 2021 at 19:08
-
@Andyc That's right. (Write down the passwords and don't lose them.)– eth ♦Commented Aug 6, 2021 at 5:12