Re: [Vserver] One More Time - copy a Guest from system to system

From: Daniel Hokka Zakrisson <daniel_at_hozac.com>
Date: Wed 11 Jul 2007 - 14:44:32 BST
Message-ID: <55459.192.168.102.6.1184161472.squirrel@intranet>

Roderick A. Anderson wrote:
> Daniel Hokka Zakrisson wrote:
>> Roderick A. Anderson wrote:
>>> I've been all through the Wiki and old docs, searched using Google,
>>> looked through my _OLD_ messages (back to 2003) and still can't come up
>>> with a well defined method to copy a (running if possible) vserver
>>> guest
>>> from one system to another.
>>>
>>> From my reading I think I need to build the _new_ guest 'mynewone'
>>> using the skeleton method. Then rm all the files in /vserver/mynewone
>>> and follow that with a rsync from the _old_ guest to the _new_ guest.
>>> Unfortunately the vserver docs are from the CTX kernels. A vserver
>>> --help gets a semi-useful help screen. Any newer docs?
>>>
>>> What special rsync switches do I need or use to make this process
>>> doable? As in it is a running guest that I'd prefer not taking down
>>> until the actual move I'm sure /proc and maybe /dev could cause
>>> problems.
>>>
>>> The need for the hot copy is because the _old_ guest has a big pile of
>>> installed perl modules and _other_ software packages. It would be
>>> easier to copy than (re)install them. :-)
>>
>> The way I'd do it:
>> export RSYNC_RSH=ssh
>> vserver <guest> build -m rsync --context ... -- --source
>> root@otherhost:/vservers/<guest>/
>
> I've got this far but since it is getting a new IP I used that instead
> of the current IP. Not a high traffic site so after I change to the old
> IP I'll try this next step.
>
>> <make sure it's good, stop the guest on the other host>
>
> How not good? I'm thinking rsync does it right so maybe my invocation
> could have been wrong. ???

It's always best to make sure something didn't go terribly wrong... ;-)

>> rsync -Hazx --numeric-ids root@otherhost:/vservers/<guest>/
>
> The man page for rsync seems to indicate that the -H switch will be in
> conflict with the -a switch or the other way around.

To me, it just says that -a doesn't include -H.

> Rod
> --
>> /vservers/<guest>/
>> vserver <guest> start
>>
>> --
>> Daniel Hokka Zakrisson

-- 
Daniel Hokka Zakrisson
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Wed Jul 11 14:49:40 2007
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 11 Jul 2007 - 14:49:41 BST by hypermail 2.1.8