[kwlug-disc] linode - vm backups & backing up? [Was: Re: Any experience with vpsville.ca?]

Chris Irwin chris at chrisirwin.ca
Mon Jan 16 11:41:23 EST 2012


On Sun, Jan 15, 2012 at 08:13, unsolicited <unsolicited at swiz.ca> wrote:
> Chris Irwin wrote, On 01/15/2012 4:07 AM:
>> They also allow you to have multiple VMs (though you can only run one at
>> a time). It makes building a new server (or upgrading) nice and easy as
>> you can keep your previous machine around.
>
> I'm confused on this. If you can only run one at a time, how can you
> bring the second one up (temporarily), be it for migration, redundancy
> (off-line backup?), establishment of a new vm (paid), or any such thing?

You move the option-selector from your old VM to the new one, then
issue a reboot command to Linode. The existing VM shuts down, and it
starts up your new one.

For migration, I had my new VM mount the disks from the old one (read
only, of course), then cp'd data as necessary to the new machine.

>> Also worth noting is that backups are an additional addon. I simply grab
>> a copy of the entire server via rsync on a weekly basis. I prefer to
>> have copies of everything anyway.
>
> [Not specific to linode - backups generally:]
>
> Hold on, are you saying if I 'cp remote:/ local:/' ('sp?'), then put
> local:/ in another machine, I have an exact and functioning duplicate?

You will also want to preserve permissions when copying.

There are a few things that need to be considered. For example, you'll
need to restore your boot sector and ensure GRUB is up to date (your
filesystem UUIDs will be different. If you do this often enough,
consider using LABELs). Without the boot sector, your machine won't
boot.

On Linode, you don't need to worry about the boot sector due to how
they boot their machines (they supply the kernel), unless you've
manually arranged to have grub installed and bootable.

> i.e. No backup issues of in use files, copy /proc, etc. is OK, all is
> happy, etc., etc.?

You shouldn't copy files inside /proc, /dev, or /sys as they are not
real files (but you should have a directory there to be mounted to, so
simply excluding the dir won't provide a bootable system).
Furthermore, attempting to copy something like /proc/kcore will fill
your disk (mine shows as 128TB).

You can look up some exact commands online that specifically list what
to exclude.

> [Surely, even in Linux, 'disk duplication' / pop it in different
> hardware, isn't that simple?]

It is actually pretty easy, I've done it quite a few times, including
a production machine at work (long story). But there are a few issues
that you need to be aware of:

- You will need to update your fstab for the machine to boot (UUIDs,
partitions, or LABELs, whatever you choose).

- Moving from a machine with nvidia (possibly also fglrx) proprietary
graphics to a machine with any other graphics causes a problem. The
nvidia proprietary driver's install procedure creates an xorg.conf
file that forces it's driver to be used. This caused X.org to fail to
run on my new intel machine until I removed the old configuration
file.

- This machine will think it is the same one, so you may want to
change hostname, network config, etc.

-- 
Chris Irwin
<chris at chrisirwin.ca>




More information about the kwlug-disc mailing list