Windows Wallets how to change block chain data directory for any given currency - fast initial downloads

in #cryptocurrency7 years ago

This is a question asked over and over again in various announcement threads and even frustratingly posted on github issues (where they absolutely not belong to!)

Most people generally have a small-medium size fast SSD for their operating system/programs and a bigger mechanical HDD for saving data. Currency block-chains when double clicked will treat you as an average Wİndows user and install themselves in default user directories. This can be annoying for two reasons

  • People don't want to to consume precious SSD space with a huge blockchain. If you are using 10 wallets with average 5GB block chains this is 50GB of disk space gone.
  • Every single bit on an SSD has limited (albeit being very high) number of delete/write life. And blockchains are notorious number of read -> hash -> confirm -> delete -> write operation cycles repeated way too many times.

Some currencies will have command line parameters you can use to save block chain to a specific directory. For example ethereum forks will usually accept --datadir path/to/data Even if this is the case I still prefer changing up these directories myself, which will still work when I download a new version of the wallet and "forget" to add the parameter.

We will use mklink windows command to create junction links (linux users are probably familiar with the symlink concept)

Step by step:

  • Download your wallet, double click and install it normally without doing anything special.
  • Let the wallet sync on your main drive, the initial download/sync is generally very long and doing this on an SSD will shorten this duration immensely.
  • When the sync is completed close your wallet and locate your blockchain directory. This will be something like C:\Users\yourusername\AppData\Roaming\CoinName and lets say we want to move the block chain to D:\myblockchains\some\folder\name\CoinName
  • Make sure the wallet is closed before proceeding here!
    • start -> command prompt -> right click -> run as administrator
md D:\myblockchains\some\folder\name\ 2> nul
move  C:\Users\yourusername\AppData\Roaming\CoinName D:\myblockchains\some\folder\name\CoinName
mklink /J  C:\Users\yourusername\AppData\Roaming\CoinName D:\myblockchains\some\folder\name\CoinName

now you can restart your wallet and your block chain will be working from D:\myblockchains\some\folder\name\CoinName

Sort:  

Following you!

Congratulations @xaq! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70601.11
ETH 3576.21
USDT 1.00
SBD 4.78