Documentation exported from Bitcoin Core 28.0

dumpwallet (28.0.0 RPC)

blockchain

control

mining

network

rawtransactions

signer

util

wallet

zmq

dumpwallet "filename"

Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.
Imported scripts are included in the dumpfile, but corresponding BIP173 addresses, etc. may not be added automatically by importwallet.
Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by
only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).
Note: This command is only compatible with legacy wallets.

Arguments:
1. filename    (string, required) The filename with path (absolute path recommended)

Result:
{                        (json object)
  "filename" : "str"     (string) The filename with full absolute path
}

Examples:
> bitcoin-cli dumpwallet "test"
> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "dumpwallet", "params": ["test"]}' -H 'content-type: application/json' http://127.0.0.1:8332/