Virtuoso Open Source Upgrade Notes
==================================


Introduction
------------

Always make  sure the database has been properly shutdown and the
transaction log (virtuoso.trx) is empty before performing any of the
following updates/upgrades.

Before upgrading any database, it is always a wise precaution to make
a proper backup.


Upgrading from VOS 5.0.X to VOS 5.0.Y
-------------------------------------

The database format has not changed between various versions of Virtuoso
5.0.X, so from a database standpoint no particular steps need to be
performed before upgrading to the latest version of Virtuoso 5.

The only requirement is that you have properly shutdown the database
prior to installing the latest binaries, as the transaction logs can
have a different version tag. In this case the virtuoso server will
print the following message and refuses to start the database:

    The transaction log file has been produced by server version
    '05.00.XXXX'. The version of this server is '05.00.YYYY'. If the
    transaction log is empty or you do not want to replay it then delete
    it and start the server again. Otherwise replay the log using the
    server of version '05.00.XXXX' and make checkpoint and shutdown
    to ensure that the log is empty, then delete it and start using
    new version.


Upgrading from VOS 5.0.X to VOS 6.1.0
-------------------------------------

The database format has substantially changed between these two versions
of Virtuoso. To upgrade your database, you must dump all your data from
your VOS 5.0 database and re-load it into VOS 6.0.

Regular VOS 5.0 RDBMS tables can be dumped with the dbdump tool into
scripts that can be replayed using the isql tool into the VOS 6.0
database.

For VOS 5.0 RDF_QUAD table, we have a set of dump/load stored procedures
to dump graphs into a set of backup files, which can then be reloaded
into the VOS 6.0 database. Contact us at <vos.admin@openlinksw.com>
for more info.

If you attempt to start a VOS 5.0 database with a VOS 6.0 server, the 
server will print the following message ans refuses to start the
database:

    The database you are opening was last closed with a server of
    version 3016. The present server is of version 3126. This server
    does not read this pre 6.0 format.



Upgrading from VOS 6.0.0(-TP1) to VOS 6.1.0
-------------------------------------------

The database disk format has not changed, but the introduction of a newer
RDF index requires you run a script to upgrade the RDF_QUAD table. Since
this can be a lengthy task and take extra disk space (upto 2x space of
original RDF_QUAD table during conversion) this is not done automatically
on startup.

After upgrading the binary you cannot perform any SPARQL queries until
the new RDF_QUAD table is installed. The steps for this are:

  1. Shutdown the database and verify .trx file is empty

  2. Check to make sure you have enough disk space to perform operation

  3. Check to make sure you have a proper backup of the database

  4. Edit virtuoso.ini and disable VADInstallDir and possibly the
     HTTPServer section for duration of the upgrade.

  5. Start up the database

  6. Connect with isql to your database and run the libsrc/Wi/clrdf23.sql
     script. Depending on the number of quad records this can take
     several hours. Once the conversion is complete, the database 
     will shutdown itself.

  7. Edit virtuoso.ini and enable VADInstallDir and possibly HTTPServer
     section

  8. Start up database
