I have had a surprisingly difficult time trying to move the datacache from its currently location on my SSD at ~/.ipfs to a large spinning media disk. I haven’t been able to find any clear documentation on how to do this… I’m assuming that I can just edit the config file. But when I execute “ipfs config edit”, I get ENV variable $EDITOR not set`. So
Can I install ipfs in a way that sets up the cache where I want it the first time?
How do I move a cache after it is installed?
How do I fix the ENV variable $EDITOR not set` problem so that ipfs config edit works.
If by datacache you mean datastore then the following should help:
From the command ipfs init --help:
ipfs uses a repository in the local file system. By default, the repo is
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
environment variable:
export IPFS_PATH=/path/to/ipfsrepo
So, before you run ipfs init, you must first set IPFS_PATH to the path of your larger disk.
The error: ENV variable $EDITOR not set is caused by not setting the EDITORenvironment variable.
You can fix this by setting it to your preferred editor: export EDITOR=vim
Verify it was set: echo $EDITOR
See all your env variables (including IPFS_PATH): printenv