From owner-freebsd-hackers Wed Jan 4 19:01:15 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id TAA08357 for hackers-outgoing; Wed, 4 Jan 1995 19:01:15 -0800 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id TAA08350 for ; Wed, 4 Jan 1995 19:01:05 -0800 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.8/8.6.6) id SAA07857; Wed, 4 Jan 1995 18:59:59 -0800 From: "Rodney W. Grimes" Message-Id: <199501050259.SAA07857@gndrsh.aac.dev.com> Subject: Re: Replicating system. To: mark@grondar.za (Mark Murray) Date: Wed, 4 Jan 1995 18:59:58 -0800 (PST) Cc: hackers@freebsd.org In-Reply-To: <199501041812.UAA07065@grunt.grondar.za> from "Mark Murray" at Jan 4, 95 08:12:01 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2029 Sender: hackers-owner@freebsd.org Precedence: bulk > > OK - picture the scene; > > 1) Working 2.x-current system (also in use as a "general hacking" system) > 2) 2 SCSI disks (450MB total), 1 SCSI tape, 1 SCSI CDROM, 1 AH1542. > 3) 1 Brand new 1GB SCSI disk :) :) :) > 4) No (more) money ;-) > > Now - (thinks) How do I best copy the contents of the two disks to the > new SCSI? I have done this before by tar-ing to a tape and restoring, > but a file or 10 in /var/... got bust. Same for dump-ing to a tape. > > I can take out the second drive (/usr/src), but still leaves the > problem of how to best get the live /var area over... > (I recall that one of the problem files was a socket(?) in > /var/run/printer= with mode srwxrwxrwx) > > I would prefer not to re-install, as this would take a PILE of work > to get back to -current. I am reasonably sure that with some concentrated > hacking I could get it right, but maybe someone knows a clever trick? > > If anyone has done this more than I (2x), or more cleverly than I (easy), > please let me know how you did it. I do this kind of stuff all the time. From the above I am going to assume you only have a 2 drive SCSI cable, first thing I would do would be to get me a 3 or 4 drive cable. boot up single user fsck -p mount -a -t ufs prep new disk rm /var/spool/printer (it's just a socket that will get created) or for that matter find / -type s | xargs rm Copy the file systems over root file system over cd /; find . -xdev | cpio --block-size=16 -pdamu /newroot cd /var; find . -xdev | cpio --block-size=16 -pdamuv /newroot/var ... I prefer to use cpio, it just seems to be far more robust about copying filesystems, that and I come from the days before tar ever existed :-), the --block-size things speeds it up considerabley. > > Thanks! > M > -- > Mark Murray > 46 Harvey Rd, Claremont, Cape Town 7700, South Africa > +27 21 61-3768 GMT+0200 > -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD