Skip to main content
BlogLinodelinode.clone() API Appeler

linode.clone() API Appeler

Nous sommes heureux d'annoncer notre nouvel appel API appel : linode.clone(). Cet appel API vous permet de cloner facilement une Linode existante vers une nouvelle instance dans le centre de données de votre choix. Il clonera tous les profils de configuration et les images disques présents sur le Linode source.

La méthode est limitée à cinq clones simultanés à partir du même Linode source afin de protéger l'infrastructure Linode. Si vous tentez d'exécuter un autre clone alors que la limite de concurrence est atteinte, la méthode API renverra une erreur de "validation". Si vous souhaitez exécuter un processus de clonage à grande échelle, le Linode d'origine peut être cloné cinq fois, puis, une fois ces clones terminés, les Linodes clonés peuvent chacun être clonés cinq fois simultanément, et ainsi de suite. Cela vous permet de faire évoluer rapidement votre infrastructure d'une seule Linode à des centaines.

Nous espérons que vous apprécierez ce nouvel API et qu'il vous sera utile pour vos futurs déploiements dans le Linode Cloud.


Commentaires (10)

  1. Author Photo

    Wow, great!

    We’ve been looking for something like this for a while

  2. Author Photo

    Are there any pre-requisites for this API Call?
    Is the Linode need to be shutdown or will be shutdown during the clone process?

    How long would it take to clone? Is it the same thing as if its done from the console?

  3. Author Photo

    AWESOME! Been waiting for this for so long, at least now we can script our scaling activities!

  4. Author Photo

    Can we get one for checking the amount of bandwidth/transfer used for the current month next? (To compare against the existing call for finding the quota.)

  5. Author Photo


    > Is the Linode need to be shutdown or will be shutdown during the clone process?

    “It is recommended that the source Linode be powered down during the clone.”

    The source Linode doesn’t have to be powered down, but it is recommended to ensure that a consistent copy of your data is cloned.

    > How long would it take to clone? Is it the same thing as if its done from the console?

    1-2 minutes per GB of data within the same datacenter of the source Linode (the Linode you’re cloning from), or 5-10 minutes per GB of data if migrating to a different datacenter.

  6. Author Photo

    I assume that you should not .clone() a Linode that has static networking set up, since the static confi will render the new node unreachable… or am I missing something?

  7. Author Photo


    You could still clone the Linode, but you’d need to use LISH to log in to the new Linode and adjust the networking configuration to the new IP address(es).

    Tony Yarusso:

    There isn’t currently a way to see how much transfer a particular Linode has used that I can see, but shows transfer pool amount and usage:

  8. Author Photo

    How would you suggest auto scaling in an HA environment where you want to clone and configure network addresses all in one go?

  9. Author Photo

    The limitation of 5 clones per source linode seems very arbitrary – you’re just offloading additional work to the side of the script doing the cloning. You might think we’re going to keep track of the clone count on our own, but the truth is we’re just going to iterate over existing linodes until the clone() call returns without an error.

    What difference could it possibly make on your end whether we clone a single linode 10 times versus cloning an initial linode 5 times, and then cloning the first clone 5 additional times? There should be no difference in your ability to “protect Linode infrastructure”..?

  10. Author Photo

    Xof brought up a good question regarding the static networking setup causing new node unreachable. May I know what is the best solution for that in Linode? Doug’s suggestion to login using LISH and change it manually doesn’t make sense to me, as it defeats the purpose of autoscaling.

Laissez un commentaire

Votre adresse électronique ne sera pas publiée. Les champs obligatoires sont marqués d'un *.