So lets say you have lots of wallets in a server for like 8 different cryptocurrencys if you have limited space, this is problem because the blockchains never stop growing but the space amount is defined.
Now you add another drive to the setup and you want to migrate some of the wallets into the new drive to release some space in the other drive. this is how you do that.
- First you stop the process of the wallet by exiting the node.
- Validate using ps -efa | grep wallet that the process is gone.
- Copy the content of the blockchain into the other drive (the hidden dir .litecoin for example using cp -r -v /path/to/.hidden_dir/ /mnt/new_drive
- Then copy in the same way the binary’s of the wallet into the new drive in a separate directory to keep things organized.
- Finally run the help information on the binary wallet and look for the option or flag datadir example: ./bitcoin-qt -help | grep -i «datadir» if the option is available start the node using this flag and point the datadir option into the directory where you store the blockchain data like this for example: ./litecoin-qt -datadir=/mnt/some/path
- Check the wallet is working properly lsof -p NODE_PID you will see and validate where the data is been retrieve by the wallet or node.
- After checking all the details of your wallet you can proceed to delete the data from full drive.
And that is all folks see you next time.