-   Linux - Server (
-   -   xen guest backups (

owenm 07-25-2011 05:46 AM

xen guest backups
Hi all,

I need to start doing backups of my VM's.

I currently create new VM's by copying an existing partition using dd, I was wondering if I could create a backup like this but instead of dd to a new partition could I dd to a file and ftp this to my backupp location?

To create a vm in my current setup I use:
lvcreate -L 10GB -n systemvol
mkfs -t ext3 /dev/systemvol/
dd if=/dev/systemvol/ of=/dev/systemvol/ conv=notrunc,noerror

So Could I do something like:

dd if=/dev/systemvol/ of=/etc/tmp/myvm.file conv=notrunc,noerror

Any pointers would be most welcome.


AlucardZero 07-25-2011 07:13 AM

Yes, you can dd to a file.

owenm 07-25-2011 07:51 AM


I gave that a go just now and got a file, it's size was the same as the source partition so I tried it without the notrunc option and that gave me a file about the size of the data on the partition. Are their any gotchas by excluding the notrunc option when I go to write the file to a partition on another system?


All times are GMT -5. The time now is 11:53 AM.