Last active
August 29, 2015 13:57
-
-
Save mblakele/9451610 to your computer and use it in GitHub Desktop.
Use the task server to migrate a forest.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
import module namespace ts="http://marklogic.com/xdmp/tieredstorage" | |
at "/MarkLogic/tieredstorage.xqy"; | |
xdmp:spawn-function( | |
function() { | |
ts:forest-migrate( | |
xdmp:forest("my-forest"), | |
xdmp:host(), | |
'/media/xvdg/mldata', | |
(), | |
(), | |
(: Make sure the timeout is long enough to copy all data. | |
: Also make sure the Task Server time limit is long enough. | |
:) | |
("timeout=7200")) }, | |
(: Must start the task in update mode, to avoid XDMP-UPDATEFUNCTIONFROMQUERY :) | |
<options xmlns="xdmp:eval"> | |
<transaction-mode>update</transaction-mode> | |
</options>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment