Replacing Hard Drive
Duston, Hal
hdusto01 at sprintspectrum.com
Wed Sep 27 18:48:47 CDT 2000
Gene,
Replacing to do impending failure? If you can install
the new drive alongside the old one, then you should be
able to use cpio to copy everything. First to a mkfs on
the new drive, then mount the new drive somewhere, say,
/Disk. Then use find+cpio to copy all files from / to
/Disk. Be sure to use all cpio options that preserve
owner, mode, and all date/time's. Also be sure that you
don't try to copy the /Disk directory into /Disk/Disk.
Some examples from the HP/UX "find" man.
Copy the entire file system to a disk mounted on /Disk, avoiding the
recursive copy problem. Both commands are equivalent (note the use of
-path instead of -name):
cd /; find . ! -path ./Disk -only -print | cpio -pdxm /Disk
cd /; find . -path ./Disk -prune -o -print | cpio -pdxm /Disk
Copy the root disk to a disk mounted on /Disk, skipping all mounted
file systems below /. Note that -xdev does not cause / to be skipped,
even though it is a mount point. This is because / is the starting
point and -xdev only affects entries below starting points.
cd /; find . -xdev -print | cpio -pdxm /Disk
I _think_ that these are equivalent if your entire system is on one drive.
I don't have a Linux box handy, but this should work, with these or similiar
options.
Good luck,
Hal
H:hald at sound.net
W:hdusto01 at sprintspectrum.com
on Wednesday, September 27, 2000 at 12:23 PM
Gene Dascher [gedascher at multiservice.com] wrote:
> I might have to replace the hard drive in my Linux Box and
> was wondering if there was an easy way to transfer my
> existing configuration over to the new drive. Or would I
> be better off installing Linux from scratch and restoring
> my data from backups.
>
> Thanks,
>
> Gene Dascher
> Multi Service Corp.
> gedascher at multiservice.com
> (913)663-9415
More information about the Kclug
mailing list