Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Download VM image as backup?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Download VM image as backup?

vasechkavasechka Member
edited February 2013 in General

Hi,

I've got one idea - wondering if any providers have support for this. In most cases, VPS has all of its data stored in the files on provider's system. Does anyone allows you to get those files as a method of backup? I'm mostly talking about KVM or VMware providers.

Comments

  • The provider should be able to snapshot the VPS for you and provide you with .tar.gz version.

  • We create snapshots of our KVM and Xen machines, and putting them offsite. Clients can download the image if they want so.

    If your provider creates backups too, it shouldn't be a big much of a problem to grant you access to the files.

  • ok. great to know.

  • Even if a provider gives you a snapshot, how do you restore it later?
    You know, backups are not just for pointless copying of data, you need to be able to restore the data someday when the need arises.

  • @rds100 said: Even if a provider gives you a snapshot, how do you restore it later?

    You know, backups are not just for pointless copying of data, you need to be able to restore the data someday when the need arises.

    Get your new provider to restore it :)

  • @rds100 said: Even if a provider gives you a snapshot, how do you restore it later?

    You know, backups are not just for pointless copying of data, you need to be able to restore the data someday when the need arises.

    Yes, as @GetKVM_Ash says: you give it back to your provider. If they provider just instantly vanishes (you know, like those summer hosts) you still have your data which you can upload to your new provider (and if they use the same virtualization, hell even the whole image).

  • Rsyncing your stuff regulary to a remote locations sounds like a better idea to me.

  • Wouldn't the VM image have custom stuff that wouldn't likely be portable? (I have no clue here).

    What advantage does a VM image have over the good ole approach of rsync or equivalent of your core data?

  • @pubcrawler faster restore if something goes bad. same provider or different. worst case scenario - even on my home box will able to put things back online faster than setting up everything from the scratch. you know - what I changed? that file, this file.. and forgot about thaaaat file. so backing up image would be better for me.
    and that's the reason why I'm looking at kvm/vmware - it's easy to restore them. don't know much about openvz or xen.

  • @pubcrawler said: Wouldn't the VM image have custom stuff that wouldn't likely be portable? (I have no clue here).

    With OpenVZ, maybe. But KVM VPS can certainly be restored to any blank disk device.

  • Anyone tried the OpenVZ full restore to a different provider/different hardware successfully? Wondering how common it is.

    If it works entirely or nearly perfectly, that's an addon service I'd surely be interested in with some providers.

  • geekalotgeekalot Member
    edited February 2013

    You don't need anything from your provider or any additional software if you do it right.

    You CAN backup your running OS within the container and overlay it onto another running instance. Tricky, but definitely do-able.

    I do it all the time and have been for approx 20 VPS across numerous providers.

  • @geekalot,

    You should do a write up on how you do that. Lots of folks would learn/benefit.

  • geekalotgeekalot Member
    edited February 2013

    @pubcrawler, I have been meaning to, but been super busy, and also want to monetize my technique (keep in mind, I am not a VPS provider, so this is my "schtick" and method for making money).

    I will also gladly do it as a remote service for a reasonable cost for anyone who needs it asap.

    EDIT: Though there may be some limitations or special considerations, I have been able to go between VMware, OpenVZ, and KVM containers doing this.

  • dmmcintyre3dmmcintyre3 Member
    edited February 2013

    On KVM you can do it without host interaction.

    Boot the system rescue cd ISO. If it's not available, request it.
    make a directory to mount a remote filesystem

    mkdir /sshfs

    mount a remote filesystem with sshfs

    sshfs user@ip:/dir/to/mount /sshfs

    Make the image and compress with gzip. If you are not using virtio-disk, replace vda with sda or hda

    dd if=/dev/vda|gzip>/sshfs/hostname.img.gz

    This will take a while depending on the size of your drive, how much data is stored and network speeds.

    To restore, boot the system rescue CD ISO again, then make a directory to mount the remote filesystem

    mkdir /sshfs

    mount the remote filesystem with sshfs

    sshfs user@ip:/dir/to/mount /sshfs

    Now we restore the backup

    gunzip -c /sshfs/hostname.img.gz|dd of=/dev/vda
  • @dmmcintyre3 perfect idea.

  • @dmmcintyre3 wow new to kvm still but didn't know you could do that.. new found appreciation for kvm !

    on ramnode i see a cd iso named - System Rescue

    that's the one right ?

    cheers

  • @pubcrawler said: Anyone tried the OpenVZ full restore to a different provider/different hardware successfully? Wondering how common it is.

    Use rsync. I just cloned my old Burst.net VPS to a new DO droplet. All I did was spin up a new droplet running a minimal debian install and installed rsync. On the old VPS I did:

    rsync -av --progress -e ssh --exclude=proc --exclude=sys --exclude=dev --exclude=tmp  -v --delete   / root@[newIP]:/
    

    where [newIP] is the IP of the new VPS. After the rsync completed, I edited /etc/network/interfaces on the new VPS to reflect the new IP as the rsync would have overwritten it. This is going from OpenVZ to KVM. If you're going from OVZ to OVZ you may be able to get away without having to edit as the IPs are set by the host node. Reboot the new VPS and it should be a clone of the old. I use debian so YMMV with other distros.

  • @eva2000 said: on ramnode i see a cd iso named - System Rescue

    that's the one right ?

    Yes.

  • burst.net support this

  • @pubcrawler said: Wouldn't the VM image have custom stuff that wouldn't likely be portable? (I have no clue here).

    It should be possible to create a new VPS using a vzdump. The new provider might need to update the networking/IP configuration but that should be trivial. I've done this internally to migrate locations. The next time I do it maybe I'll take the time to write something up.

    What advantage does a VM image have over the good ole approach of rsync or equivalent of your core data?

    I don't think there is really any advantage. An rsync of the entire container should be the same. The only advantage an external backup might have is that it can be checkpointed.

    The other thing that a provider could do that the customer usually can't is take a snapshot of a container that's not running. This would ensure everything (including databases) are in a consistent state. Of course if you take DB backups as well you have that problem licked too. No huge advantage.

  • @t3k9 said:

    Use rsync. I just cloned my old Burst.net VPS to a new DO droplet. All I did was spin up a new droplet running a minimal debian install and installed rsync. On the old VPS I did:

    Well that is interesting. I wouldn't have thought that would work. I would make two changes though. First, remove the v switch since that outputs a lot of stuff on-screen and slows down the process. Second, add a z switch so that data is compressed before being transmitted. That should speed up the process.

  • @jbxl said: I don't think there is really any advantage. An rsync of the entire container should be the same. The only advantage an external backup might have is that it can be checkpointed.

    rsync isn't fail safe and can break. That's the difference and it's hard to tell.

Sign In or Register to comment.