Search code examples
graphdb

how to add a new repository outside graphdb.home


I am cloning a large public triplestore for local development of a client app.

The data is too large to fit on the ssd partition where <graphdb.home>/data lives. How can I create a new repository at a different location to host this data?


Solution

  • GraphDB on startup will read the value of graphdb.home.data parameter. By default it will point to ${graphdb.home}/data. You have two options:

    Move all repositories to the big non-SSD partition

    You need to start graphdb with ./graphdb -Dgraphdb.home.data=/mnt/big-drive/ or edit the value of graphdb.home.data parameter in ${graphdb.home/conf/graphdb.properties.

    Move a single repository to a different location

    GraphDB does not allow creating a repository if the directory already exists. The easiest way to work around this is to create a new empty repository bigRepo, initialize the repository by making at least a request to it, and then shutdown GraphDB. Then move the directory $gdb.home/data/repositories/bigRepo/storage/ to your new big drive and create a symbolic link on the file system ln -s /mnt/big-drive/ data/repositories/bigRepo/storage/

    You can apply the same technique also for moving only individual files.

    Please make sure that all permissions are correctly set by using the same user to start GraphDB.