Backup wallet doesn't overwrite an existing file #2035

issue Joukehofman opened this issue on November 26, 2012
  1. Joukehofman commented at 3:23 PM on November 26, 2012: none

    I don't know if it is a feature or a bug, but an error would be nice I guess.

  2. Diapolo commented at 9:59 PM on November 26, 2012: none

    Indeed, maybe I'll take a look tomorrow...

  3. laanwj commented at 7:28 AM on November 27, 2012: member

    Ugh, this is bad if it is true, silently ignoring backup requests

  4. Diapolo commented at 8:14 AM on November 27, 2012: none

    I tried it and was able to overwrite the file. The modified stamp of the file got updated. @Joukehofman Can you please give more details, OS, Bitcoin version and so on.

  5. Joukehofman commented at 8:21 AM on November 27, 2012: none

    Ubuntu 10.10, bitcoind version 7.1 with this patch: #2021 (comment)

    But according to the date, it also didn't work with versions 6.2 and 6.3

  6. Diapolo commented at 8:28 AM on November 27, 2012: none

    @Joukehofman I need to further ask, you tried to backup via bitcoind or the GUI one Bitcoin-Qt? I tried the Bitcoin-Qt dialog, which is working for me on Windows 7 x64.

  7. Joukehofman commented at 8:29 AM on November 27, 2012: none

    bitcoind

  8. Diapolo commented at 10:16 AM on November 27, 2012: none

    I tried backupwallet RPC command via RPC console and that also works, I can't seem to reproduce on Windows.

  9. Diapolo commented at 2:02 PM on November 27, 2012: none

    One glitch I found is that RPC console converts this input C:\Users\Diapolo\Desktop into C:UsersDiapoloDesktop so it means to achieve what I want I need to escap back-slashes C:\\Users\\Diapolo\\Desktop. @laanwj It would be nice to tell the use that fact in the welcome message?

  10. nkrowlan commented at 2:53 PM on November 27, 2012: none

    I'm at 3ed1ccb0898b22353e9fcc942b43df98c9a3bf4c, and can confirm that 64-bit bitcoin-qt console on Ubuntu 12.10 is silently failing to overwrite files that exist.

  11. laanwj commented at 3:17 PM on November 27, 2012: member

    @diapolo yes, you should surround paths with '' (single quotes). Otherwise you get into trouble with spaces as well.

  12. Diapolo commented at 3:31 PM on November 27, 2012: none

    Can you guys try, if with #2044 the client at least shows an error. What boost versions are you using? @laanwj I remember Gavins proposal to change the format of the RPC commands help messages... would make sense :).

  13. gmaxwell commented at 3:39 PM on November 27, 2012: contributor

    The RPC overwrites fine for me. I wonder if what is happening is that the behavior of backupwallet is confusing people and the wallet is being written someplace they don't expect instead of over the expected file?

  14. Joukehofman commented at 3:43 PM on November 27, 2012: none

    rm /home/user/wallet.dat && /home/user/bitcoind backupwallet /home/user/wallet.dat works fine

  15. nkrowlan commented at 3:47 PM on November 27, 2012: none

    Boost 1.46 here.

    backupwallet /path/to/writeable-dir/non-writeable-file doesn't give an error, but backupwallet /path/to/non-writeable-dir/file does.

    backupwallet /path/to/non-writeable-dir/ doens't give an error message either, even though it would normally backup to /path/to/non-writeable-dir/wallet.dat

  16. laanwj commented at 12:24 PM on November 7, 2013: member

    Fixed by #2044

  17. laanwj closed this on Nov 7, 2013

  18. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me