Updating Repositories When Upgrading Knora

When a new version of Knora introduces changes that are not backwards-compatible with existing data, you will need to update your repository. First, back up your repository. Then follow the instructions below for the Knora version that you are upgrading from.

Upgrading from Knora 7.0.0 or Later

Automatic Upgrade

The automatic upgrade procedure dumps your repository to a file, determines which transformations are needed, transforms the file, then loads the transformed file back into the repository. To perform an automatic upgrade, open a shell in the directory upgrade/graphdb-se and run the script ./auto-upgrade.sh. You must be in that directory when you run the script. For information on its command line options, run it without arguments, or see the README.md in that directory for details.

Manual Upgrade

If you need more control over the process (e.g. you want to use GraphDB’s LoadRDF tool to upload the transformed file), follow the steps below.

1. Dump the Repository to a TriG File

You can use the dump-repository.sh script in upgrade/graphdb-se. See the README.md there for instructions.

2. Transform the TriG File

In the knora-api directory of the version of Knora you are upgrading to, run:

sbt "upgrade/run INPUT_FILE OUTPUT_FILE"

For INPUT_FILE, use the absolute path of the TriG file you downloaded in step 1.

For OUTPUT_FILE, use the absolute path of the transformed TriG file to be created.

The program automatically determines which transformations are needed. If the repository is already up to date, the program will say so, and no output file will be written. In this case, there is nothing more to do. Otherwise, proceed to step 3.

3. Empty the Repository

The transformed TriG file must be loaded into an empty repository. To empty the repository, you can use the empty-repository.sh script in upgrade/graphdb-se. See the README.md there for instructions. Make sure you have backed up the repository first.

4. Load the Transformed TriG File into the Repository

You can use the upload-repository.sh script in upgrade/graphdb-se. See the README.md there for instructions.

If the file is very large, it may be more efficient to load it offline, using GraphDB’s LoadRDF tool.

Upgrading from a Knora Version Before 7.0.0

First, read the general instructions in upgrade/graphdb-se/old/README.md.

Upgrading from Knora 6.0.0 or 6.0.1

  1. Follow the instructions in upgrade/graphdb-se/old/1263-knora-admin/README.md.

  2. Follow the instructions in Upgrading from Knora 7.0.0 or Later.

Upgrading from Knora 5.0.0

  1. Follow the instructions in upgrade/graphdb-se/old/1211-datetime/README.md.

  2. Follow the instructions in upgrade/graphdb-se/old/1230-delete-previews/README.md.

  3. Follow the instructions in upgrade/graphdb-se/old/1263-knora-admin/README.md.

  4. Follow the instructions in Upgrading from Knora 7.0.0 or Later.