pkg:revert( $ticket-id as xs:string ) as pkgins:revert($ticket)
[DEPRECATED: use cma:generate-config
and
cma:apply-config
instead.]
Parameters | |
---|---|
ticket-id |
The id of a ticket created by a previous successful call to
pkg:install .
|
Reverting a package installation restores all settings to their state
at the time ticket was created by calling pkg:install
.
If other configuration changes are applied between the successful
install and the attempt to revert, those changes are lost.
Successful calls to pkg:install
create a ticket
associated with the configuration changes. Use the revert-uri returned by
pkg:install
to revert the changes.
Reverting an installed package does not remove any forests associated with databases that are removed.
xquery version "1.0-ml"; import module namespace pkg = "http://marklogic.com/manage/package" at "/MarkLogic/manage/package/package.xqy"; (: install a package :) pkg:install("mypackage"); (: Produces the following for some previously saved pkg: <install-status xmlns="http://marklogic.com/manage/package"> <success>true</success> <restart>false</restart> <ticket-id>/tickets/17841336193093321431</ticket-id> <revert-uri>/manage/v2/tickets/17841336193093321431/revert</revert-uri> </install-status> :) (: revert the above install :) import module namespace pkg = "http://marklogic.com/manage/package" at "/MarkLogic/manage/package/package.xqy"; pkg:revert("/tickets/ticket/17841336193093321431") => The changes applied by the package are reverted: <pkg:revert-status xmlns:pkg="http://marklogic.com/manage/package"> <pkg:success>true</pkg:success> <pkg:restart>false</pkg:restart> <pkg:ticket-id>/tickets/ticket/5620889718989064792</pkg:ticket-id> <pkg:revert-uri>/manage/v2/tickets/5620889718989064792/revert</pkg:revert-uri> </pkg:revert-status>