Date: Wed, 3 Oct 2001 04:59:50 -0500 From: Mike Meyer <mwm@mired.org> To: Tim Singletary <tsingle@vetinsite.com> Cc: questions@freebsd.org Subject: Re: `cp -Rp' vs `pax -r -w'; setting up multiple jails Message-ID: <15290.57750.60631.476946@guru.mired.org> In-Reply-To: <66297919@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Tim Singletary <tsingle@vetinsite.com> types: > I'm setting up several nearly-identical jails on the same computer. > It takes several hours to set up each from scratch; I'd like to be > able to set up the first jail and then use it as a template to set up > the remaining jails. > > My `template' jail is in /jail/192.168.0.61; I want to set up > additional jails in /jail/192.168.0.62, /jail/192.168.0.63, etc. I've > tried several ways to copy the template tree, including: [describes problems with hard links] > Both methods work acceptably, but neither is perfect. Is there a > better way? Both tar and cpio handle hard links correctly. If you plan to keep a static template, I'd suggest tarring up and compressing the template directory. Then just untar it to create the new one. If you want to copy whatever is currently in the template directory, I'd recommend something like: # cd /jail # find 192.168.0.61 -print0 | cpio -pd0 tmp # mv tmp/192.168.0.61 192.168.0.63 You can even use the -l option so that it just creates hard links between the files in the two jails, if that's an acceptable option for you. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15290.57750.60631.476946>