From d5cdb0519a8dc28d0396eff94feb28303ddc5ef6 Mon Sep 17 00:00:00 2001 From: Paige Peterson Date: Wed, 3 May 2017 21:25:06 -0400 Subject: [PATCH 1/4] wallet backup instructions --- doc/wallet-backup.md | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 doc/wallet-backup.md diff --git a/doc/wallet-backup.md b/doc/wallet-backup.md new file mode 100644 index 000000000..88d60e3c0 --- /dev/null +++ b/doc/wallet-backup.md @@ -0,0 +1,85 @@ +# Wallet Backup Instructions + +## Overview + +Backing up your Zcash private keys is the best way to be proactive about preventing loss of access to your ZEC. + +Problems resulting from bugs in the code, user error, device failure, etc. may lead to losing access to your wallet (and as a result, the private keys of addresses which are required to spend from them). + +No matter what the cause of a corrupted or lost wallet could be, we highly recommend all users backup on a regular basis. Anytime a new address in the wallet is generated, we recommending making a new backup so all private keys for addresses in your wallet are safe. + +Note that a backup is a duplicate of data needed to spend ZEC so where you keep your backup(s) is another important consideration. You should not store backups where they would be equally or increasingly susceptible to loss or theft. + +## Instructions for backing up your wallet and/or private keys + +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. + +For all methods, you will need to include an export directory setting in your config file (`zcash.conf` located in the data directory which is `~/.zcash/` unless it's been overridden with `datadir=` setting): + +`exportdir=/path/to/chosen/export/directory` + +You may chose any directory as the location for export & backup files. If the directory doesn't exist, it will be created. + +### Using `backupwallet` + +To create a backup of your wallet, use: + +`zcash-cli backupwallet `. + +The backup will be an exact copy of the current state of your wallet.dat file stored in the export directory you specified in the config file. The file path will also be returned. + +If you generate a new Zcash address, it will not be included in the backup file. + +If your original `wallet.dat` file becomes inaccessible for whatever reason, you can use your backup by placing it into your data directory and renaming it to `wallet.dat`. + +### Using `z_exportwallet` & `z_importwallet` + +If you prefer to have an export of your private keys in human readable format, you can use: + +`zcash-cli z_exportwallet ` + +This will generate a text file in the export directory with all transparent and shielded private keys with their associated public addresses. It will also return the file path. + +To import keys into a wallet which were previously exported to a file, use: + +`zcash-cli z_importwallet ` + +### Using `z_exportkey`, `z_importkey`, `dumpprivkey` & `importprivkey` + +If you prefer to export a single private key for a shielded address, you can use: + +`zcash-cli z_exportkey ` + +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: + +`zcash-cli dumpprivkey ` + +This will return the private key and will not create a new file. + +To import a private key for a shielded address, use: + +`zcash-cli z_importkey ` + +This will add the key to your wallet and rescan the wallet for associated transactions if it is not already part of the wallet. + +See the command's help documentation for instructions on fine-tuning the wallet rescan: + +`zcash-cli help z_importkey` + +To import a private key for a transparent address, use: + +`zcash-cli importprivkey ` + +This has the same functionality as `z_importkey` but works with transparent addresses. + +See the command's help documentation for instructions on fine-tuning the wallet rescan: + +`zcash-cli help importprivkey` + +### Using `dumpwallet` + +This command inherited from Bitcoin is depreciated. If you use it, they will export private keys in a similar fashion as `z_exportwallet` but only for transparent addresses. \ No newline at end of file From 8e27d624aa4e8284b0f4ce1c86b0228670c31a26 Mon Sep 17 00:00:00 2001 From: Paige Peterson Date: Wed, 3 May 2017 21:49:19 -0400 Subject: [PATCH 2/4] typo and rewording edits --- doc/wallet-backup.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/wallet-backup.md b/doc/wallet-backup.md index 88d60e3c0..35827c96e 100644 --- a/doc/wallet-backup.md +++ b/doc/wallet-backup.md @@ -30,7 +30,7 @@ To create a backup of your wallet, use: The backup will be an exact copy of the current state of your wallet.dat file stored in the export directory you specified in the config file. The file path will also be returned. -If you generate a new Zcash address, it will not be included in the backup file. +If you generate a new Zcash address, it will not be reflected in the backup file. If your original `wallet.dat` file becomes inaccessible for whatever reason, you can use your backup by placing it into your data directory and renaming it to `wallet.dat`. @@ -40,7 +40,7 @@ If you prefer to have an export of your private keys in human readable format, y `zcash-cli z_exportwallet ` -This will generate a text file in the export directory with all transparent and shielded private keys with their associated public addresses. It will also return the file path. +This will generate a file in the export directory listing all transparent and shielded private keys with their associated public addresses. The file path will be returned in the command line. To import keys into a wallet which were previously exported to a file, use: @@ -54,7 +54,7 @@ If you prefer to export a single private key for a shielded address, you can use 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: +For exporting a single private key for a transparent address, you can use the command inherited from bitcoin: `zcash-cli dumpprivkey ` @@ -82,4 +82,4 @@ See the command's help documentation for instructions on fine-tuning the wallet ### Using `dumpwallet` -This command inherited from Bitcoin is depreciated. If you use it, they will export private keys in a similar fashion as `z_exportwallet` but only for transparent addresses. \ No newline at end of file +This command inherited from bitcoin is depreciated. It will export private keys in a similar fashion as `z_exportwallet` but only for transparent addresses. \ No newline at end of file From 56dbd7b564426324defb78f0dd6867f097cd658d Mon Sep 17 00:00:00 2001 From: Paige Peterson Date: Thu, 11 May 2017 19:51:21 -0400 Subject: [PATCH 3/4] str4d and Ariel's suggestions --- doc/wallet-backup.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/wallet-backup.md b/doc/wallet-backup.md index 35827c96e..2c36ebb41 100644 --- a/doc/wallet-backup.md +++ b/doc/wallet-backup.md @@ -14,7 +14,7 @@ Note that a backup is a duplicate of data needed to spend ZEC so where you keep 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. +There are multiple ways to make sure you have at least one other copy of the private keys needed to spend your ZEC and view your shielded ZEC. For all methods, you will need to include an export directory setting in your config file (`zcash.conf` located in the data directory which is `~/.zcash/` unless it's been overridden with `datadir=` setting): @@ -22,6 +22,8 @@ For all methods, you will need to include an export directory setting in your co You may chose any directory as the location for export & backup files. If the directory doesn't exist, it will be created. +Note that zcashd will need to be stopped and restarted for edits in the config file to take effect. + ### Using `backupwallet` To create a backup of your wallet, use: @@ -32,7 +34,7 @@ The backup will be an exact copy of the current state of your wallet.dat file st If you generate a new Zcash address, it will not be reflected in the backup file. -If your original `wallet.dat` file becomes inaccessible for whatever reason, you can use your backup by placing it into your data directory and renaming it to `wallet.dat`. +If your original `wallet.dat` file becomes inaccessible for whatever reason, you can use your backup by copying it into your data directory and renaming the copy to `wallet.dat`. ### Using `z_exportwallet` & `z_importwallet` @@ -44,7 +46,7 @@ This will generate a file in the export directory listing all transparent and sh To import keys into a wallet which were previously exported to a file, use: -`zcash-cli z_importwallet ` +`zcash-cli z_importwallet ` ### Using `z_exportkey`, `z_importkey`, `dumpprivkey` & `importprivkey` @@ -54,7 +56,7 @@ If you prefer to export a single private key for a shielded address, you can use 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: +For exporting a single private key for a transparent address, you can use the command inherited from Bitcoin: `zcash-cli dumpprivkey ` @@ -66,7 +68,11 @@ To import a private key for a shielded address, use: This will add the key to your wallet and rescan the wallet for associated transactions if it is not already part of the wallet. -See the command's help documentation for instructions on fine-tuning the wallet rescan: +The rescanning process can take a few minutes for a new private key. To skip it, instead use: + +`zcash-cli z_importkey no` + +For other instructions on fine-tuning the wallet rescan, see the command's help documentation: `zcash-cli help z_importkey` @@ -82,4 +88,4 @@ See the command's help documentation for instructions on fine-tuning the wallet ### 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. \ No newline at end of file +This command inherited from Bitcoin is deprecated. It will export private keys in a similar fashion as `z_exportwallet` but only for transparent addresses. \ No newline at end of file From 4088ac68dbabb0216e1fb008c19cb81d6292abfd Mon Sep 17 00:00:00 2001 From: Paige Peterson Date: Thu, 11 May 2017 22:43:01 -0400 Subject: [PATCH 4/4] specify exportdir being within homedirectory --- doc/wallet-backup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/wallet-backup.md b/doc/wallet-backup.md index 2c36ebb41..9f7bc0f40 100644 --- a/doc/wallet-backup.md +++ b/doc/wallet-backup.md @@ -20,7 +20,7 @@ For all methods, you will need to include an export directory setting in your co `exportdir=/path/to/chosen/export/directory` -You may chose any directory as the location for export & backup files. If the directory doesn't exist, it will be created. +You may chose any directory within the home directory as the location for export & backup files. If the directory doesn't exist, it will be created. Note that zcashd will need to be stopped and restarted for edits in the config file to take effect.