Linode Instances

Clone Linode

post
https://api.linode.com/v4/linode/instances/{linodeId}/clone

You can clone your Linode's existing Disks or Configuration profiles to another Linode on your Account. In order for this request to complete successfully, your User must have the add_linodes grant. Cloning to a new Linode will incur a charge on your Account.

If cloning to an existing Linode, any actions currently running or queued must be completed first before you can clone to it.

Up to five clone operations from any given source Linode can be run concurrently. If more concurrent clones are attempted, an HTTP 400 error will be returned by this endpoint.

Authorizations

Personal Access Token
OAuth: ( linodes:read_write)

Path Parameters

linodeId
Required
integer

ID of the Linode to clone.

Request Body Schema

backups_enabled
boolean

If this field is set to true, the created Linode will automatically be enrolled in the Linode Backup service. This will incur an additional charge. Pricing is included in the response from /linodes/types.

  • Can only be included when cloning to a new Linode.
configs
array

An array of configuration profile IDs.

  • If the configs parameter is not provided, then all configuration profiles and their associated disks will be cloned from the source Linode. Any disks specified by the disks parameter will also be cloned.
  • If an empty array is provided for the configs parameter, then no configuration profiles (nor their associated disks) will be cloned from the source Linode. Any disks specified by the disks parameter will still be cloned.
  • If a non-empty array is provided for the configs parameter, then the configuration profiles specified in the array (and their associated disks) will be cloned from the source Linode. Any disks specified by the disks parameter will also be cloned.
disks
array

An array of disk IDs.

  • If the disks parameter is not provided, then no extra disks will be cloned from the source Linode. All disks associated with the configuration profiles specified by the configs parameter will still be cloned.
  • If an empty array is provided for the disks parameter, then no extra disks will be cloned from the source Linode. All disks associated with the configuration profiles specified by the configs parameter will still be cloned.
  • If a non-empty array is provided for the disks parameter, then the disks specified in the array will be cloned from the source Linode, in addition to any disks associated with the configuration profiles specified by the configs parameter.
group
string
Deprecated

A label used to group Linodes for display. Linodes are not required to have a group.

label
string

The label to assign this Linode when cloning to a new Linode.

  • Can only be provided when cloning to a new Linode. * Defaults to "linode".
linode_id
integer

If an existing Linode is to be the target for the clone, the ID of that Linode. The existing Linode must have enough resources to accept the clone.

region
string

This is the Region where the Linode will be deployed. To view all available Regions you can deploy to see /regions.

  • Region can only be provided when cloning to a new Linode.
type
string

A Linode's Type determines what resources are available to it, including disk space, memory, and virtual cpus. The amounts available to a specific Linode are returned as specs on the Linode object.

To view all available Linode Types you can deploy with see /linode/types.

  • Type can only be provided when cloning to a new Linode.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "region": "us-east",
      "type": "g6-standard-2",
      "linode_id": 124,
      "label": "cloned-linode",
      "group": "Linode-Group",
      "backups_enabled": true,
      "disks": [25674],
      "configs": [23456]
    }' \
    https://api.linode.com/v4/linode/instances/123/clone

Response Samples

{}

Responses

200: Clone started.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.