0

I have experience with secure-copy and secure-download but how do I move only the Bitcoin Client "blocks" and "chainstate" folders within the home directory of Ubuntu 18.04 to an external USB hard-drive while running the Bitcoin Client on the connected laptop with limited storage on board? I'd sincerely appreciate the best-practice or recommended approach for hosting a Bitcoin full-node on a laptop with an external USB hard-drive since I am also attempting to run Blockstream and FIBRE on this environment- thank you

2 Answers 2

1

Also, after bitcoin(d) link creates the ~/.bitcoin folder, you can add a link to external drive.

cd ~/.bitcoin
rm -rf ./blocks
rm -rf ./chainstate
ln -s /data/btc_blocks ./blocks
ln -s /data/btc_chainstate ./chainstate

remove original block and chainstate though.

1
  • This is true, but don't forget to copy the blocks and chainstate folders first! These instructions delete the existing data and remap the directories, but then you'd need to do another full "initial block download". (And make sure you stop the bitcoin daemon first)
    – bitsmack
    Aug 3, 2021 at 13:49
0

The easiest way to do this according to the Bitcoin Core Wiki is to append the datadir option after running bitcoind to launch the client according to the following syntax:

  • bitcoind -datadir=/media/myusername/backup/.bitcoin

example provided thusly:

  • bitcoind -datadir=/media/alexanderjsingleton/SEAGATE/.bitcoin

Also, don't forget to mount the external USB hard-drive by using the ls -l /dev/disk/by-uuid/ option by command line or by GUI-method.

1
  • Unfortunately, this also moves the wallet.dat file to the new location. Not what the OP was looking for, I think...
    – bitsmack
    Aug 3, 2021 at 8:00

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.