Post
Topic
Board Bitcoin Technical Support
Re: bitcoin-cli dumpprivkey Only legacy wallets are supported by this command
by
NotATether
on 18/04/2023, 07:22:08 UTC
See https://github.com/bitcoin/bitcoin/issues/26239

Bitcoin Core is now creating descriptor wallets by default since version 24.0. These have an HD key by default, so Core is blocking you from exporting the private keys made by it.

Docs say you should use backupwallet with the -rpcwallet command-line switch (to select the wallet) to make a backup copy of the wallet in a location you choose, which from my point of view is ridiculous since you could just make a copy of the wallet manually.

It is always possible to open up the database wallet file and perform surgery on it to get its encrypted private keys though.