Allow storing private and public data separately #791

issue grawity openend this issue on February 1, 2012
  1. grawity commented at 9:00 pm on February 1, 2012: none

    Currently I keep my entire ~/.bitcoin directory on an encrypted eCryptFS filesystem. However, loading the entire block DB from it is relatively slow, and due to issue #660 it is impossible to keep .bitcoin in plain and symlink wallet.dat/addr.dat from the private filesystem. I assume that symlinking blk*.dat would cause the same problems as in #660.

    Hence this feature request: Allow storing the public data (blk*.dat, __db.*, database/log.*) in a separate directory from private data.

    On Linux, $XDG_CACHE_HOME/Bitcoin (aka ~/.cache/Bitcoin/) would be a good choice for the block DB and related files, while the private data could go to $XDG_CONFIG_HOME/Bitcoin (aka ~/.config/Bitcoin). On Windows, AppData/Local/Bitcoin and AppData/Roaming/Bitcoin respectively. Those are only suggestions though; a simple ~/.bitcoin/private/ directory would be sufficient.

  2. gmaxwell commented at 9:09 pm on February 1, 2012: contributor

    This is not as simple as moving the files. Because of the shared database environment the database logs need to follow the data.

    Otherwise you may have information leakage — or loss in cases where the node is uncleanly shut down and the database logs become unavailable.

  3. jojkaart commented at 9:09 pm on February 1, 2012: none
    Seconded
  4. grawity commented at 9:18 pm on February 1, 2012: none
    @gmaxwell, do you mean all databases (wallet.dat, addr.dat, blkindex.dat) share the same log file between them? Or are you just saying that, for example, wallet.dat and the log file of wallet.dat must be in the same directory?
  5. gmaxwell commented at 10:20 pm on February 1, 2012: contributor
    They share the same database logs currently— which would inhibit the log file being in the same directory if they got split. It’s important to keep the data and its log together because if the node is shut down uncleanly it may need the logfile to recover.
  6. grawity commented at 10:53 pm on February 1, 2012: none
    I see… Is it not possible to keep two log directories by the same program?
  7. jgarzik commented at 9:53 pm on July 5, 2012: contributor
    Duplicate of issue #68
  8. jgarzik closed this on Jul 5, 2012

  9. ptschip referenced this in commit 2959a04f9a on Oct 13, 2017
  10. DrahtBot 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: 2024-10-05 01:12 UTC

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