Having Backup Trouble

I am stuck here trying to backup my wallets. i have created 4 of them. Now i have one wallet that i want to back up to put on another machine. I put this in.

./src/zcash-cli backupwallet my_backed_up_wallet.dat

error code: -4
error message:
Cannot backup wallet until the -exportdir option has been set
I am not so experienced with linux that much but can someone help me thanks.

If you're using Ubuntu, displaying the 'hidden' folders (the ones named with a '.' at the beginning) can be toggled by pressing Ctrl-H. Look for your wallet.dat file(s) in the .zcash folder. You might also like to try opening a terminal window and entering:

man zcashd

and / or

man zcash-cli

Thanks I found the wallet.dat. Does this file backup all of my wallets or just one? And just by this file I can import wallet into a new machine?

I haven't experimented with multiple wallet files. So far as I know, the file named wallet.dat in the .zcash folder is the default. There's also a zcashd option -

zcashd -wallet=

You'll want to set a directory to export to in the config file you created. Use exportdir= and add the path to the directory you want to export to.

Also, don't include the .dat file extension with the command.

Here's a reviewed but not-yet-merged guide to wallet backups: https://github.com/ioptio/zcash/blob/4088ac68dbabb0216e1fb008c19cb81d6292abfd/doc/wallet-backup.md

1 Like