packageexport(4.1)

usage: packageexport -select <xml-selection file> [ -overwrite ]<base path> <package name> <package version> [password]
or
usage: packageexport -packages <xml-package file> [ -overwrite ]<base path> [password]

This command exports /wiki/spaces/DRXXE/pages/6197866 from  to an MZP file located in the specified <base path>. As this command is available only to the mzadmin user, all the entries are exported, regardless of their access permissions.

Note!

A package is a Workflow Package. That is, <package name> and <package version> refer to the Workflow Package name and version.

This command's output log information is displayed during the command execution. Although no log file is generated, you can view log information in the shell and save it to file.

[-select]

Specify the name of the Selection file that you want to use. For information about this parameter, see XML Selection File (under the -select <xml-selection file> option) in systemimport.

You must provide <xml-selection file>, <base path>, <package name> and <package version>. Example:

packageexport -select <xml-selection file> [ -overwrite ]<base path> <package name> <package version>
packageexport -select /Users/username/Downloads/export.xml /Users/username/mz10-la3-rc6/tmp myPackage 1.0
<base path>

The path to the directory where your MZP files will be saved. This parameter is compulsory.  

<package name>The name of the Workflow Package. When using [-select], <package name> is compulsory.
<package version>The version of the Workflow Package. When using [-select], <package version> is compulsory. 

[-overwrite]

Use this option to specify that the export - file or directory - should be overwritten. Example:

packageexport -packages /Users/username/Downloads/export.xml -overwrite /Users/username/mz10-la3-rc6/tmp
[-packages]

Use -packages to specify multiple packages. Specify the name of the Workflow Package and version in the XML file, or select a specific folder. Several items can be selected. See XML Selection File (under the -select <xml-selection file> option) in systemimport for how to handle configurations or Workflow Packages.


Examples - packages and XML file
mzcli packageexport -packages packages.xml /tmp/PE --password <password>

Where packages.xml looks like this:

<pipeline> 
    <packages> 
        <package name="TcpBased" version="1.1"> 
            <configurations> 
                <configuration foldername="TCP_Based"/> 
            </configurations> 
        </package> 
        <package name="HttpDemo" version="1.0"> 
            <configurations> 
                <configuration foldername="HttpDemo"/> 
            </configurations> 
        </package> 
    </packages> 
</pipeline>

Note!

The resolveDependencies attribute is always set to true for the packageexport command.

[password]

To export encrypted configurations, provide a password.

Return Codes

Listed below are the different return codes for the packageexport command:

CodeDescription

0

Returned if the command was successful.

1

Returned if the argument count is incorrect or if the export fails.

2

Returned if the output directory exists, if write permission is missing, or if the directory cannot be created for any other reason.

3

Returned if the XML selection file cannot be read.

4

Returned if any errors were reported during export.