restorewallet
wallet wallet since 24.0restores and loads a wallet from backup.
↑ shares the docs page. Use Share this query below for a link with your current arg values.
Wallet RPC, not available on our node. Wallet operation. Our node runs without a wallet, so this RPC is structurally unreachable here. Docs are kept for reference.
Call from your own code
Replace $BITCOIN_RPC_USER / $BITCOIN_RPC_PASSWORD with credentials from your bitcoind's bitcoin.conf,
and replace localhost:8332 with your node's RPC address.
You can't run this RPC against our node (we run wallet=0), but you can run it against your own bitcoind.
Help
restorewallet "wallet_name" "backup_file" ( load_on_startup )
Restore and loads a wallet from backup.
Arguments:
1. wallet_name (string, required) The name that will be applied to the restored wallet
2. backup_file (string, required) The backup file that will be used to restore the wallet.
3. load_on_startup (boolean, optional) Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged.
Result:
{ (json object)
"name" : "str", (string) The wallet name if restored successfully.
"warning" : "str" (string) Warning message if wallet was not loaded cleanly.
}
Examples:
> bitcoin-cli restorewallet "testwallet" "home\backups\backup-file.bak"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "restorewallet", "params": ["testwallet" "home\backups\backup-file.bak"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
> bitcoin-cli -named restorewallet wallet_name=testwallet backup_file='home\backups\backup-file.bak"' load_on_startup=true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "restorewallet", "params": {"wallet_name":"testwallet","backup_file":"home\\backups\\backup-file.bak\"","load_on_startup":true}}' -H 'content-type: text/plain;' http://127.0.0.1:8332/