I've received my balance to my addresss that starts with 3 which is after 'addwitnessaddress' command.

I'd like to know that how do I properly backup my balance to keep safety.

Bitcoin Core has a function that called backup wallet to the 'wallet.dat', but there is a in unexpectable case by file corruption.

I tried keep it save by using 'dumpprivkey ' to get my priv key.

But the console says, "Address does not refer to a key". So I googled it and found it has related with something called P2SH.

It's little bit hard to understand for me to use Bitcoin.

Can some help me out to backup my balance only using by Bitcoin Core client instead of 'wallet.dat'?


1 Answer 1


Addresses beginning with a 3 generated using addwitnessaddress are called P2SH-P2WPKH addresses. That means it is a Pay-to-Witness-Public-Key-Hash (P2WPKH) script embedded in a Pay-to-Script-Hash (P2SH) address, which starts with a 3. To back up this type of address, you need to back up the private key used in the P2WPKH part. If you know which address you used when you called addwitnessaddress, you can call dumpprivkey on that address.

To restore from that private key, you should be able to just import the key into your wallet and call addwitnessaddress on it again. Note that addwitnessaddress is an experimental RPC call so the method to restoring may change in future, but you can always generate the corresponding public key hash (address) from they key, create a P2WPKH witness script for it, and wrap it in P2SH if you have the key so it should be a sufficient backup

  • Now I understand what I'm gonna do! Thanks! Commented Nov 17, 2017 at 12:00

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.