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.

  1. Stop Parasoft DTP Server and Data Collector services, see Backing Up the Embedded Database.
  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 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

  1. 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.
  2. Stop Parasoft DTP Server and Data Collector services, see Stopping DTP Services.
  3. Start the Parasoft Database Service Windows service.
  4. 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

  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 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

  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 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

  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 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.

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.

  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