-1

I am trying to make an instance of GraphDB on Docker. After creating the instance, I need to make a repository to import the data to the instance. However, when I make a repository, it says that the repository does not exist. When I use the loadrdf command to import data I receive an error regarding that the repository does not exist.

dist/bin/loadrdf -f -i repo-test -m parallel /opt/graphdb/home/data/*.ttl

shkhb
  • 1

1 Answers1

0

The default data location of GraphDB is the data sub-directory of GraphDB's home directory, which in turn defaults to the distribution directory.

For the docker image this is /opt/graphdb/dist, so the default data directory is /opt/graphdb/dist/data.

But also in the docker image the default home is changed to /opt/graphdb/home, so the data directory becomes /opt/graphdb/home/data. This is done by passing the -Dgraphdb.home=/opt/graphdb/home java option when starting GraphDB.

So, when you created your repository it was created at /opt/graphdb/home/data/repositories/repo-test.

Your problem is that the loadrdf tool doesn't know about the changed home directory. To overcome this try exporting the GDB_JAVA_OPTS variable with value -Dgraphdb.home=/opt/graphdb/home before running loadrdf, or as a one-liner:

GDB_JAVA_OPTS='-Dgraphdb.home=/opt/graphdb/home' ./dist/bin/loadrdf -f -i repo-test -m parallel /opt/graphdb/home/data/*.ttl

yasko
  • 357
  • 3
  • 13