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.
  2. Start the Parasoft Database Service Windows service.
  3. Run the Windows batch file at <DTP_HOME>/bin/db_backup.cmd with the backup argument.
    Example: C:\Program Files\Parasoft\DTP\bin\db_backup.cmd backup

The batch file generates an 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.
  2. Start the Parasoft Database Service Windows service.
  3. Open a command prompt and run the db_backup.cmd Windows batch file located in the <DTP_HOME>/bin/ directory with the restore command and -d <SQL FILE> argument to restore the DTP database from the back up SQL file. 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 <DTP_HOME>/bin/dtpconsole.sh to open the DTP console
  2. Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
  3. Choose the 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 <DTP_HOME>/bin/dtpconsole.sh to open the DTP console.
  2. Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
  3. Exit the console and run the <DTP_HOME>/bin/db_backup_run.sh script file 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 <DTP_HOME>/bin/dtpconsole.sh to open the DTP console.
  2. Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
  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 <DTP_HOME>/bin/dtpconsole.sh to open the DTP console.
  2. Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
  3. Exit the console and run the <DTP_HOME>/bin/db_backup_run.sh script file with the restore command and -d <SQL FILE> argument to restores the DTP database from the SQL file. Example:
/home/tester/dtp/db/bin/db_backup_run.sh restore -d "/home/tester/DTP-Backup.sql"

Restoring the Embedded Database to an External Database Server

The following instructions describe how to import the DTP database from the embedded database server to an external MySQL database server. The database must already be constructed on the external server. See Database Settings for instructions for creating the database.

  1. Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
  2. In the command-line interface on the external server, execute the following mysql command:

    mysql -u <USERNAME> -p<PASSWORD> <DB> < <SQL FILE>
  3. Replace <USERNAME> and <PASSWORD> with your user credentials for the database and <DB> with the target database on the external server.
  4. Repeat Step 2 to import any other databases if necessary.
  • No labels