Changing data directory of single-node install (Centos)

I installed CrateDB 4.2.4 using “bash -c "$(curl -L”" on my centos machine.

It’s installed in my /home directory. However my /home directory has less space and I want to change the data directory to /opt/crate_data. How do I achieve this?

Change the configuration file (crate.yml) and include

# Storage: CrateDB can utilize multiple volumes in parallel, make sure to set
# the owner to 'crate:crate' /opt/crate_data

I already have a few tables in /home directory. Would changing affect them?

yes, but copying the folder/files from the data folder in your home directory over to /opt/crate_data should work.

you should make those changes, while the cluster is stopped.

Okay thank you ! I am kind of new to this so just wanted to know what this means “make sure to set
the owner to 'crate:crate’” in crate.yml?

you have to make sure, that crate has the appropriate permissions (read/write) the folder.
depending on which user you start crate with, you have to adapt that.

With the quick-start script I think crate typically should start with your logged in user and therefore that user should have sufficient rights.

1 Like