Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Exporting Content from Solutions Repositories with Command-Line Tools

To export repository objects into XML format, using command-line tools instead of exporting repository configurations from within Spoon, use named parameters and command-line options when calling Kitchen or Pan from a command-line prompt.

The following is an example command-line entry to execute an export job using Kitchen:

    call kitchen.bat /file:C:\Pentaho_samples\repository\repository_export.kjb
    "/param:rep_name=PDI2000" "/param:rep_user=admin" "/param:rep_password=password"
    "/param:rep_folder=/public/dev"
    "/param:target_filename=C:\Pentaho_samples\repository\export\dev.xml"
   

Parameter

Description

rep_folder

Repository Folder

rep_name

Repository Name

rep_password

Repository Password

rep_user

Repository Username

target_filename

Target Filename

It is also possible to use obfuscated passwords with Encr, the command line tool for encrypting strings for storage/use by PDI. The following is an example command-line entry to execute a complete command-line call for the export in addition to checking for errors:

   @echo off
   ECHO This an example of a batch file calling the repository_export.kjb
   
   cd C:\Pentaho\pdi-ee-<filepath>--check--</filepath>{{contentVars.PDIvernum3}}>\data-integration
   
   call kitchen.bat /file:C:\Pentaho_samples\repository\repository_export.kjb "/param:rep_name=PDI2000"
   "/param:rep_user=admin" "/param:rep_password=password" "/param:rep_folder=/public/dev"
   "/param:target_filename=C:\Pentaho_samples\repository\export\dev.xml"
   
   if errorlevel 1 goto error
   echo Export finished successful.
   goto finished
   
   :error
   echo ERROR: An error occurred during repository export.
   :finished
   REM Allow the user to read the message when testing, so having a pause
   pause