Date: Fri, 22 Aug 2003 20:17:07 +0930 From: Malcolm Kay <malcolm.kay@internode.on.net> To: Dan Strick <strick@covad.net>, freebsd-questions@freebsd.org Cc: patl+freebsd@volant.org Subject: Re: Copying an entire tree Message-ID: <200308222017.07099.malcolm.kay@internode.on.net> In-Reply-To: <200308212305.h7LN5wNa000496@ice.nodomain> References: <200308212305.h7LN5wNa000496@ice.nodomain>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308222017.07099.malcolm.kay>