Professional Web Applications Themes

Copying a HD to another in stages - Linux / Unix Administration

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

  1. #1

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

    binary-nomad@hotmail.com Guest

  2. #2

    Default 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

    HeWillRejoice@yahoo.com Guest

  3. #3

    Default Re: Copying a HD to another in stages


    com wrote:
     
    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/
    __________________________________________________ ___
    ___cliff Guest

  4. #4

    Default Re: Copying a HD to another in stages

    com wrote:
     
    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
    Jerry Guest

Similar Threads

  1. Are parallel stages possible within Flex applications?
    By Altheran in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: May 15th, 05:35 PM
  2. Button stages
    By SeaJaye in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: May 24th, 02:04 PM
  3. Linking stages
    By David_4321 in forum Macromedia Director Basics
    Replies: 2
    Last Post: May 13th, 07:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139