In this section:
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.
- Stop Parasoft DTP Server and Data Collector services, see Backing Up the Embedded Database.
- Start the Parasoft Database Service Windows service.
- 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 dtpDbExport_<TIMESTAMP>.sql.
Restoring the Embedded Database for Windows
- Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
- Start the Parasoft Database Service Windows service.
- 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
- Run <DTP_HOME>/bin/dtpconsole.sh to open the DTP console
- Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
- Choose the Database (Embedded)
- Choose the Start option to start the Database (Embedded) service
- Choose the Backup option to begin creating the database backups
Method 2: Running the Back Up Script
- Run <DTP_HOME>/bin/dtpconsole.sh to open the DTP console.
- Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
- Exit the console and run the <DTP_HOME>/bin/db_backup_run.sh script file with the backup argument.
Both methods generate a dtpDbExport_<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
- Run <DTP_HOME>/bin/dtpconsole.sh to open the DTP console.
- Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
- Choose the Database (Embedded).
- Choose the Start option to start the Database (Embedded) service.
- Choose the Restore DB option.
- 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
- Run <DTP_HOME>/bin/dtpconsole.sh to open the DTP console.
- Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
- 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 Embeded 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 Preparing the Database Table Structure for instructions for creating the database.
- Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
In the command-line interface on the external server, execute the following mysql command:
mysql -u <USERNAME> -p<PASSWORD> <DB> < <SQL FILE>
- Replace
<USERNAME>
and<PASSWORD>
with your user credentials for the database and <DB> with the target database on the external server. - Repeat Step 2 to import any other databases if necessary.