Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to import or export an archive from the command line

Updated on September 10, 2021

You can export and import PegaRULES .zip archives by using a command-line utility. Exporting PegaRULES .zip archives from one system and importing them to another is useful for keeping multiple systems in sync and for restoring a ruleset version that has been deleted by mistake.

You can also schedule a process that runs at a specified time to automatically import or export an archive. For example, if you have two Pega 7 Platform systems that must be kept in sync, you can export from one system and import the resulting archive to the second system by using a custom script.

For instructions about how to import and export PegaRULES .zip archives prior to PRPC 6.1, see How to import and export .zip archives from a command line.

To import and export PegaRULES .zip archives, do the following tasks:

Editing the database connection properties

  1. Extract the contents of the Pega 7 Platform software distribution .zip file, PRPC_DistributionImage.zip, into a directory (referred to as <PEGA_HOME> in this example).
  2. In the <PEGA_HOME>/scripts/utils directory, open the prpcUtils.properties file, and edit the following database connection details in the COMMON PROPERTIES - DB CONNECTION (REQUIRED) section:
    • pega.jdbc.driver.jar – The full path to the JDBC driver JAR file.
    • pega.jdbc.driver.class – The Java class name of the JDBC driver.
    • pega.database.type – Select the database vendor from the list of supported vendors.
    • pega.jdbc.url – The connection URL for your database. Refer to the examples in the prpcUtils.properties file.
    • pega.jdbc.username and pega.jdbc.password – The user name and password to use when connecting to your database.
      Sample connection parameters

Sample connection parameters

Configuring and running the import tool

  1. In the <PEGA_HOME>/scripts/utils directory, open the prpcUtils.properties file and edit the SETTINGS FOR IMPORT TOOL section with the properties that apply to your import. For a description of the import properties, see prpcUtils properties and arguments.
  2. Optional: If your import must be performed as a particular user, set the pega.user.username and pega.user.password properties.
  3. From the command prompt, go to the <PEGA_HOME>/scripts/utils directory and run the prpcUtils.bat or prpcUtils.sh script:
    • For PRPC 6.3 or later, use the argument import
    • For PRPC 6.1-6.2, use one of the following arguments:
      • importPegaArchive – To import rule instances into the system
      • importCodeArchive – To import code instances into the system
      • importAppBundle – To import an application bundle into the system
  4. Review the log files in the <PEGA_HOME>/scripts/utils/logs directory to ensure that the import was successful.

Configuring and editing the export tool

  1. In the <PEGA_HOME>/scripts/utils/ directory, open the prpcUtils.properties file and edit the SETTINGS FOR EXPORT TOOL section with the properties that apply to your import. In this example, the rules in the ruleset versions GlobexInsurance:01-02-01 through GlobexInsurance:01-02-04 are included in the .zip archive.
    Sample export configurationSample export configuration
  2. From the command prompt, go to the <PEGA_HOME>/scripts/utils directory and run the prpcUtils.bat or prpcUtils.sh script.
  3. Review the log files in the <PEGA_HOME>/scripts/utils/logs directory to ensure that the export was successful.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us