Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Xen domU Backup

  1. #1
    Join Date
    Aug 2008
    Posts
    29

    Question Xen domU Backup

    What is the proper way to do a full backup of the xen virtual machine domU?

  2. #2
    Join Date
    Dec 2007
    Posts
    1,141

    Default

    Are you backing up from within the domU or from dom0?

  3. #3
    Join Date
    Aug 2008
    Posts
    29

    Default

    Well, I am not sure? I am rather new to xen and have only played around with vmware. vmware allowed one to do a vm snapshot to do a full backup of the vm... so you could install the virtual machine on another server. I believe you could also stop the vm and copy over the vmware files.

    I am not sure if I have access to dom0? I have a vpslink xen service package. Is this domU or dom0?

  4. #4
    Join Date
    Dec 2007
    Posts
    1,141

    Default

    dom0 is the root user's domain on the hardware node (the container for all domU domains).

    You will not have access to copy the domain in its entirety in the case of a Xen VPS hosted with us, however, it is worth noting that we do maintain backups of all VPS accounts in the event of a node failure.

    Backing up a domU is essentially the same as backing up a dedicated Linux server - you will want to rsync or an SCP client to copy files from your VPS to another location.

    In many cases, it will be faster and more reliable to reinstall your OS template and any installed applications versus copying binaries into your VPS from backups. The most important files will be those which cannot be restored by reinstalling your OS template and installing packages with your distribution's package manager - generally, the following directories on your root filesystem:

    • /etc
    • /home
    • /var

  5. #5
    Join Date
    Aug 2008
    Posts
    29

    Default

    however, it is worth noting that we do maintain backups of all VPS accounts in the event of a node failure.
    Please advise the frequency of these backups and how long they are kept for. What is included in these backups?

    In many cases, it will be faster and more reliable to reinstall your OS template and any installed applications versus copying binaries into your VPS from backups.
    I wanted to backup the whole domU and not just copy binaries into a VPS. For instance, I want to copy and store the whole Xen domU that contains the OS template, custom configurations, binaries, server settings, files, db's, etc... In the event of a failure or another situation, the domU could just be added to the dom0, correct? This could be a dom0 at vpslink or any host w/Xen configured similarly? VMWare let's you do a full backup of the virtual machine and that virtual machine may be installed on any other similar vmhost.

    This would be much faster than setting up a new template, having to copy some files over, resetting configuration parameters, servers, db's, etc..., when one could simply just drop the domU on a dom0.

  6. #6
    Join Date
    Dec 2007
    Posts
    1,141

    Default

    Quote Originally Posted by v1nce View Post
    Please advise the frequency of these backups and how long they are kept for. What is included in these backups?
    We maintain full backups of each VPS from snapshots taken 1-2 times per week. (I should note that this represents an emergency restore fail-safe for the highly unlikely event that one of our hardware nodes' RAID arrays fails - we are still working on the development of a backup system with features to support on-demand snapshots)


    Quote Originally Posted by v1nce View Post
    I wanted to backup the whole domU and not just copy binaries into a VPS. For instance, I want to copy and store the whole Xen domU that contains the OS template, custom configurations, binaries, server settings, files, db's, etc... In the event of a failure or another situation, the domU could just be added to the dom0, correct?

    ...

    This would be much faster than setting up a new template, having to copy some files over, resetting configuration parameters, servers, db's, etc..., when one could simply just drop the domU on a dom0.
    In theory, yes - in practice, however, there would be a considerable delay if you were storing a local copy of your domU and transferring it back to us (which is why we have a keen interest in deploying a system which will handle this type of activity on our side).


    Quote Originally Posted by v1nce View Post
    This could be a dom0 at vpslink or any host w/Xen configured similarly? VMWare let's you do a full backup of the virtual machine and that virtual machine may be installed on any other similar vmhost.
    Your Xen domU contains an explicit IP address configuration, which would interfere with a "seamless" transfer between different hosting providers, however, it would be possible to port a Xen domU between dom0's (as is done when we migrate a Xen domU between nodes).

    I have asked one of our system administrators to follow up RE: Xen domU backups (should see a post from him in the near future on this thread).

  7. #7
    Join Date
    Oct 2006
    Posts
    59

    Default

    It sounds like you want to have a block level copy, basically making an image of the disk. That's fine, but a little unnecessary. The disk images aren't special in any way, just a plain old ext3 partition with your OS's files dumped on top. You would be able to achieve more granularity, use less disk space, and there would be less chance that a block error could make your backup unusable if you were to use file level backups. There's also alot of tutorials on doing file level backups in the VPSLink Wiki Category:Backups - VPSLink Wiki

    If you end up choosing to do a file level backup, but end up wanting to make a domU somewhere else with the same data, you can create a disk image quite easily using the following commands:

    Code:
    dd if=/dev/zero of=/path/to/image bs=1024m count=$NUMBER_OF_GIGS
    mkfs.ext3 /path/to/image
    mkdir /mnt/loop
    mount -o loop /path/to/image /mnt/loop
    cp -a /path/to/backup/* /mnt/loop
    And after all of this, you decide that you really want just a disk dump of your filesystem, you could use cat and netcat.
    Code:
    user@backup_server:~$ nc -l -p $backup_port > /path/to/image
    
    root@xen_server:~# cat /dev/root | nc $backup_server $backup_port

  8. #8
    Join Date
    Aug 2008
    Posts
    29

    Default

    DanL,

    You mentioned that a backup system which will support on-demand snapshots is in development. Will this be available to customers? Could you please advise what would be included in your use of the term snapshot? There has got to be an easier way to just do a domU backup in the event of a problem at vpslink or spry...

  9. #9
    Join Date
    Dec 2007
    Posts
    1,141

    Default

    Quote Originally Posted by v1nce View Post
    Will this be available to customers?
    That is our objective, yes.


    Quote Originally Posted by v1nce View Post
    Could you please advise what would be included in your use of the term snapshot? There has got to be an easier way to just do a domU backup in the event of a problem at vpslink or spry...
    The snapshot would include a copy of your VPS filesystem - further implementation details will need to be determined by our developers (i.e. special cases for databases), however, I expect that the solution will be perfectly sufficient for disaster recovery when it becomes available.

    Update: I should add that I do not have a timeframe for the release of this feature - I can say that our developers have several large projects to tackle before their attention is directed at snapshot development, so it would be best to familiarize with alternate backup procedures for the time being.
    Last edited by DanL@VPSLink; 10-23-2008 at 10:50 PM.

  10. #10
    Join Date
    Aug 2008
    Posts
    29

    Default

    Please advise if this assumption is correct:

    Should there be a node failure or hardware failure, vpslink would have a backup of my xen domU to implement on a separate server. From there, if I'm doing an rsync of my site files and nightly database dumps, I could update my application on this new server. Does this sound correct?

    However, this brings up the question of where these vpslink dom0/domU backups are stored. Are these offsite or onsite? In the unlikely event of a facility problem, onsite backups may not be available?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •