On Thu, Jun 12, 2003 at 08:03:58AM +0200, Ola Lundqvist wrote: > Hello > > On Thu, Jun 12, 2003 at 02:05:43AM +0200, Herbert Poetzl wrote: > > On Wed, Jun 11, 2003 at 04:55:55PM -0700, Roderick A. Anderson wrote: > > > And deleting vservers. > > > > > > Just because my last two posts caused so much 'interest' I'll get another > > > going. :-) > > > > > > In another fix of insanity I created a new vserver by cloning a _running_ > > > vserver and unifying disk space. Big mistake it appears. Now I can't > > I have created a tool to clone (even a running) vserver. It is available > from the Debian vserver package (in the debian/ dir in the Debian source too). > It is called dupvserver. What it does is in fact just a rsync of the directory > (so i plan to extend it to copy the files to an other host) with /proc/ > and /dev/pts/ excluded. Then it changes the name of the host and ip in the > configuration and also in /etc/hosts (etc) inside the new vserver. > > Most intrersting parts is here: > > rsync -a --delete \ > --exclude=/proc --exclude=/dev/pts\ > $VSERVERS_ROOT/$FROM/ $VSERVERS_ROOT/$TO > mkdir -p $VSERVERS_ROOT/$TO/proc > mkdir -p $VSERVERS_ROOT/$TO/dev/pts
hmm, so I have to modify this script, if I do additional mounting like mount --bind /var/tmp /tmp or something similar in the vserver? best, Herbert > In Debian I have patched vserver to allow other directories than /vservers, so > that is the reason for $VSERVERS_ROOT. > > Regards, > > // Ola > > -- > --------------------- Ola Lundqvist --------------------------- > / [EMAIL PROTECTED] Annebergsslingan 37 \ > | [EMAIL PROTECTED] 654 65 KARLSTAD | > | +46 (0)54-10 14 30 +46 (0)70-332 1551 | > | http://www.opal.dhs.org UIN/icq: 4912500 | > \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 / > ---------------------------------------------------------------
