Changing the database server

Use information in this topic to:

  • Switch from the built-in database to an alternate database.

    A CloudBees Flow enterprise license is required to configure an alternate database.
  • Switch from the current alternate database to a different alternate database.

For information about supported alternate databases, see Database Requirements.

To change to the built-in database, see Switching from an Alternate Database to the Built-In Database.

The export and import commands are used to do perform the major tasks when migrating data from one database to the other. These are CloudBees CD API commands to export/import database contents into an XML file.

Switching databases

Disable server activities

Before you perform an export, ensure that the CloudBees CD server is inactive—​meaning that it cannot accept jobs—​by completing the following actions on the server:

  • Disable the ECSCM:SentryMonitor schedule and all project schedules.

    1. From the main menu, navigate to the Platform Home Page.

    2. Select Electric Cloud from the Projects tab.

    3. Select the Schedules tab and disable all schedules, including the ECSCM-SentryMonitor schedule that runs the ECSCM:ElectricSentry procedure.

  • Make sure all jobs are stopped.

    1. From the main menu, navigate to the Platform Home Page.

    2. Select the Jobs tab.

    3. Review the jobs list and take action to stop all jobs.

  • Disable all resources so that no new job steps can run.

    1. From the main menu, navigate to the Resources list.

    2. Disable each resource by clearing its state from the Enabled column.

A quiescent database ensures a complete XML database file is exported.

Move the data

  1. Export your data from the existing database. This command can be run from anywhere, but the file is stored on the CloudBees CD server file system.

    ectool export <filename> --compress 1 --withAcls true --withNotifiers true
  2. Set the database configuration using the web interface or ectool. For more information, see Configuring CloudBees CD to Use an Alternate Database .

  3. Restart the CloudBees CD server:

    ectool shutdownServer --restart 1
  4. Import your data to the new database:

    ectool import <filename> --force 1
  5. Reverse steps taken in Disable server activities to enable server activities.