Skip to main content
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.
LinkedIn
Copied!

How to import or export an archive from the command line

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.
Suggest Edit
Did you find this content helpful?

50% found this useful

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us