Skip to main content
BlogLinodeClone a Linode to another Linode

Clone a Linode to another Linode

[b]Clone a Linode’s Configuration/disks to another Linode[/b]

This feature enables you to clone a Linode’s configuration and data over to another Linode that is linked to your account. You can select an entire configuration profile to clone — and this will automatically create the configuration profile in the target Linode, and copy all disk images associated with that configuration profile over to the targeted Linode — or, you can pick out individual disk images to copy over.

Implementing this was more complicated than I initially thought, so some testing would be appreciated. Keep in mind, copying large disk images across datacenters will take time.

Enjoy!
-Chris


Comments (15)

  1. Author Photo

    Coolness! This would be very handy setting up redundancy across datacenters…

  2. Author Photo

    [quote:e4f6b6fe9b=”Xan”]Coolness! This would be very handy setting up redundancy across datacenters…[/quote]

    Or even within the same data center, with Linodes on separate hosts and using the new HA / IP Failover feature:

    https://www.linode.com/forums/viewtopic.php?t=2933

  3. Author Photo

    What are you guys trying to do, put all of your competitors out of business??? How can they avoid bankruptcy if you keep this up?

    James

  4. Author Photo

    Wow. What a useful feature. I really appreciate you implementing this. It makes testing changes to a production server so much easier without the need to shut it down for long periods of time.

    Are we still being "charged" for the bandwidth this process would use?

    If yes; can you make it possible to run two linodes on the same physical server so that any backups of this kind would be from localhost to localhost and thereby not generate any traffic on the network? That way you could choose not to charge for the bandwidth generated by a backup process.

  5. Author Photo

    [quote:a030fc1aa3=”harmone”]Are we still being "charged" for the bandwidth this process would use?[/quote]
    The copies run from host to host, rather than from within a Linode to another Linode .. if that makes sense. So, no — this isn’t deducted from your transfer allotment.

    Enjoy — let me know if I missed some bugs 🙂

    -Chris

  6. Author Photo

    I assume the OS better be configured for DHCP else the same IP address might come up on both linodes…

  7. Author Photo

    [quote:b472591c6c=”caker”][quote:b472591c6c=”harmone”]Are we still being "charged" for the bandwidth this process would use?[/quote]
    The copies run from host to host, rather than from within a Linode to another Linode .. if that makes sense. So, no — this isn’t deducted from your transfer allotment.

    Enjoy — let me know if I missed some bugs 🙂

    -Chris[/quote]

    It makes sense. And is wonderful!

    I just finished backing up my production linode disk image to my other linode. They are both in the same data center (Atlanta) and the backup of 2048 MB took 10-11 minutes. I tried to not shut down the running production server before clicking the "clone button" just to see if it would work anyway. It seems to have worked. Me and 2-3 other users are the only users of it, so I guess it worked due to very low disk usage on my production server.

    Anyway.. I edited a mediawiki page on one of the servers and clicked refresh on both. The update only registered on one of the servers which is how it should be. I haven’t done any more testing but it seems that this cloning feature you have implemented works just as I expected.

    I noticed that the Dashboard job only got visible on the receiving linode account and not on the sending linode account. That is no biggie but would be nice if you fixed.

  8. Author Photo

    [quote:ab38d8a5fc=”sweh”]I assume the OS better be configured for DHCP else the same IP address might come up on both linodes…[/quote]

    Unlikely. The MAC address of a linode is based on it’s bridge, which I think is some magic caker sets up to be unique.

  9. Author Photo

    [quote:8755cd87f7=”warewolf”][quote:8755cd87f7=”sweh”]I assume the OS better be configured for DHCP else the same IP address might come up on both linodes…[/quote]

    Unlikely. The MAC address of a linode is based on it’s bridge, which I think is some magic caker sets up to be unique.[/quote]

    That controls your IP, *if* you’re setup with DHCP. But if you modified your config for a static (as in fixed, hardcoded) IP, and then replicate that disk to another linode, it would be Not Good.

  10. Author Photo

    We filter layer 2 and layer3 traffic, in and out, that does not belong to the Linode in question. So, worst thing that can happen is that it boots without an accessible IP address.

    Now, if you have the [url=https://www.linode.com/forums/viewtopic.php?t=2933]IP Failover[/url] stuff configured to allow those IPs to come up elsewhere, then yes — it’ll be bad.

    -Chris

  11. Author Photo

    I am wondering if it is possible to clone a Linode VPS to another user account?
    Cheers

  12. Author Photo

    I am looking at Linode planning to shift from Rackspace one req is creating and removing nodes through api . My question is does the linode.clone() create 100% clone of existing node along with the non OS files i.e install in /var/www/html or else where and other installed apps on the machine

  13. Author Photo

    the aplications that i have in the server to be cloned must be stoped or they can be running?

  14. Author Photo

    I too am looking for a way to vend a “golden” image to customers who would use that image to launch nodes in their own Linode Cloud Manager.

  15. Author Photo

    This is a great use-case for golden images! Here are some options:

    If you have access to their account, this guide walks you through sending and receiving a disk image.

    Otherwise, you could create a local copy, which you could then deliver to a customer.

    Lastly, you could clone a Linode on your own account, then reach out to Support to transfer that Linode to a customer’s account — just keep in mind that the customer would have to make a matching request to Support.

Leave a Reply

Your email address will not be published. Required fields are marked *