Skip to content

Copy parts of a server into another

POST
/servers/{serverId}/clone
curl --request POST \
--url https://example.com/api/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/clone \
--header 'Content-Type: application/json' \
--cookie __Host-shardkeep_session=<__Host-shardkeep_session> \
--data '{ "targetServerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parts": [ "WORLD" ] }'

Needs backups.read on this server and backups.restore on the target; audited. The target goes into RESTORING, stops, gets the chosen parts (replacing its own) and starts again if it should run; this server keeps running.

serverId
required
string format: uuid
Media typeapplication/json
object
targetServerId
required
string format: uuid
parts
required
Array<string>
>= 1 items unique items
Allowed values: WORLD PLAYER_DATA PROPERTIES CONFIG PLUGIN_CONFIG PLAYER_LISTS SCHEDULES

The clone, under way.

Media typeapplication/json
object
id
required
string format: uuid
kind
required
string
Allowed values: RESTORE RESTORE_AS_NEW MIGRATE CLONE
serverId
required
string format: uuid
backupId
string format: uuid
sourceServerId
string format: uuid
fromNodeId
string format: uuid
toNodeId
string format: uuid
state
required
string
Allowed values: RUNNING SUCCEEDED FAILED
error
string
createdAt
required
string format: date-time
Example
{
"kind": "RESTORE",
"state": "RUNNING"
}

The request is invalid.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Not signed in, or the credentials are invalid.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Signed in, but not allowed.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Not found, or not visible to you.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Clashes with existing data or state.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}