[vserver] Re: [Vserver] Vserver copy. The saga continues!

From: <vserver_at_pineview.net>
Date: Sun 29 Jul 2007 - 00:19:42 BST
Message-ID: <46ABCF0E.5060400@pineview.net>

Roderick A. Anderson wrote:
> The builds using rsync are going well but this has created a bit of a
> problem. Typically I build using yum as the method. This creates all
> the necessary files in /etc/vservers/<guest>/apps. Using rsync doesn't.
>
> Is there a command/incantation to convert a vserver guest to another
> package-management system like yum, apt-get, etc?
>
> I suspect the pieces to do this are in the vserver script but if the
> method is just undocumented it would be quicker.
>
>
> TIA,
> Rod
Hi Rod

I have been using this script for years with out issue

#!/bin/bash
VS=$1
DST=$2

rsync --delete -e 'ssh -p 2222' -Pav --numeric-ids /vservers/$VS/*
--exclude=proc/* root@$DST:/vservers/$VS
ssh -p 2222 root@$DST "remountrw"
rsync --delete -e 'ssh -p 2222' -Pavl --numeric-ids /etc/vservers/$VS/*
root@$DST:/etc/vservers/$VS
ssh -p 2222 root@$DST "remountro"
rsync --delete -e 'ssh -p 2222' -Pavl --numeric-ids
/var/run/vservers/$VS root@$DST:/var/run/vservers/$VS
ssh -p 2222 root@$DST "remountrw ; echo none >
/etc/vservers/$VS/apps/init/mark ; remountro"

This copy my vserver all over the place and they always work

Mike
Received on Sun Jul 29 00:19:50 2007

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sun 29 Jul 2007 - 00:19:51 BST by hypermail 2.1.8