Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copying a HD to another in stages

75 views
Skip to first unread message

binary...@hotmail.com

unread,
Apr 13, 2005, 2:16:51 PM4/13/05
to
Hi,

How can I accomplish this? I would like to use dd, I think, since cp is
not really what I'm looking for - eg. if the 2nd drive is unformatted,
and the 1st is Reiser, the 2nd one will automatically become Reiser,
yes? At leas, till the part that the files take up?

If not, and the 2nd is formatted to Reiser, will just cp work? What's
the exact command, to make sure it copies *everything*?

In any case, how do I do it in stages? ie. copy a bit, and then resume
from where the first copying left off? My first drive is pretty old and
rickety, I DON'T want a continuous 10GB read from it, it is *sure* to
kill it.

Thanks a lot,


The Nomad.

HeWill...@yahoo.com

unread,
Apr 13, 2005, 8:03:31 PM4/13/05
to
I came up with a way using find and a shell script. Do you have perl?
If so I could write a better way. The problem with using a shell
script is having it pause periodically like you want it to. In perl it
would be easier. Here is one way using the shell, tar, and find:
1) format new drive & make the file system & mount it at /newdrive
2) create the shell script: (as root)
cat > /tmp/ttt
#/bin/sh -v
tar -cf - "$1" | ( cd /newdrive; tar -xf - )
(hit ctrl-d)
chmod 755 /tmp/ttt
cd (source directory)
find . -exec /tmp/ttt {} \; -exec sleep 1 \;

This will copy over one file at a time and then sleep 1 second. Very
slow to do a whole disk. It's just an idea to help you get started.
I'll try to think of a more clever way to pause less frequently.

Boyd
P.S. You can write me directly at TBMoore(remove the
parenthesis)@bealenet.com

0 new messages