How to important /migrate .dat file to zec-qt wallet?


I’ve found through my backups a zec .dat file which I first created and used via ellios wallet for zec. However, I cannot find online a link to download the ellios wallet, or another zec wallet that will allow me to important my .dat file, given the zec-qt wallet only allows from what I’ve seen to important private keys over - Although the zec-qt wallet does allow you to create a backup of a .dat file, it doesn’t give you an option to import the .dat file?!

I’d be most grateful if someone would enlighten me on how to important or migrate my .dat file so I can retrieve my zec wallet.

Many thanks,

You can simply replace an existing wallet.dat file with this one and it should just work. You need zcashd to import a wallet.dat file but this comes bundled with zec-qt-wallet so that is the simplest solution. Assuming you have started the program the first time it is started it’ll create the data directory which contains the wallet.dat file. The location of this depends on your OS in Linux it’s ~/.zcash on MacOS look for ~/Library/Application Support/Zcash/ and Windows C:\Users\your-username\AppData\Roaming\Zcash. When the application is closed just replace the wallet.dat file in this location with your existing one and start up the application.

Hello garethtdavies,

Thank you for your swift reply, and many thanks indeed for confirming I can copy and paste my wallet.dat file into "MacOS look for ~/Library/Application Support/Zcash/" - Waiting for it to finish syncing :slight_smile:

Kind regards,

1 Like

This might not allways work.

From experience i know that after a network upgrade an old wallet.dat could stay on the wrong/old chain. I had several such issues allready on some POS coins which upgraded and due lazyness i just used the backup wallet.dat file for the newer wallet version just to realize days and weeks later that i’am on the wrong chain.

While my experience is not based on ZEC experience the logic should be the same with all QT wallets.

The best approach turned out to get the private keys for the adress where the funds are used by using

dumpprivkey (yourZECadressHere)
writing it down somewhere
(repeat for each adress you used or have funds)

than on the new up to date QT wallet use:
importprivkey (private key here you got from the previous step(s))

Exporting/extracting the private keys even on outdated wallets or even if you are on the wrong chain should be possible.

This in my opinion is a more secure approach when dealing with older/outdated wallet.dat files and ensures you are on the right correct newest chain!

P.S.: I didn’t use this approach yet with the ZEC qt wallet, but as said, i’am pretty sure it’s the same like with all qt wallets. Would be nice if somone dev can confirm what i wrote.