LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   xen guest backups (http://www.linuxquestions.org/questions/linux-server-73/xen-guest-backups-893600/)

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 root.name.com systemvol
mkfs -t ext3 /dev/systemvol/root.name.com
dd if=/dev/systemvol/root.source.com of=/dev/systemvol/root.name.com conv=notrunc,noerror

So Could I do something like:

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

Any pointers would be most welcome.

Tks,
Owen.

AlucardZero 07-25-2011 07:13 AM

Yes, you can dd to a file.

owenm 07-25-2011 07:51 AM

Thanks,

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?

Tks,
Owen.


All times are GMT -5. The time now is 07:25 PM.