Built-in database schema on disk is older than required for upgrade

Description

During an upgrade, the installer displays the following error prompt:

CloudBees CD is configured to use the built-in database. The built-in
database on disk has a schema intended for CloudBees CD version
, which is older than that needed by this CloudBees CD
 server. CloudBees CD does not support version upgrades of
the built-in database, so the CloudBees CD server cannot start. For
options to resolve this issue, see the "Troubleshooting" chapter of
the "CloudBees CD Installation Guide".

This problem occurs because starting with CloudBees CD version 8.0, CloudBees does not support upgrades from CloudBees CD versions that use HSQLDB. HSQLDB is the built-in (default) database that was replaced by MariaDB in CloudBees CD version 8.3 as the built-in database.

Workarounds

Because the HSQLDB database in CloudBees CD is not upgradeable, to work around this issue, you can either point to a supported database, wipe the database (if you do not need its contents), or migrate the database contents to a database supported by CloudBees CD.

Pointing to a supported database

To point to a different CloudBees CD-supported database, modify the database.properties file to point to that database.

Wiping the database contents

If you do not need the contents of the built-in database, complete the following steps:

  1. Back up the database.

    For details, see CloudBees CD Server Backups .

  2. Delete the files and folders whose names match the pattern:

    <DATA_DIR>/builtin/commander.*

Migrating the database contents to a supported database

If you do need the contents of the built-in database, complete the following steps:

  • Back up your <DATA_DIR>\builtin folder and your <DATA_DIR>\conf\database.properties, passkey, and keystore files (or simply back up the entire <DATA_DIR>\conf folder).

  • Reinstall the prior CloudBees CD version by using the following substeps:

    1. Uninstall the newer instance that is not working.

    2. Install the prior version again, which will use a new built-in database by default.

      If you installed the DevOps Insight server on the same system, you must use a different <INSTALL_DIR> and <DATA_DIR> for this CloudBees CD server installation.
    3. After the CommanderServer service starts (meaning that the plugins are installed and so on) and you can log into the installed version from substep b, stop the CommanderServer service.

    4. Back up the new <DATA_DIR>\builtin and <DATA_DIR>\conf folders and replace them with the folders that you backed up in step 1.

    5. Restart the new CommanderServer service. It should now use the original built-in database containing your data and should function properly.

  • Do a full export of the database contents.

    For details, see CloudBees CD Server Backups .

  • Switch to another production-quality database that CloudBees CD supports.

  • Do a full import of your data to the new database.

    For details, see CloudBees CD Server Restores .

  • Re-upgrade CloudBees CD.