is it possible to download backups?
5 Replies
@arttus:
ok, that makes sense, i guess what i'm really trying to accomplish is to download a bootable backup that i can use for local development. I've tried downloading with DD raw img files, converting the raw img to VDI and loading them into Virtualbox, but for some reason they won't boot up.
Are you using one of the Linode kernels? In that case it's quite likely that your image literally doesn't have the data necessary to boot up, since the kernel portion is handled by Xen.
Even if you use pv_grub, I'm not entirely sure that your image will have any sort of MBR, since there's still some integration with grub and Xen in that case, and I don't know how much is still bypassed. But I admit I haven't used it myself yet so could be wrong.
If that were the case, a pvgrub image might be resolvable just by manually installing a normal Grub MBR after converting to VDI. But a non-pvgrub image is certainly going to need a kernel and bootloader added at a minimum.
I also suspect that the hardware virtualization between a Xen and VirtualBox guest instance may be enough to cause some issues that you'd have to work through on first boot.
– David
First – and this gets me every time -- you need to create a partition table, with a partition each for root and swap. You can then stuff the Linode image into that partition. Then, edit /etc/fstab to use the correct device names and /etc/network/interfaces for the right network magic. There's probably a couple other things I'm forgetting too.
Installing a kernel isn't too hard. chroot in and install a kernel image (something like apt-get install linux-image-686 grub initramfs-tools), grub-install /dev/sda, update-grub, make sure your /boot/grub/menu.lst looks OK, then reboot.
The procedure is not entirely unlike the post-debootstrap parts of debootstrapping a system:
In reality, you're usually better off just replicating the configuration and data onto a fresh installation on Virtualbox or cloning onto a new Linode. That's why I haven't gotten this down to a process yet: it was a pointless waste of time. But it was fun.