[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems with my HD



On 29-May-2000 Mark Janssen wrote:
> On Sun, 28 May 2000, Kevin Blackham wrote:
>> On Sun, May 28, 2000 at 11:08:18PM -0300, Helber wrote:
>> > I4m having some phisical problems with my hard drive.
>> > How do I transfer all my data  from a hd to another. 
>> 
>> I've done this using "tar cvp * > outputfile" and then extracting the
>> archive 
>> to the new, mounted drive.  You'll need some temporary space, so I usually
>> just put the outputfile on the new mount. 
> 
> Then you can better use named pipes, then you won't need tempspace
> 
> mkfifo /tmp/somenamedpipe
> on <newdrive>: tar -zxvf /tmp/somenamedpipe
> and in another shell, while the above is running...
> on <olddrive>: tar -zcvf /tmp/somenamedpipe <files/dirs you want copied>

The way I normally do this is:

find <directory to copy> -print | cpio -pdumv <where to copy files>

> You can also use the tools 'mirrordir' and 'copydir', they are in the same
> package, and they copy (or copy with delete) one directory tree to
> another, in a minimal way (Compare timestamps, don't copy if even..)

I just recently wrote a custom script that "mirrors" two drives each night.
It starts by 'dd'ing the mbr and the /boot partition, then mounting the "/" and
"/var" partions on the secondary drive, use mirrordir to sync up the files,
then unmount everything on the second drive when finished.  Useing dd for the
mbr and /boot partition keeps lilo synced up on both drives, and makes sure
that the kernel is in the same physical place on the second drive.  Of course
this requires that boths drives are physically the same.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= O-
Ken Bowley/SysAdmin            mailto:johann@vikingsystems.com
Viking Systems, Inc.              http://www.vikingsystems.com
-=-=-=-=-=[Sair Linux and GNU Certified Professional]=-=-=-=-=-
It wasn't exactly a divorce -- I was traded.
                -- Tim Conway



Reply to: