Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wallet backup instructions #2340

Merged
merged 4 commits into from
May 15, 2017
Merged

wallet backup instructions #2340

merged 4 commits into from
May 15, 2017

Conversation

ioptio
Copy link
Contributor

@ioptio ioptio commented May 4, 2017

closes #2178

@ioptio ioptio added this to the 1.0.9 milestone May 4, 2017
@ioptio ioptio requested review from daira and str4d May 4, 2017 01:28
@nathan-at-least
Copy link
Contributor

I request that reviewers for this ticket literally walk through all instructions with a test wallet. Doing so on mainnet will take some time to sync a new test wallet, so plan accordingly.

Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. I have tested the export commands just now (and verified that -exportdir is needed to export), and I have previously tested the import commands.

EDIT: I have now (that rescans are finished) tested the import commands.


### Using `dumpwallet`

This command inherited from bitcoin is depreciated. It will export private keys in a similar fashion as `z_exportwallet` but only for transparent addresses.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Bitcoin
  • deprecated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dumpwallet behavior is confusing.
The command exists but I couldn't get it to work - perhaps because of this deprecation.
It might be better to delete the command if it doesn't work.


This will return the private key and will not create a new file.

For exporting a single private key for a transparent address, you can use the command inherited from bitcoin:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitcoin


These instructions are specific for the officially supported Zcash Linux client. For backing up with third-party wallets, please consult with user guides or support channels provided for those services.

There are multiple ways to make sure you have at least one other copy of the private keys needed to spend ZEC and view shielded ZEC.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add "your" before "ZEC" and "Shielded"?


To create a backup of your wallet, use:

`zcash-cli backupwallet <nameofbackup>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get
error code: -4
error message:
Cannot backup wallet until the -exportdir option has been set
even though I did add exportdir to zcash.conf

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally it worked..
I think the thing was zcashd was running when I changed the zcash.conf
I had to do zcash-cli stop
and then zcashd -daemon
and then also I think it needed to catch up to the latest block
cause also after that when I tried the backup command as written it gave me
error code: -28
error message:
Loading block index...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after a minute when I tried again it worked.
The explanation doesn't mention that zcashd needs to be running for the backup command to work

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But also now when it seems to have worked - wrote me the path to the backup file.
When I go to the backup directory I don't see any files, also with ls -a

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK that was fine. It just interpreted ~ as a directory name , what's a little confusing about the explanation is that I felt unsure if I just start with / whether it always starts from the home directory or somewhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with these suggestions.


To import keys into a wallet which were previously exported to a file, use:

`zcash-cli z_importwallet <nameofbackup>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth noting that when importing you need to write the whole path, it doesn't look automatically in exportdir.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Changed the command to reflect this.

`zcash-cli z_importkey <z-priv-key>`

This will add the key to your wallet and rescan the wallet for associated transactions if it is not already part of the wallet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add:
The rescanning process can take a few minutes for a new private key.
To skip it use
zcash-cli z_importkey <z-priv-key> no
instead.
More generally, see the command's..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Added this.


### Using `dumpwallet`

This command inherited from bitcoin is depreciated. It will export private keys in a similar fashion as `z_exportwallet` but only for transparent addresses.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dumpwallet behavior is confusing.
The command exists but I couldn't get it to work - perhaps because of this deprecation.
It might be better to delete the command if it doesn't work.

@arielgabizon
Copy link
Contributor

ACK

@nathan-at-least
Copy link
Contributor

@zkbot r+

@zkbot
Copy link
Contributor

zkbot commented May 14, 2017

📌 Commit 4088ac6 has been approved by nathan-at-least

@zkbot
Copy link
Contributor

zkbot commented May 14, 2017

⌛ Testing commit 4088ac6 with merge 3f72734e4e9d964da92ea0a816d8f6a35395f5f2...

@zkbot
Copy link
Contributor

zkbot commented May 14, 2017

💔 Test failed - pr-merge

@nathan-at-least
Copy link
Contributor

@zkbot retry

@zkbot
Copy link
Contributor

zkbot commented May 15, 2017

⌛ Testing commit 4088ac6 with merge 1d20dfe4ee271580e6d249deb8aae791f18e176e...

@zkbot
Copy link
Contributor

zkbot commented May 15, 2017

💔 Test failed - pr-merge

@nathan-at-least
Copy link
Contributor

@zkbot retry

zkbot added a commit that referenced this pull request May 15, 2017
@zkbot
Copy link
Contributor

zkbot commented May 15, 2017

⌛ Testing commit 4088ac6 with merge 0d77ed3...

@zkbot
Copy link
Contributor

zkbot commented May 15, 2017

☀️ Test successful - pr-merge
Approved by: nathan-at-least
Pushing 0d77ed3 to master...

@zkbot zkbot merged commit 4088ac6 into zcash:master May 15, 2017
@nathan-at-least nathan-at-least moved this from Work Queue to Complete in Security and Stability May 30, 2017
@ioptio ioptio added this to Blocked in Documentation Jun 5, 2017
@ioptio ioptio moved this from Blocked to Complete in Documentation Jun 5, 2017
@ioptio ioptio moved this from Work Queue to Complete in User Support Jul 25, 2017
@mdr0id mdr0id moved this from Complete to Released in Documentation Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
User Support
  
Complete
Documentation
  
Released
Development

Successfully merging this pull request may close these issues.

Docs with wallet backup instructions, along w/ suggestion to do frequent backups.
5 participants