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.
The following instructions describe how to back up the DTP database within the embedded database server to MySQL script files.
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.
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" |
You can use one of the following methods to back up database.
<DTP_INSTALL>/bin/
directory to open the DTP console.<DTP_INSTALL>/bin/
directory to open the DTP console.<DTP_INSTALL>/bin/
directory with the backup
argument.Both methods generate a dtpDbBackup_<TIMESTAMP>.sql file.
You can use of the following methods to restore the database.
<DTP_INSTALL>/bin/
directory to open the DTP console.<DTP_INSTALL>/bin/
directory to open the DTP console.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" |
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.
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 |
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 |
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.
<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> |