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

From: Geoffrey D. Bennett (g_at_netcraft.com.au)
Date: Tue 05 Nov 2002 - 00:53:17 GMT


On Mon, Nov 04, 2002 at 03:43:44PM -0600, Justin M Kuntz wrote:
>
> Hello,
>
> I've got a simple question. If I want to move a vserver from machine A to
> machine B, can I just rsync the files using a command like this (provided
> I've stopped the vserver):
>
> rsync --verbose --progress --stats --compress --rsh=/usr/bin/ssh \
> --recursive --times --perms --links --delete \
> /vservers/0001/ machine-b:/vservers/0001/
>
> The main thing that concerns me is what happens with the files inside each
> vserver's proc directory - my assumption is those are all linked, and I
> don't want them getting copied, right?

Hi Justin,

You'll also want --devices, --group, and --owner, but --archive (or
-a) is far less typing than "--recursive --times --perms --links
--devices --group --owner". You might also want --hard-links.

I have 'export RSYNC_RSH=ssh' in my profile, and use this form all the
time:

rsync -vazP /vservers/0001/ machine-b:/vservers/0001

BTW (for anyone who's interested), I did my first vserver move from
one machine to another the other week, and it went very nicely. To
minimise downtime, I did things like this:

- an rsync before stopping any services to copy the bulk of the data
  (this took a while)

- an rsync after stopping httpd, postgresql, cron, etc. and just
  leaving the most important authentication/accounting service running
  (this took about 10 minutes, mostly due to the postgresql data files
  which had changed)

- an rsync after stopping the vserver (this didn't take long at all
  since there were only a few logs changed)

- clear the arp cache on the local router

- start vserver on the new box with only the auth/acct service running

- test and check various things

- start the remaining services

The end-user visible downtime was under 5 minutes.

Of course, this was just confirmation of what I knew could be done,
but it was exciting to see it go so smoothly and quickly. Thanks
Jacques!

Regards,

-- 
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 Wed 06 Nov 2002 - 07:03:43 GMT by hypermail 2.1.3