Clone a Linode

Clone your Linode's existing disks, configuration profiles, and interfaces to another Linode on your account. Consider these points before cloning a Linode:

  • Cloning to a new Linode incurs a charge on your account.

  • If cloning to an existing Linode, any actions currently running or queued need to finish before you can clone to it.

  • You can run up to five concurrent clone operations, from a single Linode. If you exceed this limit, you'll receive an HTTP 400 error.

  • For Linodes using Linode interfaces, the region where you want the clone to live also needs to support Linode interfaces. You can run the GET a region operation to see what's supported. Your user's account settings also need ot be set to allow creation of Linodes with Linode interfaces.

  • Any tags you have set on your source Linode will be cloned to the target Linode.

  • If your source Linode is protected with a resource lock, the lock is not included on the clone. You'll need to add a new resource lock if you want to protect the clone.

  • If the target Linode uses Metadata, with has_user_data set to true, you need to create the clone with metadata.user_data in the request.

  • If the target Linode has a vpc interface on its active legacy configuration profile, and it includes a 1:1 NAT, the resulting clone is configured with an any 1:1 NAT. See the VPC documentation guide for its specifications and limitations.

  • Only next generation network (NGN) data centers (regions) support VLANs. If a VLAN is attached to your Linode and you try to clone it to a non-NGN region, the clone won't start. If a Linode can't be cloned because of an incompatibility, you're prompted to select a different region or contact support. See the VLANs Overview guide for more specifications and limitations.

Permissions and scopes

To call this operation, you need permissions, based on the model you're using:

  • Identity and access permissions. Your user needs a role with these permissions. Learn more.

    • Permissions: clone_linode
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: linodes:read_write

CLI

linode-cli linodes clone 123 \
  --linode_id 124 \
  --region us-east \
  --type g6-standard-2 \
  --label cloned-linode \
  --backups_enabled true \
  --placement_group.id 528 \
  --disks 25674 \
  --configs 23456 \
  --private_ip true \
  --metadata.user_data I2Nsb3VkLWNvbmZpZw==

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
integer
required

ID of the Linode to clone.

Body Params

The requested state your Linode will be cloned into.

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 List types.

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

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.
configs
disks
array of integers

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.
disks
string
deprecated

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

string
length between 3 and 64

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.
integer

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

string
enum

Defines the maintenance policy for the new Linode. If you don't provide it, the new Linode inherits the maintenance policy from the original Linode. Review maintenance policy documentation for more details.

Allowed:
metadata
object

Write-only An object containing user-defined data relevant to the creation of Linodes.

placement_group
object

Include this to assign this Linode to an existing placement group. Consider these points when cloning:

  • If the Linode you're cloning exists in a placement group, the API won't automatically add the cloned instance to the same placement group. You need to specify a placement group to add the clone to.

  • The target placement group needs to be in the same region set for this Linode.

  • The placement group needs to have capacity. Run the Get a region operation and note either the maximum_linodes_per_pg (strict) or maximum_linodes_per_flexible_pg (flexible), based on your selected placement_group_policy. These represent the Linode limit per placement group, for each placement_group_policy type. You can then run the Get a placement group operation to review the Linodes in that group.

boolean

If true, the created Linode will have private networking enabled and assigned a private IPv4 address.

  • Can only be provided when cloning to a new Linode.
string

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

  • Region can only be provided and is required when cloning to a new Linode.
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, run List types.

  • Type can only be provided and is required when cloning to a new Linode.
Responses

Language
Credentials
Response
Choose an example:
application/json