In this section:

Starting with DTP 2022.2, DTP no longer ships with an embedded database and the features described on this page are deprecated. Legacy users who wish to transition to using an external database should see Migrating an Embedded Database to an External Database.

Backing Up the Embedded Database for Windows

The following instructions describe how to back up the DTP database within the embedded database server to MySQL script files.

  1. Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services for more information.
  2. Start the Parasoft Database Service Windows service.
  3. Run the db_backup.cmd batch file in the <DTP_INSTALL>/bin/ directory with the backup argument. For example:

    C:\Program Files\Parasoft\DTP\bin\db_backup.cmd backup

    The batch file generates a SQL file called dtpDbBackup_<TIMESTAMP>.sql

Restoring the Embedded Database for Windows

  1. Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services for more information.
  2. Start the Parasoft Database Service Windows service.
  3. Open a command prompt and run the db_backup.cmd batch file located in the <DTP_INSTALL>/bin/ directory with the restore command and -d <SQL FILE> argument to restore the DTP database from the back up SQL file. For example:

    C:\Program Files\Parasoft\DTP\bin\db_backup.cmd restore -d "C:\DTP-Backup.sql"

Backing Up the Embedded Database for Linux

You can use one of the following methods to back up database.

Method 1: Using the DTP Console

  1. Run the dtpconsole.sh script in the <DTP_INSTALL>/bin/ directory to open the DTP console.
  2. Stop Parasoft DTP Server and Data Collector services. See Stopping DTP Services for more information.
  3. Choose Database (Embedded).
  4. Choose the Start option to start the Database (Embedded) service.
  5. Choose the Backup option to begin creating the database backups.

Method 2: Running the Back Up Script

  1. Run the dtpconsole.sh script in the <DTP_INSTALL>/bin/ directory to open the DTP console.
  2. Stop Parasoft DTP Server and Data Collector services. See Stopping DTP Services for more information.
  3. Exit the console and run the db_backup_run.sh script in the <DTP_INSTALL>/bin/ directory with the backup argument.

Both methods generate a dtpDbBackup_<TIMESTAMP>.sql file.

Restoring the Embedded Database for Linux

You can use of the following methods to restore the database.

Method 1: Using the DTP Console

  1. Run the dtpconsole.sh script in the <DTP_INSTALL>/bin/ directory to open the DTP console.
  2. Stop Parasoft DTP Server and Data Collector services. See Stopping DTP Services for more information.
  3. Choose the Database (Embedded).
  4. Choose the Start option to start the Database (Embedded) service.
  5. Choose the Restore DB option.
  6. Enter the DTP backup file path as requested. You can also leave the entry empty and press ENTER to skip this step.

Method 2: Running the Back Up Script

  1. Run the dtpconsole.sh script in the <DTP_INSTALL>/bin/ directory to open the DTP console.
  2. Stop Parasoft DTP Server and Data Collector services. See Stopping DTP Services for more information.
  3. Exit the console and run the db_backup_run.sh script <DTP_HOME>/bin/ directory with the restore command and -d <SQL FILE> argument to restores the DTP database from the SQL file. For example:

    /home/tester/dtp/db/bin/db_backup_run.sh restore -d "/home/tester/DTP-Backup.sql"

Migrating the Embedded Database to an External Database Server

If you have used DTP's embedded database and would like to switch over to an external database while preserving your current data, you can do so in a few easy steps. Your new, external database must be compatible with DTP's embedded database (see Requirements and Support for more information about supported databases) and, as a best practice, it is recommended that the external database be installed on a different machine than DTP.

  1. Stop all DTP services that are using the DTP Console. See Stopping DTP Services for more information.
  2. Back up the embedded database. See Backing Up the Embedded Database for more information.
  3. Install a MySQL database to use as the external database. To ensure compatibility with the embedded database, use the latest version of MySQL 5.7.
    • Be sure to set up a root account, which you will need for the next step.
    • It is recommended that you install your database on a different machine than DTP.
  4. Create the DTP database, "dtp" user, and schema using a root account for the new external database.

    mysql -u root -p < <DTP_HOME>/grs/db/dtp/mysql/create.sql
  5. When the process finishes, import the data from the embedded database backed up in Step 2 using the new "dtp" user. The default password for the "dtp" user is U%Cew2d6.

    mysql -u dtp -p DTP < <DTP_DATA>/db/backup/dtpDbExport_<TIMESTAMP>.sql
  6. Download the MySQL JDBC driver for your external database's version of MySQL and save it in the <DTP_DATA_DIR>/lib/thirdparty directory. It is recommended that you use the latest version of MySQL Java Connector.

  7. Edit the PSTRootConfig.xml file in the <DTP_DATA_DIR>/conf/ directory with the following changes:
    • Set embedded-db enabled to false.

      <embedded-db enabled="false"/>
    • Set the url value under <dtp-db-connection> to the URL, with both host and port, where the MySQL service is running.

      <dtp-db-connection>
      	...
      	<url>jdbc:mysql://<HOST>:<PORT>/DTP</url>
      </dtp-db-connection>
  8. In the DTP console, restart the DTP Server service and all other necessary services (for example, Data Collector and/or DTP Enterprise Pack). Do not restart the Embedded Database service.
  9. Once the DTP Server service is running again, log into DTP and verify DTP is working and that all data has persisted.
  • No labels