On Tuesday 29 November 2005 19:12, Lars Hallberg wrote:
> I'm new to VServer and need a way copy vservers, in short term.
> vserver-copy don't work no more and replacment is not done yet? This is
> a small script to (on local host only) copy a vserver.
>
> What I wonder before taking it further is.... Have I missed something
> important?
[.. script ..]
10 cents :
1) copy the .pkg dir, usually /vservers/.pkg/$from, which has a link under
/etc/vservers/<vserver>/apps/pkgmgmt/base . Used if you build vservers with
"vserver vs build"
$copy $confdir/$from/apps/pkgmgmt/base/. $confdir/.defaults/vdirbase/.pkg/$to
cd $confdir/$to/apps/pkgmgmt
ln -fs $confdir/.defaults/vdirbase/.pkg/$to base
2) modify name automatically to avoid errors ?
echo $to > $confdir/$to/name
echo $to > $confdir/$to/interfaces/0/name
ed $confdir/$to/uts/nodename <<EOF
1,\$s/$from/$to/
w
q
EOF
3) modify IP automatically ?
4) modify context number automatically (if you use static context numbers,
which is preferred) ?
>
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
-- Xavier Montagutelli Service Commun Informatique Universite de Limoges Tel : +33 555457720 Cle GPG : http://pgp.mit.edu 1024D/175CE198 _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserverReceived on Tue Nov 29 18:41:45 2005