Presto Administration : Presto Server Administration : Deploying Presto Instances, Clusters or Artifacts : Exporting Macros
Exporting Macros
Exporting macros exports their metadata from one Presto Repository to a file. You can then import this file to another Presto Repository.
Typically, you export and import macros along with the mashups that use them to move new mashups to production or to replicate data for a new instance of the Presto Server. You can also use export and import for macros to make new custom blocks available in Wires for other instances of the Presto Server.
1. If it is not running, start the Presto Server for the Presto Repository that is the source for the macros that you wish to export. See Start and Stop the Presto Server for instructions.
2. Open a command window and move to the presto-install/prestocli/bin folder.
3. Enter this command:
padmin exportEmmlMacro -f output-file
[-d domain -g -n macroName -l prestoURL]
-u username -w password
[-v]
*-f output-file: is the path and name of the export file to hold the metadata.
*-d domain: the macro domain containing the macro(s) to export. The domain value can be:
*all or ALL = export all macros in all domains from this Presto Repository. This omits global macros.
*domain-name is the name of one specific domain that contains the macro(s) you want to export.
Note:  
This option is mutually exclusive with the -g option.
If neither -d or -g as specified, all macros are exported.
*-g: to export global macro(s). If no macro name is included with the -n option, this exports all global macros and omits macros in any custom domain.
Note:  
This option is mutually exclusive with the -d option.
If neither -d or -g as specified, all macros are exported.
*-n macroName: the name of the specific macro to export. You must also specify the domain for this macro with the -d option or use the -g option if this is a global macro.
*-l prestoUrl: is optional. Use this if the Presto Server is remote or if it is not running in Tomcat on the default Tomcat port. If you omit this option, this defaults to http://localhost:8080/presto/edge/api.
*-u username: is the Presto username to log in with. This account must have Presto administrator permissions.
*-w password: is the Presto password to log in with.
*-v: is an optional flag to turn on verbose logging.
General messages and errors from the export process are sent to the command window (stdout). Messages for specific artifact failures are included in the export file in <FailedExport> elements. Once the export command completes successfully, you can use the output file to import macros to another Presto Repository.
Examples
The combinations of the -d, -g and -n options give you precise control of the macros you want to export. This example exports all macros, both global and custom domains, from the Presto Server in the local host to a file named allMacros.xml:
padmin exportEmmlMacro -f allMacros.xml -u Administrator -w manage
This next example export the macros from the Presto Server at presto12.myorg.com:8080 in the domain named Finance:
padmin exportEmmlMacro -f financeMacros.xml -d Finance -l presto12.myorg.com:8080 -u Administrator -w manage
This example exports all macros in custom domains from the Presto Server in the local host:
padmin exportEmmlMacro -f domainMacros.xml -d ALL -u Administrator -w manage
While this example exports all global macros from the same Presto Server:
padmin exportEmmlMacro -f globalMacros.xml -g -u Administrator -w manage
This final example exports the global macro named computeBasicAuth:
padmin exportEmmlMacro -f basicAuthMacro.xml -g -n computeBasicAuth -u Administrator -w manage
Copyright © 2006-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback