Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 1995 18:59:58 -0800 (PST)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        mark@grondar.za (Mark Murray)
Cc:        hackers@freebsd.org
Subject:   Re: Replicating system.
Message-ID:  <199501050259.SAA07857@gndrsh.aac.dev.com>
In-Reply-To: <199501041812.UAA07065@grunt.grondar.za> from "Mark Murray" at Jan 4, 95 08:12:01 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501050259.SAA07857>