You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 03_3_Setting_Up_Your_Wallet.md
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,43 +76,41 @@ Invalid address
76
76
77
77
## Optional: Dump Your Wallet
78
78
79
-
It might seem dangerous having all of your irreplaceable private keys in a single file. That's what `bitcoin-cli backupwallet` is for. It lets you make a copy of your wallet.dat:
79
+
It might seem dangerous having all of your irreplaceable private keys in a single file. That's what `bitcoin-cli dumpwallet` is for. It lets you make a copy of your wallet.dat:
80
80
```
81
-
$ bitcoin-cli backupwallet ~/backup.dat
81
+
$ bitcoin-cli dumpwallet ~/mywallet.txt
82
82
```
83
+
The `mywallet.txt` file in your home directory will have a long list of private keys, addresses, and other information. Mind you, you'd never want to put this data out in a plain text file on a Bitcoin setup with real funds!
84
+
83
85
You can then recover it with `bitcoin-cli importwallet`.
84
86
```
85
-
$ bitcoin-cli importwallet backup.dat
87
+
$ bitcoin-cli importwallet ~/mywallet.txt
86
88
```
87
89
But note this requires an unpruned node!
88
90
```
89
-
$ bitcoin-cli importwallet ~/backup.dat
91
+
$ bitcoin-cli importwallet ~/mywallet.txt
90
92
error code: -4
91
93
error message:
92
94
Importing wallets is disabled when blocks are pruned
93
95
```
94
96
95
97
## Optional: View Your Private Keys
96
98
97
-
Sometimes, you might want to actually look at the private keys associated with your Bitcoin addresses. Perhaps you want to be able to sign a message or spend bitcoins from a different machine. Perhaps you just want to back up certain important private keys.
98
-
99
-
To look at _all_ the keys in your wallet, type `bitcoin-cli dumpwallet ~/mywallet.txt`.
99
+
Sometimes, you might want to actually look at the private keys associated with your Bitcoin addresses. Perhaps you want to be able to sign a message or spend bitcoins from a different machine. Perhaps you just want to back up certain important private keys. You can also do this with your dump file, since it's human readable.
100
100
```
101
101
$ bitcoin-cli dumpwallet ~/mywallet.txt
102
102
{
103
103
"filename": "/home/standup/mywallet.txt"
104
104
}
105
105
```
106
-
This will create a `mywallet.txt` file in your home directory with a long list of private keys, addresses, and other information. Mind you, you'd never want to put this data out in a plain text file on a Bitcoin setup with real funds!
107
-
108
106
More likely, you just want to look at the private key associated with a specific address. This can be done with the `bitcoin-cli dumpprivkey` command.
0 commit comments