[ This article refers to an older version of SpiraTest/Team/Plan, for v6.0 and later the installer makes a full backup before upgrading and includes a built-in standalone database upgrade option ]

Background

When you run the Spira installer it has to do the following tasks:

  1. Backup the old version's database into a flat XML file format
  2. Uninstall the program files
  3. Install the new program files
  4. Create a new format database from the previously backed-up database

Where does the Installer Store its Files?

During the backup (step 1) and migration phases (step 4) the installer will use the C:\Users\[Username]\AppData\Local\Inflectra folder to store the flat XML files that contain the data from your database. If you don't have a lot of space on your C: drive, you can set the Windows environment variable TST_WORKING_FOLDER to a different folder that it will use instead:

set TST_WORKING_FOLDER=D:\MyFolder

What Happens if an Error Occurs During Database Upgrade

Sometimes during the installation if there is an error that prevents the migration being successful, you will get an error during the upgrade process.

If this happened on step 1 (the backup to XML phase) then the solution is easy, just address the error (e.g. provide more disk space, etc.) and retry the upgrade since your old database will still be in place.

If however the upgrade occurred during the migration phase (step 4) you will no longer have a working database, since it will have been partially migrated. However there will be a full copy of the XML files. So you can either:

  1. Delete the database, restore the old version from your backup and try the upgrade again
  2. Use the special standalone database upgrade tool to upgrade the database to v5.0 and then just do a clear install of Spira 5.0 and use this migrated database.

Attached to this KB article are zip files containing the different standalone database upgrade tools for various versions of Spira. Please download the version corresponding to the version of the system you are upgrading to and then unzip the folder.

Inside the unzipped folder will be a file called BuildCustomActions.exe, please click on that:
 


When it appears, enter in your database information, you will need the SQL Server SysAdmin (SA) account for this to work correctly:
 


Then click [Restore from XML] to restore your Spira SQL Server database from the backed-up XML files. Please make sure that a database with the same name does not already exist or it will fail.

How to do a Database Migration Standalone

Sometimes customers will want to do a test upgrade of their Spira database without actually upgrading their installation. This can be done very easily by taking a recent backup of their current Spira database and installing it on a test server. Then they can download and extract the Standalone Migration Tool attached to this article that matches the version of Spira that they want to upgrade to.

Then unzip the migration tool zipfile into a folder and run the contained BuildCustomActions.exe file:



Then enter in your SQL Server name / instance as well as a valid SQL Server login/password that has access to the database being upgraded as well as the ability to create new SQL Server databases on that server (we recommend the built-in SA login):



Now click [Backup to XML] to make a complete backup of the Spira database to XML.

Then delete the old version of the Spira database from your SQL Server instance.

Now click [Restore to XML] and the newer version of the Spira database will be created and populated with your data.

Advanced Settings

In addition to the ability to change the working directory to a different location, you can also customize the Page Size (i.e. number of rows) that is backed up at a time. If you get a timeout error doing the upgrade, it can be helpful to reduce this setting from its default value:

set TST_PAGE_SIZE=100000