MarkLogic Server 11.0 Product Documentation
tieredstorage:forest-migratetieredstorage:forest-migrate(
$forest-ids as xs:unsignedLong*,
[$new-host-id as xs:unsignedLong?],
[$new-data-directory as xs:string?],
[$new-large-data-directory as xs:string?],
[$new-fast-data-directory as xs:string?],
[$options as xs:string*]
) as empty-sequence()
Summary
This function moves data in a forest to new data
directories and optionally sets new host for the forest. If no data
directory is specified, the default data directory will be used.
For details, see Migrating Forests and Partitions in the Administrator's Guide.
Parameters |
forest-ids |
IDs of the forests to migrate.
|
new-host-id |
ID of the destination host.
|
new-data-directory |
The optional data directory of the forest. If no directory
is specified, then it will be a private forest.
|
new-large-data-directory |
The optional directory where large objects are stored. If no directory
is specified, then large objects will be stored in
DATA_DIR/Forests/FOREST_NAME/Large.
|
new-fast-data-directory |
The optional directory for the fast data directory for this forest.
The fast data directory is typically located on a fast storage device,
such as an SSD.
|
options |
Valid option values include:
timeout=N -
Specifies the number of seconds to wait for a forest to re-open after a
configuration is made during the migration operation.
local-to-local -
Indicates that the migration is between local storage to local storage.
This is the default when no other direction parameter is specified and
the type of storage cannot be derived from either the data directory
path.
local-to-shared -
Indicates that the migration is between local storage and shared
storage. This type of migration supports changing the host.
shared-to-local -
Indicates that the migration is to move data from shared storage to
local storage. This type of migration supports changing the host.
shared-to-shared -
Indicates that the migration is to move data from shared storage to
shared storage. This type of migration supports changing the host.
|
Example
xquery version "1.0-ml";
import module namespace ts="http://marklogic.com/xdmp/tieredstorage"
at "/MarkLogic/tieredstorage.xqy";
ts:forest-migrate(
xdmp:forest("Forest1"),
xdmp:host("host1"),
"/tmp/test",
(),
(),
("timeout=20"))
(: Moves the Forest1 from its current location to /tmp/test and sets their
timeouts to 20 seconds. :)
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.