Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Apr 2003 07:45:27 +0200
From:      Axel Gruner <axel.gruner@suedfactoring.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: Cloning a jail
Message-ID:  <20030402074527.30a449b1.axel.gruner@suedfactoring.de>
In-Reply-To: <20030401143251.GA4560@poecilotheria.netmails.net>
References:  <20030401143251.GA4560@poecilotheria.netmails.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi.

On Tue, 1 Apr 2003 08:32:51 -0600
Hari Bhaskaran <subscr@spider.netmails.net> wrote:

> When I need to clone a jail, would a cp -Rp do?

Yes and no. 
To do a exact copy of a jail, use the "cpdup" program (it is in the
ports).

> (and change rc.conf). Or do I have to go through
> the jail(8) steps again? (make hierarchy, install etc).

No. That would take to much time ;). Use "cpdup".
Just change the IP and stuff in rc.conf. Also use a new startup script
on the host system /usr/local/etc/rc.d/ Thats it.

> By 'clone', I meant an identical jail session,
> on top of which I will install other packages,
> not necessarily same on both.

see above.
 
> Also can I hardlink a tree (outside) to inside
> the jail? assuming I don't mind it being writeable.
> Would it open a hole to the rest of the system?

You can use "mount_nullfs" from the host system. 
Or NFS to on the hostsystem. With that you can do a NFS mount from
/usr/ports of the hostsystem to /jail/usr/ports. I do that with my
jails. Works great.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030402074527.30a449b1.axel.gruner>