2

I know we can do this by menu "File - Backup", but how can we get the private key of the address(or something else we can restore wallet) then write it down or print it out?

2 Answers 2

3

You want to use the listdescriptors true RPC command. It will list all the output descriptors that the wallet consists of, together with their private key material (typically, in the form of xprvs). These descriptors can be imported into another wallet using the importdescriptors RPC to get an equivalent wallet.

1
  • The output Json is complicated for memory, but it's printable.
    – foolbear
    Jan 24 at 2:04
1

You can backup your wallet on bitcoin using the "backupwallet" RPC or "File > Backup" on GUI

$ bitcoin-cli -rpcwallet="wallet-01" backupwallet /path/to/Backups/backup-01.dat

More information on managing your wallet can be found at https://github.com/bitcoin/bitcoin/blob/master/doc/managing-wallets.md#14-backing-up-the-wallet

5
  • I don't think this answers OP's question; they're looking for printable data. Jan 22 at 14:52
  • @foolbear if you are looking to get the private key of addresses to print you can use the dumpprivkey "address" RPC Jan 23 at 11:30
  • That doesn't work for descriptor wallets. Jan 23 at 12:20
  • dumpprivkey is for legacy wallet only. @BrandonOdiwuor
    – foolbear
    Jan 24 at 1:58
  • So the only way is backup the whole wallet in Bitcoin Core, thanks. @PieterWuille
    – foolbear
    Jan 24 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.