Creating a repository

GraphDB EE edition supports master and worker repositories. The master keeps a log of the recent transactions, while all workers keep a full copy of the repository data. For more information, see How GraphDB EE works.

Create a worker

There are two ways for creating and managing repositories, either through the Workbench interface, or by using the RDF4J console.

Using the Workbench

To manage your repositories, go to Setup -> Repositories. This opens a list of available repositories and their locations.

  1. Click the the Connect button next to the location you want to activate.

    _images/activate-location.png
  2. Click the Create new repository button or create it from a file by using the configuration template that can be found at configs/templates/.

    _images/createRepository.png
  3. Enter the Repository ID (e.g., repository1) and leave all other optional configuration settings with their default values.

    Tip

    For repositories with more than few tens of millions of statements, see the configuration parameters.

  4. Click the Create button. You newly created repository appears in the repositories list.

Using the RDF4J console

Note

Use the create command to add new repositories to the location that the console is connected to. This command expects the name of the template that describes the repository’s configuration.

  1. Run the RDF4J console application, which resides in the /bin folder:

    console.cmd (Windows)
    ./console (Unix/Linux)
    
  2. Connect to the GraphDB server instance using the command:

    connect http://localhost:7200.
    
  3. Create a worker using the command:
    create worker.
    
  4. Fill in the values of the parameters in the console.

  5. Exit the RDF4J console.

    quit.
    

Create a master

To create a master node follow the same procedure as the one for creating a worker. Just use repository type GraphDB EE Master if you create it through the workbench, or use the configuration template called master.ttl from the /templates folder, if you use the RDF4J console.

Initialise a master

  • If the machine where the master is installed has a GraphDB Workbench deployed, the latter will initialise the master.

  • If you are not using the RDF4J console for initialisation, you have to initialise the master yourself by either connecting to it in the Workbench or, if the machine where the master is installed does not have a GraphDB Workbench deployed, by executing the command:

    curl http://localhost:7200/repositories/masterID/size
    

This operation ensures that the master appears in the JMX interface.

Manage repositories

Select a repository

  • Connect the newly created repository to the active location.

    _images/connect_to_repo.png
  • Alternatively, use the dropdown menu in the top right corner. This allows you to easily change the repository while running queries as well as importing and exporting data in other views.

    _images/selectRepository.png

Make it a default repository

Use the pin to select it as a default repository.

_images/default-repo-pin.png

Edit a repository

To edit or download the repository configuration as a turtle file, copy its URL, or delete it, use the icons next to its name.

_images/repo-actions.png

Warning

Once a repository is deleted, all data contained in it is irrevocably lost.