GraphDB-SE Storage Tool

Skip to end of metadata
Go to start of metadata
This documentation is NOT for the latest version of GraphDB.

Latest version - GraphDB 7.1

GraphDB Documentation

Next versions

GraphDB 6.6
GraphDB 7.0
GraphDB 7.1

Previous versions

GraphDB 6.4
GraphDB 6.3
GraphDB 6.2
GraphDB 6.0 & 6.1

OWLIM 5.4
OWLIM 5.3
OWLIM 5.2
OWLIM 5.1
OWLIM 5.0
OWLIM 4.4
OWLIM 4.3
OWLIM 4.2
OWLIM 4.1
OWLIM 4.0

Storage Tool

The Storage Tool is a small app for scanning & repairing a GraphDB repository.
The tool is available since GraphDB 6.1 (only for SE editions) and works only on repository images that are not in use (i.e. the Tomcat is stopped).
Let's assume that the GraphDB is already deployed into a folder like /home/username/dev/tomcat/webapps/openrdf-sesame. The example code below assumes that the current dir is /home/username/dev/tomcat/webapps/openrdf-sesame/WEB-INF, then we can use a relative path in the java -cp option.

the output is the man page for the tool set:

Usage:
java -jar ... StorageTool --help ==> prints this message
java -jar ... StorageTool <options> ==> executes the command from the options
Options:
-command=<operation to be executed, MANDATORY>
-storage=<absoluth path to repo storage dir, MANDATORY>
-esize=<size of entity pool IDs: 32 or 40 bits, DEFAULT 32>
-statusPrintInterval=<interval between status message printing, DEFAULT 30, means 30 seconds>
-pageCacheSize=<size of the page cache, DEFAULT 10, means 10K elements>
-sortBufferSize=<size of the external sort buffer, DEFAULT 100, means 100M elements>
-srcIndex=<one of pso, pos, pcso, pcos>
-destIndex=<one of pso, pos, pcso, pcos, predicates>
-origURI=<original existing URI in the repo>
-replURI=<new non-existing URI in the repo>
-destFile=<path to file used to store exported data>
Supported commands:
  • scan - scan repo index(es) and print statistics about number of statements and repo consistency
  • rebuild - use source index (srcIndex) to rebuild destination index (destIndex). If srcIndex=destIndex, compact destIndex. If srcIndex is missing and destIndex= predicates, just rebuild destIndex
  • replace - replace an existing entity (-origURI) with a non-existing one (-replURI)
  • repair - repair repo indexes and restore data, better variant of the merge index
  • check - check all indexes (or -srcIndex) for consistency, and scan for corrupt statements. A statement is corrupt if one of its parts (s,p,o,c) is not present in the entity pool
  • export - use source index (srcIndex) to export repo data into destination file (destFile). Supported destination file extensions (formats): .trig .ttl .nq
Examples:
  • scan repo, print statement statistics and repo consistency status
-command=scan -storage=/repo/storage
  • scan pso index of 40bit repo, print status message every 60 seconds
-command=scan -storage=/repo/storage -srcIndex=pso -esize=40 -statusPrintInterval=60
  • compact pso index (self-rebuild equals compacting)
-command=rebuild -storage=/repo/storage -esize=40 -srcIndex=pso -destIndex=pso
  • rebuild pos index from pso index and compact pos
-command=rebuild -storage=/repo/storage -esize=40 -srcIndex=pso -destIndex=pos
  • rebuild predicates statistics index
-command=rebuild -storage=/repo/storage -esize=40 -destIndex=predicates
-command=replace -storage=/repo/storage -origURI=<http://onto.com#e1> -replURI=<http://onto.com#e2> 
  • check pos consistency and additionally scan it for corrupt statements
-command=check -storage=/repo/storage -srcIndex=pos
  • dump repo data using pos index into f.trig file
-command=export -storage=/repo/storage -srcIndex=pos -destFile=/repo/storage/f.trig
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.