Cloning a year old linode via snapshot

I have a linode which has been running for 380+ days, and I decided it's time to update it (it's running gentoo). It looks like I can take a snapshot, then restore that snapshot to a new linode, so I added a linode and started a snapshot.

I am somewhat unreasonably nervous about this, mainly because it's been over a year since I did much of anything to the linode. It's been ticking away fine, handling mail, serving as a temporary repository and login when traveling, and I don't want to make a hash of it …

My plan is to update the clone, test a few things (like receiving and forwarding email), and make sure it is all working after the upgrade, then put both into single user mode, swap their IP addresses and hostnames and whatever else is necessary to try the clone for real, and if it all seems functional, keep it as the new main linode, upgrade the original, and make it my standby. Maybe repeat this one a month instead of once a year.

My first worry is that uname says it is running kernel 2.6.31.5-x8664-linode9, but the dashboard seems to imply that if I reboot it, I will get kernel 2.6.35.4-x8664-linode16. That's a big jump, and my minimal installation also wants to update just about every gentoo package installed. This is why I chose a snapshot rather than a direct clone, since I believe a direct clone requires the source linode to be shut down.

So, Q one … is this correct reasoning?

My second worry is how to reconfigure the second linode before it starts running. I admit I am puzzled by this. Mostly I worry that a complete clone will try to set up the same services and in fact think it is the original before I have had a chance to change a few things.

So, Q two … is there some way to start up the clone in single user mode? I remember there was, a year ago, some clever way of logging in via a javascript control panel, maybe it only let you mount the disk images and edit them before booting for the first time.

9 Replies

@Scarecrow:

I have a linode which has been running for 380+ days, and I decided it's time to update it (it's running gentoo). It looks like I can take a snapshot, then restore that snapshot to a new linode, so I added a linode and started a snapshot.
Perfectly good plan - I've done this on a number of cases, both to test an upgrade, as well as to run a demo copy of a production server with only stuff like hostname/ip addresses changed.

> My first worry is that uname says it is running kernel 2.6.31.5-x8664-linode9, but the dashboard seems to imply that if I reboot it, I will get kernel 2.6.35.4-x8664-linode16. (…)

So, Q one … is this correct reasoning?
Yes, but you can explicitly set a different kernel rather than accepting the latest stable. Now if it's old enough, it's possible that your existing kernel may fall off the available list (not sure what policy is there), but I just checked and it looks like your existing kernel is still available, within the deprecated section. So if you really want to be identical, just pick that. It's probably not a bad idea to become more current, especially with the paravirt kernels since they've gotten some real improvements, but you can always change it later as part of your testing before switching over, after you've verified identical functionality of the clone.

I've vacillated on how to leave my Linode configurations set. I used to always select Latest, and I understand that it's good to pick up changes. But I've also seen some adverse changes in kernel releases (primarily in the paravirt line) and in general have settled on picking a kernel and updating manually, so that I don't get hit with an unexpected change if I happen to reboot - since odds are good doing so is due to some issue which I'd hate to compound.

> My second worry is how to reconfigure the second linode before it starts running. I admit I am puzzled by this. Mostly I worry that a complete clone will try to set up the same services and in fact think it is the original before I have had a chance to change a few things.
Several options, but I typically boot into a recovery image (Finnix), mount my recently cloned/restored disk images and then make the changes I need. You can either try to change everything that way, or just disable all the stuff that can interfere with your existing host, then boot normally and finish any changes over LISH. Sort of depends on what sort of interference you may see between the hosts. If uncertain, the simplest thing is probably just to ensure the network interfaces (public and/or private) aren't brought up, since then there's little that the Linode can do to anything other than itself.

There's a library entry on using a Finnix recovery configuration (old manager style) that should be able to help. In the older manager you had to define your own Finnix profile (not that it was hard) and that still works, but the new Linode Manger has a Rescue tab which essentially creates a temporary profile already set up for Finnix and boots it. When using a Finnix boot, connect in via LISH to interact with it.

Or alternatively, yes, you can also use single user mode - just set your configuration profile to use single user mode for the run level option, and then boot - again access over LISH, and change what you need before exiting single user mode.

For LISH access in either case, ssh to the host machine (using the address and user shown in the Console Access section of the Remote Access tab in the manager), or access it over a browser by launching the Ajax console in that same page of the manager. I prefer the ssh approach, but either is available.

Also note that you can connect to LISH even when your Linode is down, and if you're connected you can then observe the boot sequence console messages.

– David

Thanks for all the help. Now I am stuck on some simple stuff – how do I recover the snapshot from linode1, the working linode, to linode2, the new one for experimenting? I've tried every link I can see on the dashboards and can't see anyting related to copying a snapshot to the initial image.

The clone tab. Or, the backups tab, click on the backup to restore it and then choose its destination.

-Chris

Ach! Right in plain sight!

I tried to restore the snapshot, but it doesn't recognize my other linode. I purposely created it in a different data center for better redundancy … is that a problem?

cross-data centre restoration worked in beta however I don't know if they kept the feature, raise a support ticket.

We removed cross datacenter restoring because it was terribly slow. Restore to a local Linode first, and then migrate the entire Linode, or use the disk image clone feature to push it to the other datacenter.

-Chris

Also, if your original Linode has enough free space, you can restore the snapshot to it (the restoration configurations and images are prefixed uniquely so won't conflict with the existing configuration), and then clone those to the other data center. Avoids the need for adding a temporary Linode in the same DC just for restoration purposes.

The space needed is only that with actual data in the current images (e.g,. generally less than the original disk image sizes), which you can check when starting a restoration.

– David

Linode support moved the new linode to be on the same data center, and I restored the snapshot to it. Thanks to everybody for their help.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct