From owner-freebsd-questions@FreeBSD.ORG Fri Aug 22 03:47:13 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF02416A4BF for ; Fri, 22 Aug 2003 03:47:13 -0700 (PDT) Received: from smtp4.adl2.internode.on.net (smtp4.adl2.internode.on.net [203.16.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id D03FC43FE9 for ; Fri, 22 Aug 2003 03:47:12 -0700 (PDT) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp54-162.lns1.adl2.internode.on.net [150.101.54.162])h7MAl7db078837; Fri, 22 Aug 2003 20:17:08 +0930 (CST) Content-Type: text/plain; charset="iso-8859-1" From: Malcolm Kay Organization: At home To: Dan Strick , freebsd-questions@freebsd.org Date: Fri, 22 Aug 2003 20:17:07 +0930 User-Agent: KMail/1.4.3 References: <200308212305.h7LN5wNa000496@ice.nodomain> In-Reply-To: <200308212305.h7LN5wNa000496@ice.nodomain> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200308222017.07099.malcolm.kay@internode.on.net> cc: patl+freebsd@volant.org Subject: Re: Copying an entire tree X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2003 10:47:14 -0000 On Fri, 22 Aug 2003 08:35, Dan Strick wrote: > > No, I hadn't thought of using rsync for a purely local copy. But now > > that I've tried it, add it to the list of utilities that lose the fla= gs. > > (I'm particularly interested in preserving the schg and nodump flags.= ) > > > > So far, the only thing I know of that seems to do everything right > > is cvsup. But it's really a bit cumbersome to set up for a one-time > > copy. > > I have another program that might be "a bit cumbersome to set up for a > one-time copy." You would have to edit a Makefile to specify its > installation directory and do "make install". Since the program is > designed to maintain identical (i.e. with a carefully managed set of > differences) branches of file systems on possibly large numbers of > different machines, the command syntax can be a bit messy. I routinely > use a simple shell front-end to compare and copy file system branches > on my machine(s). This program may be overkill. (Note: a command > line flag is required to enable special file copies.) > > If you are desperate and have enough free space in the file system > that is to contain the copy (which must not be the file system that > contains the original), you could use dump/restore. Since the version > of dump that comes with FreeBSD only seems to be willing to dump only > entire file systems, you have to copy the whole thing and delete > the parts you don't like. If the original and the copy have to be > in the same file system or if you don't have enough free space there > but you do have enough space somewhere else, you can make an intermedia= te > copy and trim that one down before the final copy. This should work without intermediate storage; just pipe from dump to res= tore;=20 eg # dump -0 -a -f - filesystem | restore -x -f - selected-tree Of course you need to be in the right place to get thr restore where you = want=20 it. Dump/restore is also the only technique I've found to retain the holes in= =20 holey files. Malcolm Kay