50

I want to backup my accounts onto a USB or other external device for safe-keeping. How can I do that?

q9f
  • 32,913
  • 47
  • 156
  • 395
Ethan Wilding
  • 4,821
  • 7
  • 24
  • 31

2 Answers2

48

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.

alfwatt
  • 103
  • 3
Ethan Wilding
  • 4,821
  • 7
  • 24
  • 31
  • 7
    Don't forget that the keystore files are still protected by a password. – linagee Jan 20 '16 at 20:30
  • 1
    To 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?

    – Thomas Clowes Feb 03 '16 at 17:40
  • 2
    Yes 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 Feb 05 '16 at 23:42
  • 2
    So the only thing I need to save for a full backup of my wallets are the files in ~/.ethereum/keystore - is that correct? – Paul Preibisch Apr 01 '16 at 03:15
  • And how do you restore this? – Alper Jun 15 '16 at 13:06
  • @alper: To import/restore, copy the backed up files to the keystore of your (other) system. – eth Jun 26 '16 at 22:24
  • @PaulPreibisch You also need a backup of each password for each file in ~/.ethereum/keystore – eth Jun 26 '16 at 22:27
  • 2
    answer is not correct, on Mac the keystore is under ~/Library/Ethereum/keystore – Advanced Feb 14 '17 at 18:23
  • On Windows it's %APPDATA%/Ethereum – Marco Marsala Mar 28 '17 at 05:33
  • Does the backup have to be made after each transaction or is it a one-off operation ? 2) Is the filename relevant or can it safely be thrown away ?
  • – Arnaud Meuret Feb 02 '18 at 15:05
  • The chaindata has reached 1 TB! I congratulate it! – Andyc Aug 07 '21 at 17:55