Transferring Metadata using WLST
To use WLST to transfer metadata:
- Export the metadata from the original partition using the
exportMetadata
command:
exportMetadata(application='sampleApp', server='server1',
toLocation='/tmp/myrepos/mypartition', docs='/**')
This command exports a versioned stripe of the metadata documents from the metadata partition to a file system directory. Only customization classes declared in the cust-config element of adf-config.xml are exported. If there is no cust-config element declared in adf-config.xml, all customization classes are exported.
To export all customizations, use the option restrictCustTo="%".
- If the production application is on a different system, copy the exported metadata to that system.
- Import the metadata to the other partition using the WLST
importMetadata
command:
importMetadata(application='sampleApp', server='server1',
fromLocation='/tmp/myrepos/mypartiton', docs='/**')
The value of the fromLocation
parameter must be on the same system that is running WLST or on a mapped network drive or directory mount. You cannot use direct network references such as \\mymachine\repositories\
.
Only customization classes declared in the cust-config element of adf-config.xml are imported. If there is no cust-config element declared in adf-config.xml, all customization classes are imported.
To import all customizations, use the option restrictCustTo="%".