The Stardog documentation has a Migration Guide that covers how to upgrade Stardog across major versions.
Upgrading major versions
Do not upgrade Stardog over multiple major versions at a time. In other words, if you need to upgrade from Stardog 8 to Stardog 10, upgrade first from Stardog 8 to Stardog 9, and then from Stardog 9 to Stardog 10.
Having multiple versions of Stardog installed
You can have multiple versions of Stardog installed at the same time. You do not need to uninstall versions you are no longer using.
How to do this
If you're installing Stardog manually
If you're installing Stardog from ZIP, your directory structure can look like like this:
# note the versions installed here are examples opt └── stardog ├── stardog-10.0.0 ├── stardog-8.1.0 ├── stardog-8.2.1 ├── stardog-8.2.2 ├── stardog-9.0.0 ├── stardog-9.0.1 └── stardog-9.1.1
This is as opposed to having the Stardog installation files directly in /opt/stardog
. Those files are located in the version folder for their respective installation.
If you've added the /bin
folder of the Stardog installation to your PATH, you'll need to edit this to account for this modified directory structure. In other words, if you wanted to use Stardog 10.0.0, your PATH would include /opt/stardog/stardog-10.0.0/bin
.
If you want to maintain multiple copies of your different servers, you'll need to keep multiple home directories. You can change the home directory you use by passing the --home
flag to the the stardog-admin server start
command or by changing the environment variable you have set for STARDOG_HOME.
If you merely want to upgrade and keep using the same home directory, see the Migration Guide linked at the top of this article.
If you're installing Stardog with an installer
You can merely change the name of the directory you're about to stop using from /opt/stardog
to /opt/stardog-X.Y.Z
, where X.Y.Z
is the old Stardog version. When you install the new version with your installer, it will be installed to /opt/stardog
, and that's the version your machine will use when you start Stardog.
If you want to change back to a previous version, rename /opt/stardog
to include its version number, and rename /opt/stardog-X.Y.Z
to /opt/stardog
. Note that changing to previous versions is only recommended if you're changing within major versions (e.g., from 10.0.1 to 10.0.0). Downgrading major versions is not recommended but is covered below.
Before changing versions in any capacity, please back up your data!
Downgrading
Downgrading Stardog across major versions is not recommended, for two reasons:
- Doing so can lead to loss of data.
- Your STARDOG_HOME directory from a higher version (e.g., Stardog 10) cannot be used for a lower version (e.g., Stardog 8). This is because the directory structure for STARDOG_HOME changes between versions.
Because of point 2, doing a downgrade requires a backup of a STARDOG_HOME directory that was created on the version you're trying to downgrade to. If you do not have this, downgrading is not possible.
If you have such a backup, you can downgrade as follows:
- Back up your STARDOG_HOME directory on the higher version.
- This will not enable your STARDOG_HOME directory to be used by the lower version, but it's good practice to make backups any time you make a major change.
- Copy the lower version backup of STARDOG_HOME to
/var/opt/stardog
(or wherever your home directory is configured). - Start Stardog on the downgraded version.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article