migratewallet: backup file has inconvenient name #29584

issue laanwj openend this issue on March 7, 2024
  1. laanwj commented at 12:45 pm on March 7, 2024: member

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    The migratewallet RPC can create a backup named (something like) -998239328.legacy.bak. Files starting with a - are somewhat inconvenient to work with in UNIX, because commands confuse them with a flag, especally when using *. It’s usually possible to work around this with -- but still, it would be more convenient to use positive numbers only.

    Expected behaviour

    It would be more convenient to use positive numbers only.

    Steps to reproduce

    bitcoin-cli migratewallet ""

    Relevant log output

    N/A

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    v26.0

    Operating system and version

    Debian Linux

    Machine specifications

    No response

  2. laanwj added the label Wallet on Mar 7, 2024
  3. furszy commented at 1:06 pm on March 7, 2024: member

    more convenient to use positive numbers only

    It isn’t a negative number. It is just a separator. The file format is “<wallet_name>-<current_time>.legacy.bak” (guess that you migrated the default wallet, thus the empty wallet_name). But sure, it could easily be replaced for an underscore separator.

  4. laanwj commented at 1:22 pm on March 7, 2024: member
    Yes, I migrated the default wallet. In that case, instead of changing the seperator, substituting something else instead of "" would work too. It’s fine to have - in a filename, just not as first character.
  5. furszy commented at 1:23 pm on March 7, 2024: member

    Yes, I migrated the default wallet. In that case, instead of changing the seperator, substituting something else instead of "" would work too. It’s fine to have - in a filename, just not as first character.

    Yep sure. Already working on it.

  6. furszy commented at 2:14 pm on March 7, 2024: member
    Done. #29586.
  7. achow101 closed this on Mar 11, 2024

  8. instagibbs referenced this in commit b4a05751b6 on Mar 11, 2024


laanwj furszy

Labels
Wallet


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: 2024-12-21 15:12 UTC

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