Copying a HD to another in stages - Unix

This is a discussion on Copying a HD to another in stages - Unix ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Copying a HD to another in stages

  1. Copying a HD to another in stages

    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.


  2. Re: Copying a HD to another in stages

    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


  3. Re: Copying a HD to another in stages


    binary-nomad@hotmail.com wrote:

    >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.
    >
    >

    use rsync with the -bwlimit command. that will make sure you have a
    copy of the entire drive and you can throttle the bandwidth.
    man rsync
    --

    _____cliff_rayman_________________________________ ____
    Business Consulting and Turnaround Management
    [web] http://www.rayman.com/
    [web] http://all-clear-turnaround-management.com/
    __________________________________________________ ___

  4. Re: Copying a HD to another in stages

    binary-nomad@hotmail.com wrote:

    > 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.

    Track down a copy of the HARD DISK UPGRADE HOWTO of the LDP. It'll give you
    some really nice info along the lines of what you want to do. The only step
    you may want to change is formatting the target hard drive as reiser,
    making sure the kernel you arte going to use has the reiser module compiled
    in the kernel (not a module), make the necessary fstab change and tell
    grub/lilo about your plans....


    Cheers.

    PS. I use that HOWTO all the time and have reduced it to a simple bash
    script for cloning hard drives for laptops that I host.



    --

    ************************************************** ****************************
    Registered Linux User Number 185956
    FSF Associate Member number 2340 since 05/20/2004
    Join me in chat at #linux-users on irc.freenode.net
    Buy an Xbox for $149.00, run linux on it and Microsoft loses $150.00!
    12:14am up 6 days, 7:21, 1 user, load average: 0.00, 0.00, 0.00

+ Reply to Thread