Downgrading TestRail

This guide explains how to downgrade an existing TestRail Server installation to an older version. We will show you how to downgrade from a working installation of TestRail, and how to downgrade from a failed installation.

The guide assumes an installation directory of /var/www/html/testrail, and that all installation prerequisites have been satisfied.

Limitations for downgrades

Downgrades are only available from TestRail version 6.7.2 and later. This means that it is only possible to downgrade to 6.7.2 or above, using the instructions below. Please also note that due to the introduction of Cassandra as a required installation component from TestRail 7.1 onwards, the following downgrade paths are not supported:

  • 7.x to 7.0 or lower

 

Downgrading between TestRail versions may result in the permanent loss of data related to newer features in the event that you attempt to re-upgrade your instance in the future. Make sure to backup your production DataBase before attempting the downgrade.

If you downgrade from a Casssandra version to a pre-Cassandra version please use a Migration script to move attachments from Cassandra to SQL database – rollback process (-b parameter).

SQLServer Database

$ cd migration_script (folder in TestRail application)
$ php ./TestRailSqlToCassandraMigration.php -d9 -b 
-m"driver=sqlsrv;host=localhost;port=1433;database=testrail;
user=testrail;password=123456789" 
-s"host=localhost;port=9042;keyspace=testrail;user=cassandra;
password=cassandra"

MySQL Database

$ cd migration_script (folder in TestRail application)
$ php ./TestRailSqlToCassandraMigration.php -d9 -b 
-m"driver=sqlsrv;host=localhost;port=1433;database=testrail;
user=testrail;password=123456789" 
-s"host=localhost;port=9042;keyspace=testrail;user=cassandra;
password=cassandra"

Working Installation

  1. Move your existing TestRail installation directory to another location; e.g. /var/www/html/testrail_backup.
  2. Download the TestRail version you wish to downgrade to (6.7.2 or later).
  3. Unpack the TestRail archive to /var/www/html/testrail.
  4. Copy the config.php file from your backed-up TestRail version (e.g. /var/www/html/testrail_backup/config.php) to the /var/www/html/testrail folder.
  5. Navigate to the TestRail instance in your browser. The Update wizard will be displayed.
  6. Click on Update.

Failed Installation

  1. Move the current main directory to e.g. /var/www/html/testrail_failed
  2. Download the TestRail version you wish to downgrade to (6.7.2 or later).
  3. Unpack the TestRail archive to /var/www/html/testrail
  4. Copy the config.php file from your failed TestRail version (e.g. /var/www/html/testrail_failed/config.php) to /var/www/html/testrail folder
  5. IMPORTANT! Copy all the files from /var/www/html/testrail_failed/db/migrations into /var/www/html/testrail/db/migrations 
  6. Visit TR URL in the browser, you’ll be redirected to the updater
  7. Click on Update.
Was this article helpful?
9 out of 13 found this helpful