About this list Date view Thread view Subject view Author view Attachment view

From: Geoffrey D. Bennett (g_at_netcraft.com.au)
Date: Sat 23 Nov 2002 - 03:35:17 GMT


On Fri, Nov 22, 2002 at 11:24:51AM -0800, Cathy Sarisky wrote:
> These directions work great, thanks for sharing them! The ability
> to move a vserver so easily is wonderful.
>
> I have just one question/comment: Moving a group of vservers with
> rsync doesn't preserve file unification, so rsyncing a handful of
> vservers takes a LONG time and consumes a lot of disk space on the
> server one is rsyncing to, until a vunify run anyway. (I had a
> 500MB unified vserver that required 2.5GB disk space after moving,
> for example.)
>
> Any thoughts (or scripts to share) anyone about backing up vservers
> more efficiently?

rsync will preserve hard links if you use --hard-links _and_ you rsync
all the vservers with one rsync command.

Eg. instead of:
- rsync -Ha /vservers/1 somewhereelse:/vservers
- rsync -Ha /vservers/2 somewhereelse:/vservers
- rsync -Ha /vservers/3 somewhereelse:/vservers

You need to do:
- rsync -Ha /vservers/ somewhereelse:/vservers

I'm not sure if it is acceptable for you to copy everything together.
If not, here are some thoughts:

It would be "hard" for rsync to preserve hard links when rsyncing only
one vserver at a time, since it would need to get information from
outside the directory area which it has been told to copy.

As the docs say, "rsync can only detect hard links if both parts of
the link are in the list of files being sent". If someone wanted to
change rsync so that it could detect hard links anyway, rsync would
then have to scan the entire filesystem on the source end. And then
on the destination end it would have to check outside the actual
destination area (eg. if you are rsyncing to /vservers/2 it would have
to look inside /vservers/1 too) to check that the other end of the
hard link already exists. It would then have to md5sum the potential
hard link to make sure that it was the same file.

I'm not sure that there is any better solution than either doing all
vservers at once or just running vunify afterwards. dump and cpio
surely would suffer from the same problems? Both would require you to
copy all the vservers at once, and they don't have the advantages that
rsync has in terms of not needing to copy things that already exist on
the destination.

-- 
Geoffrey D. Bennett, RHCE, RHCX               geoffrey_at_netcraft.com.au
Senior Systems Engineer           http://www.netcraft.com.au/geoffrey/
NetCraft Australia Pty Ltd           http://www.netcraft.com.au/linux/


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 23 Nov 2002 - 04:49:10 GMT by hypermail 2.1.3