4

I downloaded and ran bitcoin-qt to play around with.

First thing I did was create a wallet passphrase.

The second thing I did was try to create a wallet backup.

Then I got this message: Error: Wallet backup failed! (code -4)

If I simply delete the wallet file (no coins on it yet) and then restart bitcoin, everything works fine. But if I try to encrypt the wallet and then create a backup I get the error again.

What am I missing?

>getinfo
{
"version" : 90300,
"protocolversion" : 70002,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 340782,
"timeoffset" : -3,
"connections" : 8,
"proxy" : "",
"difficulty" : 41272873894.69702100,
"testnet" : false,
"keypoololdest" : 1422415118,
"keypoolsize" : 101,
"unlocked_until" : 1422419612,
"paytxfee" : 0.00000000,
"relayfee" : 0.00001000,
"errors" : ""
}

>backupwallet wallet.backup
Error: Wallet backup failed! (code -4)

When looking at the debug.log file I see this error:

2015-01-27 16:07:36 error copying wallet.dat to wallet.backup - boost::filesystem::copy_file: Access is denied: "C:\Users\Matthew\AppData\Roaming\Bitcoin\wallet.dat", "wallet.backup"

2 Answers 2

3

I've looked at Bitcoin's backupwallet code, and that error is triggered by a filesystem error. I can't tell what kind of filesystem error it is, though. Please open debug.log in the Bitcoin directory. There should be a line like

<date + time> error copying wallet.dat to <path> - <kind of error>

This is the most common type of error:

error copying wallet.dat to <dest> - boost::filesystem::copy_file: Access is denied: "<src>", "wallet.backup"

This means Bitcoin is trying to backup your wallet to C:\Program Files\Bitcoin. You don't have the permissions to backup there. To fix this, run

backupwallet "C:\Users\<username>\AppData\Roaming\Bitcoin\wallet.backup"

instead.

0

Running both the terminal that is running the "bitcoind" command and the terminal that runs the backup command with administrator privileges worked for me, saving in the "daemon" default folder.

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.