283 lines
17 KiB
HTML
283 lines
17 KiB
HTML
<!DOCTYPE HTML>
|
|
<html lang="en" class="sidebar-visible no-js light">
|
|
<head>
|
|
<!-- Book generated using mdBook -->
|
|
<meta charset="UTF-8">
|
|
<title>Wallet Backup - The zcashd Book</title>
|
|
|
|
|
|
<!-- Custom HTML head -->
|
|
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="theme-color" content="#ffffff" />
|
|
|
|
<link rel="icon" href="../favicon.svg">
|
|
<link rel="shortcut icon" href="../favicon.png">
|
|
<link rel="stylesheet" href="../css/variables.css">
|
|
<link rel="stylesheet" href="../css/general.css">
|
|
<link rel="stylesheet" href="../css/chrome.css">
|
|
<link rel="stylesheet" href="../css/print.css" media="print">
|
|
|
|
<!-- Fonts -->
|
|
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
|
|
<link rel="stylesheet" href="../fonts/fonts.css">
|
|
|
|
<!-- Highlight.js Stylesheets -->
|
|
<link rel="stylesheet" href="../highlight.css">
|
|
<link rel="stylesheet" href="../tomorrow-night.css">
|
|
<link rel="stylesheet" href="../ayu-highlight.css">
|
|
|
|
<!-- Custom theme stylesheets -->
|
|
|
|
</head>
|
|
<body>
|
|
<div id="body-container">
|
|
<!-- Provide site root to javascript -->
|
|
<script>
|
|
var path_to_root = "../";
|
|
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
|
|
</script>
|
|
|
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
|
<script>
|
|
try {
|
|
var theme = localStorage.getItem('mdbook-theme');
|
|
var sidebar = localStorage.getItem('mdbook-sidebar');
|
|
|
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
|
}
|
|
|
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
|
}
|
|
} catch (e) { }
|
|
</script>
|
|
|
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
|
<script>
|
|
var theme;
|
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
|
var html = document.querySelector('html');
|
|
html.classList.remove('no-js')
|
|
html.classList.remove('light')
|
|
html.classList.add(theme);
|
|
html.classList.add('js');
|
|
</script>
|
|
|
|
<!-- Hide / unhide sidebar before it is displayed -->
|
|
<script>
|
|
var html = document.querySelector('html');
|
|
var sidebar = null;
|
|
if (document.body.clientWidth >= 1080) {
|
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
|
sidebar = sidebar || 'visible';
|
|
} else {
|
|
sidebar = 'hidden';
|
|
}
|
|
html.classList.remove('sidebar-visible');
|
|
html.classList.add("sidebar-" + sidebar);
|
|
</script>
|
|
|
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
|
<div class="sidebar-scrollbox">
|
|
<ol class="chapter"><li class="chapter-item expanded affix "><a href="../index.html">zcashd</a></li><li class="chapter-item expanded "><a href="../user.html"><strong aria-hidden="true">1.</strong> User Documentation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../user/release-support.html"><strong aria-hidden="true">1.1.</strong> Release Support</a></li><li class="chapter-item expanded "><a href="../user/platform-support.html"><strong aria-hidden="true">1.2.</strong> Platform Support</a></li><li class="chapter-item expanded "><a href="../user/wallet-backup.html" class="active"><strong aria-hidden="true">1.3.</strong> Wallet Backup</a></li><li class="chapter-item expanded "><a href="../user/shield-coinbase.html"><strong aria-hidden="true">1.4.</strong> Shielding Coinbase Outputs</a></li><li class="chapter-item expanded "><a href="../user/files.html"><strong aria-hidden="true">1.5.</strong> Data Directory Structure</a></li><li class="chapter-item expanded "><a href="../user/metrics.html"><strong aria-hidden="true">1.6.</strong> Metrics</a></li><li class="chapter-item expanded "><a href="../user/tor.html"><strong aria-hidden="true">1.7.</strong> Using zcashd with Tor</a></li><li class="chapter-item expanded "><a href="../user/security-warnings.html"><strong aria-hidden="true">1.8.</strong> Security Warnings</a></li><li class="chapter-item expanded "><a href="../user/deprecation.html"><strong aria-hidden="true">1.9.</strong> Deprecated Features</a></li></ol></li><li class="chapter-item expanded "><a href="../dev.html"><strong aria-hidden="true">2.</strong> Developer Documentation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../dev/dnsseed-policy.html"><strong aria-hidden="true">2.1.</strong> DNS Seeders</a></li><li class="chapter-item expanded "><a href="../dev/rust.html"><strong aria-hidden="true">2.2.</strong> Rust in zcashd</a></li><li class="chapter-item expanded "><a href="../dev/regtest.html"><strong aria-hidden="true">2.3.</strong> Regtest Tips And Hints</a></li><li class="chapter-item expanded "><a href="../dev/platform-tier-policy.html"><strong aria-hidden="true">2.4.</strong> Platform Tier Policy</a></li><li class="chapter-item expanded "><a href="../dev/deprecation.html"><strong aria-hidden="true">2.5.</strong> Deprecation Procedure</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">3.</strong> Design</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../design/chain-state.html"><strong aria-hidden="true">3.1.</strong> Chain State</a></li><li class="chapter-item expanded "><a href="../design/coins-view.html"><strong aria-hidden="true">3.2.</strong> "Coins" View</a></li><li class="chapter-item expanded "><a href="../design/p2p-data-propagation.html"><strong aria-hidden="true">3.3.</strong> P2P Data Propagation</a></li></ol></li></ol>
|
|
</div>
|
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
|
</nav>
|
|
|
|
<div id="page-wrapper" class="page-wrapper">
|
|
|
|
<div class="page">
|
|
<div id="menu-bar-hover-placeholder"></div>
|
|
<div id="menu-bar" class="menu-bar sticky bordered">
|
|
<div class="left-buttons">
|
|
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
|
<i class="fa fa-bars"></i>
|
|
</button>
|
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
|
<i class="fa fa-paint-brush"></i>
|
|
</button>
|
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
|
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
|
</ul>
|
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
|
<i class="fa fa-search"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<h1 class="menu-title">The zcashd Book</h1>
|
|
|
|
<div class="right-buttons">
|
|
<a href="../print.html" title="Print this book" aria-label="Print this book">
|
|
<i id="print-button" class="fa fa-print"></i>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="search-wrapper" class="hidden">
|
|
<form id="searchbar-outer" class="searchbar-outer">
|
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
|
</form>
|
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
|
<div id="searchresults-header" class="searchresults-header"></div>
|
|
<ul id="searchresults">
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
|
<script>
|
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
|
});
|
|
</script>
|
|
|
|
<div id="content" class="content">
|
|
<main>
|
|
<h1 id="wallet-backup-instructions"><a class="header" href="#wallet-backup-instructions">Wallet Backup Instructions</a></h1>
|
|
<h2 id="overview"><a class="header" href="#overview">Overview</a></h2>
|
|
<p>Backing up your Zcash private keys is the best way to be proactive about
|
|
preventing loss of access to your ZEC.</p>
|
|
<p>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).</p>
|
|
<p>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.</p>
|
|
<p>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.</p>
|
|
<h2 id="instructions-for-backing-up-your-wallet-andor-private-keys"><a class="header" href="#instructions-for-backing-up-your-wallet-andor-private-keys">Instructions for backing up your wallet and/or private keys</a></h2>
|
|
<p>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.</p>
|
|
<p>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.</p>
|
|
<p>For all methods, you will need to include an export directory setting in your
|
|
config file (<code>zcash.conf</code> located in the data directory which is <code>~/.zcash/</code>
|
|
unless it's been overridden with <code>datadir=</code> setting):</p>
|
|
<p><code>exportdir=path/to/chosen/export/directory</code></p>
|
|
<p>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.</p>
|
|
<p>Note that zcashd will need to be stopped and restarted for edits in the config
|
|
file to take effect.</p>
|
|
<h3 id="using-backupwallet"><a class="header" href="#using-backupwallet">Using <code>backupwallet</code></a></h3>
|
|
<p>To create a backup of your wallet, use:</p>
|
|
<pre><code class="language-bash">$ zcash-cli backupwallet <nameofbackup>
|
|
</code></pre>
|
|
<p>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.</p>
|
|
<p>If you generate a new Zcash address, it will not be reflected in the backup
|
|
file.</p>
|
|
<p>If your original <code>wallet.dat</code> file becomes inaccessible for whatever reason,
|
|
you can use your backup by copying it into your data directory and renaming the
|
|
copy to <code>wallet.dat</code>.</p>
|
|
<h3 id="using-z_exportwallet--z_importwallet"><a class="header" href="#using-z_exportwallet--z_importwallet">Using <code>z_exportwallet</code> & <code>z_importwallet</code></a></h3>
|
|
<p>If you prefer to have an export of your private keys in human readable format,
|
|
you can use:</p>
|
|
<pre><code class="language-bash">$ zcash-cli z_exportwallet <nameofbackup>`
|
|
</code></pre>
|
|
<p>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.</p>
|
|
<p>To import keys into a wallet which were previously exported to a file, use:</p>
|
|
<pre><code class="language-bash">$ zcash-cli z_importwallet <path/to/exportdir/nameofbackup>
|
|
</code></pre>
|
|
<h3 id="using-z_exportkey-z_importkey-dumpprivkey--importprivkey"><a class="header" href="#using-z_exportkey-z_importkey-dumpprivkey--importprivkey">Using <code>z_exportkey</code>, <code>z_importkey</code>, <code>dumpprivkey</code> & <code>importprivkey</code></a></h3>
|
|
<p>If you prefer to export a single private key for a shielded address, you can
|
|
use:</p>
|
|
<pre><code class="language-bash">$ zcash-cli z_exportkey <z-address>
|
|
</code></pre>
|
|
<p>This will return the private key and will not create a new file.</p>
|
|
<p>For exporting a single private key for a transparent address, you can use the
|
|
command inherited from Bitcoin:</p>
|
|
<pre><code class="language-bash">$ zcash-cli dumpprivkey <t-address>
|
|
</code></pre>
|
|
<p>This will return the private key and will not create a new file.</p>
|
|
<p>To import a private key for a shielded address, use:</p>
|
|
<pre><code class="language-bash">$ zcash-cli z_importkey <z-priv-key>
|
|
</code></pre>
|
|
<p>This will add the key to your wallet and rescan the wallet for associated
|
|
transactions if it is not already part of the wallet.</p>
|
|
<p>The rescanning process can take a few minutes for a new private key. To skip
|
|
it, instead use:</p>
|
|
<pre><code class="language-bash">$ zcash-cli z_importkey <z-private-key> no
|
|
</code></pre>
|
|
<p>For other instructions on fine-tuning the wallet rescan, see the command's help
|
|
documentation:</p>
|
|
<pre><code class="language-bash">$ zcash-cli help z_importkey
|
|
</code></pre>
|
|
<p>To import a private key for a transparent address, use:</p>
|
|
<pre><code class="language-bash">$ zcash-cli importprivkey <t-priv-key>
|
|
</code></pre>
|
|
<p>This has the same functionality as <code>z_importkey</code> but works with transparent
|
|
addresses.</p>
|
|
<p>See the command's help documentation for instructions on fine-tuning the wallet
|
|
rescan:</p>
|
|
<pre><code class="language-bash">$ zcash-cli help importprivkey
|
|
</code></pre>
|
|
|
|
</main>
|
|
|
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
|
<!-- Mobile navigation buttons -->
|
|
<a rel="prev" href="../user/platform-support.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
<a rel="next" href="../user/shield-coinbase.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
|
|
<div style="clear: both"></div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
|
<a rel="prev" href="../user/platform-support.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
<a rel="next" href="../user/shield-coinbase.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
window.playground_copyable = true;
|
|
</script>
|
|
|
|
|
|
<script src="../elasticlunr.min.js"></script>
|
|
<script src="../mark.min.js"></script>
|
|
<script src="../searcher.js"></script>
|
|
|
|
<script src="../clipboard.min.js"></script>
|
|
<script src="../highlight.js"></script>
|
|
<script src="../book.js"></script>
|
|
|
|
<!-- Custom JS scripts -->
|
|
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|