bitcoin cli – What’s the correct method to import a pockets from a file after eradicating it utterly

on

|

views

and

comments


What you’re on the lookout for is the restorewallet RPC. As of two/2/2022, this has not been included in a launch of Bitcoin Core (though it’s within the grasp code department on GitHub). It will likely be included within the v23 launch, anticipated in April 2022.

restorewallet "wallet_name" "backup_file" ( load_on_startup )

Restore and hundreds a pockets from backup.

Arguments:
1. wallet_name        (string, required) The title that shall be utilized to the restored pockets
2. backup_file        (string, required) The backup file that shall be used to revive the pockets.
3. load_on_startup    (boolean, elective) Save pockets title to persistent settings and cargo on startup. True so as to add pockets to startup listing, false to take away, null to depart unchanged.

Consequence:
{                       (json object)
  "title" : "str",       (string) The pockets title if restored efficiently.
  "warning" : "str"     (string) Warning message if pockets was not loaded cleanly.
}

Examples:
> bitcoin-cli restorewallet "testwallet" "homebackupsbackup-file.bak"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "technique": "restorewallet", "params": ["testwallet" "homebackupsbackup-file.bak"]}' -H 'content-type: textual content/plain;' http://127.0.0.1:8332/
> bitcoin-cli -named restorewallet wallet_name=testwallet backup_file="homebackupsbackup-file.bak"" load_on_startup=true
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "technique": "restorewallet", "params": {"wallet_name":"testwallet","backup_file":"housebackupsbackup-file.bak"","load_on_startup":true}}' -H 'content-type: textual content/plain;' http://127.0.0.1:8332/

The importwallet RPC is utilized in a distinct situation, to import a listing of keys from a dumpfile (a plaintext listing of keys generated by the dumpwallet RPC).

To revive a backup with v22 and under, merely:

  1. navigate to your wallets/ listing in your bitcoin knowledge listing
  2. create a brand new listing inside wallets/ with a singular title of your alternative for the restored pockets.
  3. Copy the pockets file into this newly created listing, and rename it to pockets.dat
  4. Begin bitcoin core, and it’s best to be capable to load the pockets.
Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here