Rakotomandimby (R12y) Mihamina
2007-Feb-01 23:28 UTC
[Xen-users] what to backup Xen partition with?
Hi all, I choosed to install my domUs on separate partitions. All are "full virtualized" domUs. I have 4 x 10GB to backup. Of course, the backup is done while the domains are down. The domains are 4 different Linux distributions I make tests on. I might brake some, and dont want to go more time thrgouh the install process: I just want, if I brake the domU system, to just overwrite the partition with the last known good configuration. For the moment, the idea I apply is to "dd" the partition to a file and then bzip2 it. for a first install, It goes from 10GB to 1GB (more or less, depends on the distro). But it''s still too slow (dd+bzip2). Would you know another way to make partition backups? thank you _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thursday 01 February 2007, Rakotomandimby (R12y) Mihamina wrote:> But it''s still too slow (dd+bzip2). Would you know another way to make > partition backups?if you were using LVM instead of partitions, you could do a snapshot, and then use the partition-on-block-device tools to mount it (ntfs? ro?) and then use rsync to backup only modified files. but since you can''t do a snapshot, i''d use rsync over ssh (''-c blowfish-cbc'' makes ssh easier on the CPU!) to copy from a running DomU -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
JHJE (Jan Holst Jensen)
2007-Feb-02 07:51 UTC
RE: [Xen-users] what to backup Xen partition with?
> I have 4 x 10GB to backup. Of course, the backup is done > while the domains are down. > The domains are 4 different Linux distributions I make tests on.[...]> But it''s still too slow (dd+bzip2). Would you know another > way to make partition backups?Hi. Since these are all Linux distros, AND you are backing up while the domains are down, I would suggest that you simply mount the partitions and do a tarball of the file system - or do an rsync of the whole thing for even better performance. Cheers -- Jan Holst Jensen, Denmark _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2007-Feb-02 08:23 UTC
Re: [Xen-users] what to backup Xen partition with?
JHJE (Jan Holst Jensen) wrote:>> I have 4 x 10GB to backup. Of course, the backup is done >> while the domains are down. >> The domains are 4 different Linux distributions I make tests on. >> > [...] > >> But it''s still too slow (dd+bzip2). Would you know another >> way to make partition backups? >> > > Hi. > > Since these are all Linux distros, AND you are backing up while the > domains are down, I would suggest that you simply mount the partitions > and do a tarball of the file system - or do an rsync of the whole thing > for even better performance. >dd will always be slow and oversized! You have to read every single byte, and if you''re writing to a file on the same disk, the disk is going to be chugging back and forth even worse. Even on another disk, it''s hardly efficient. And if it''s a live file system, you''re in danger because it''s possible, even likely that blocks will not yet be written to disk and you can have an extremely corrupt filesystem recorded without the information to fix it. So don''t do partition backups. Store a note about the size and location of the partition, a note about the type of file system, then mount it and do a tarball of the files. There are techniques to make a file-system snapshot and a "paused" copy of the Xen domain that may also help: snapshot it and build a new domaiun frm the copy, then shut the copy down and make a tarball from *that*. It''ll also restore to a new partition a lot faster than a dd copy, and you can use a different sized partition for the newly restored domain if desired. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rakotomandimby (R12y) Mihamina <mihamina.rakotomandimby <at> etu.univ-orleans.fr> writes:> > Hi all, > I choosed to install my domUs on separate partitions. > All are "full virtualized" domUs. > I have 4 x 10GB to backup. Of course, the backup is done while the domainsare> down. > The domains are 4 different Linux distributions I make tests on. > I might brake some, and dont want to go more time thrgouh the install > process: I just want, if I brake the domU system, to just overwrite the > partition with the last known good configuration. > For the moment, the idea I apply is to "dd" the partition to a file and then > bzip2 it. for a first install, It goes from 10GB to 1GB (more or less, > depends on the distro). > But it''s still too slow (dd+bzip2). Would you know another way to make > partition backups? > > thank you >It''s not goign to be of any great help now, but LVM is very handy. I run all my domU''s in LVM which enables you to make snaphots of your partitions. http://tldp.org/HOWTO/LVM-HOWTO/ http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/user/user.html#SECTION03330000000000000000 Cheers, _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rakotomandimby (R12y) Mihamina
2007-Feb-02 20:45 UTC
Re: [Xen-users] what to backup Xen partition with?
On Friday 02 February 2007 08:23, Nico Kadel-Garcia wrote:> So don''t do partition backups. Store a note about the size and location > of the partition, a note about the type of file system, then mount it > and do a tarball of the files. There are techniques to make a > file-system snapshot and a "paused" copy of the Xen domain that may also > help: snapshot it and build a new domaiun frm the copy, then shut the > copy down and make a tarball from *that*. It''ll also restore to a new > partition a lot faster than a dd copy, and you can use a different sized > partition for the newly restored domain if desired.I put /dev/sda7 as /dev/hda of the domU The domU has only one partition (/dev/hda1), When, from the dom0, I try to mount /dev/sda7, the filesystem is not known. I cannot mount it in order to back it up... _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 2 Feb 2007 at 20:45, Rakotomandimby (R12y) Mihamina wrote:> On Friday 02 February 2007 08:23, Nico Kadel-Garcia wrote: > > So don''t do partition backups. Store a note about the size and location > > of the partition, a note about the type of file system, then mount it > > and do a tarball of the files. There are techniques to make a > > file-system snapshot and a "paused" copy of the Xen domain that may also > > help: snapshot it and build a new domaiun frm the copy, then shut the > > copy down and make a tarball from *that*. It''ll also restore to a new > > partition a lot faster than a dd copy, and you can use a different sized > > partition for the newly restored domain if desired. > > I put /dev/sda7 as /dev/hda of the domU > The domU has only one partition (/dev/hda1), > When, from the dom0, I try to mount /dev/sda7, the filesystem is not known. > I cannot mount it in order to back it up..."man kpartx", or serch the list for "kpartx" and "mount". Ulrich _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users