In this section:
Backing Up the Embedded Database for Windows
The following instructions describe how to back up the GRS and DTP databases 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 two SQL files: dtpDbExport_<TIMESTAMP>.sql and grsDbExport_<TIMESTAMP>.sql. These files export the DTP and GRS databases, respectively.
Restoring the Embedded Database for Windows
- The following instructions describe how to restores the GRS and/or DTP databases in the embedded database server from MySQL script files generated during a backup.
- Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
- Start the Parasoft Database Service Windows service.
- Run the Windows batch file at <DTP_HOME>/bin/db_backup.cmd with the restore argument followed by one or both of the following arguments:
Use -d <SQL FILE>
to restore the DTP database from the provided SQL file.Use -g <SQL_FILE>
to restore the GRS database from the provided SQL file.
Examples:
C:\Program Files\Parasoft\DTP\bin\db_backup.cmd restore -g "C:\GRS-Backup.sql" C:\Program Files\Parasoft\DTP\bin\db_backup.cmd restore -d "C:\DTP-Backup.sql" C:\Program Files\Parasoft\DTP\bin\db_backup.cmd restore -d "C:\DTP-Backup.sql" -g "C:\GRS-Backup.sql"
Backing Up the Embedded Database for Linux
You can use one of the following methods to back up the GRS and DTP databases.
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 two SQL files:
- dtpDbExport_<TIMESTAMP>.sql
- grsDbExport_<TIMESTAMP>.sql.
These files export the DTP and GRS databases, respectively.
Restoring the Embedded Database for Linux
You can use of the following methods to restore the GRS and DTP databases.
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 and GRS backup file paths 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 argument followed by one or both of the following arguments:
- Use
-d <SQL FILE>
to restores the DTP database from the provided SQL file. - Use
-g <SQL_FILE>
to restores the GRS database from the provided SQL file.
- Use
Examples:
/home/tester/dtp/db/bin/db_backup_run.sh restore -g "/home/tester/GRS-Backup.sql" /home/tester/dtp/db/bin/db_backup_run.sh restore -d "/home/tester/DTP-Backup.sql" /home/tester/dtp/db/bin/db_backup_run.sh restore -d "/home/tester/DTP-Backup.sql" -g "/home/tester/GRS-Backup.sql"
Restoring the Embeded Database to an External Database Server
The following instructions describe how to import the GRS and/or DTP databases from the embedded database server to an external MySQL database server. The GRS and/or DTP database must already be constructed on the external server. See Preparing the Database Table Structure for instructions for creating the databases.
- 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.