Exporting App MetaData
Exporting apps exports both metadata and any associated files including screen captures, thumbnails, HTML files, JavaScript files, CSS files, image files or any other file define in the App Specification for that app.
This includes basic and custom apps as well as apps that have been published to the AppDepot. Export also exports any apps used in workspace apps that are being exported and, optionally, can export other artifacts that an app depends on.
Export creates an export file that you can then use to import apps to another Presto Repository. Typically, you export and import apps to move new apps to production or replicate data to a newly deployed Presto Server.
1. If it is not running, start the Presto Server for the Presto Repository that is the source for the apps 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 exportApps -q filter [-f output-file -l prestoURL]
-s -u username -w password [-v] [-o]
-q filter: defines which apps to export. The filter can be:
"all" to export all apps from this
Presto Repository. You can also use
"ALL" or
"*".
"author=list-of-owner-ids", the user ID for a specific user or a list of comma-separated user IDs. This exports apps created by those users.
"category=list-of-categories", a specific category or a list of comma-separated categories. This exports apps with those categories. Apps with no category are not included.
"ids=list-of-app-ids", a specific app ID or a list of comma-separated app IDs. This exports those specific apps.
"mine", to export all apps that were created by the user identified by the credentials used to execute this command (in the
-u option).
"provider=list-of-providers", a specific provider or a list of comma-separated providers. This exports apps with those providers. Apps with no provider are not included.
"tag=list-of-tags" , a specific user-defined tag or a list of comma-separated tags. This exports apps with those tags. Apps with no tags are not included.
-f output-file: an optional path and name for the export file to put app data into. If omitted, this generates an output file in the folder where this command is executed with a name of either:
app-export-yymmdd-hhmm.xml app-export-yymmdd-hhmm.zip Important: | Exporting apps on Linux systems can fail with an error that the output file cannot be created. To avoid this error, specify an output file in the tmp folder for your account, such as: -f /users/userA/tmp/my-apps-export.xml |
If you supply a path and file name, the export file is created with the name you specify, except for the file extension. If the apps you export do not have any screen captures, thumbnails or any other associated files (such as JavaScript), then the export file extension is XML.
If any of the apps you export have screen captures, thumbnails or other associated files, then the export file has a ZIP extension. This archive contains both the XML export file and all of the associated files for those apps that have them.
This file must not already exist, unless you also use the -o option.
-o: an optional flag to allow export information to overwrite an existing export file. If you omit this option, the output file must not already exist.
-s: an optional flag to also export any mashables or mashups that are used by an app that is being exported.
-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.
Messages and errors from the export process are sent to the command window (stdout). Once the export command completes successfully, you can use the output file to import apps to another Presto Repository.