TestRail Server Cassandra Data Migration for Docker for Windows and Linux

Starting with TestRail Server 9.4, attachment storage will transition from Cassandra to Microsoft SQL Server or MySQL. The 9.4 update includes a supported migration script that allows you to copy your existing attachments from Cassandra to MS SQL Server or MySQL. Your original Cassandra data will remain intact. 

Note: If you're already using TestRail 8.1, you won't need to follow the steps below. However, you will need to manually edit config.php to remove any Cassandra-related details. Additionally, please verify that TestRail is operating in SQL-only mode by checking the settings table:

  • primary_attachment_db should be set to "sql"
  • attachments_to_both_dbs should be set to "0"

You may run the migration at your own pace. However, starting with the following release (TestRail 9.5), completion of the migration will be required to upgrade. Customers who have not completed the migration will be unable to install TestRail 9.5 and all future updates until the migration is complete.

If you prefer not to migrate, you may continue using your current version. Please note that TestRail Server support covers the past two years of active releases, so remaining current ensures continued access to support and security updates.

If you would like to proceed, here are step-by-step instructions:

  1. Get CONTAINER ID of
    testrail/apache:version
  2. Enter directory /var/www/testrail/deprecation_script
  3. Install composer with the command:
    curl -sS https://getcomposer.org/installer -o composer-setup.php && HASH=$(curl -sS https://composer.github.io/installer.sig) && php -r "if (hash_file('sha384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); exit(1); } echo PHP_EOL;" && php composer-setup.php --install-dir=/usr/local/bin --filename=composer && rm composer-setup.php && composer --version
  4. Install nano to edit config.ini file, with the command:
    https://getcomposer.org/installer -o composer-setup.php && HASH=$(curl -sS https://composer.github.io/installer.sig) && php -r "if (hash_file('sha384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); exit(1); } echo PHP_EOL;" && php composer-setup.php --install-dir=/usr/local/bin --filename=composer && rm composer-setup.php && composer --version
  5. Install nano to edit config.ini file, with the command:
    apt update && apt install nano -y
  6. Run composer update command to install dependencies
  7. Edit config.ini file to fill credentials with Nano , it should look like this, make sure to change to password you have inside .env file
    [SQL] 
    host = db 
    databaseName = testrail 
    user = testrail 
    password = 123456789 
    port = 3306 
    driver = mysql 
    
    [CASSANDRA] 
    host = cassandra 
    databaseName = 
    user = cassandra 
    password = cassandra 
    port = 9042 
    keyspace = testrail 
    
    [ATTACHMENT] 
    path = /opt/testrail/attachments/
  8. Run Deprecation script with the command:
    php TestRailCassandraDeprecation.php
  9. Or force deprecate it with the command:
    php TestRailCassandraDeprecation.php --force-deprecation
Was this article helpful?
3 out of 33 found this helpful