Ask a Question related to Ubuntu, Design and Development.

  1. #1

    Default Cloning a disk



    Hi all

    What are people's preferences here on how to clone a server disk to a new
    larger one? Am about to replace 60G IDE with faster 250G SATA.

    I would like it to:

    - be difficult to mess up, preferably a debian/ubuntu package that takes
    care of all messy details e.g. symlinks, permissions, dates

    - be completely reliable

    - avoid fiddling about too much i.e. the use of floppies or ftp servers

    TIA

    Michael


    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    _/ _/ _/_/_/ Hopkins Research Ltd
    _/ _/ _/ _/
    _/_/_/_/ _/_/_/ [url]http://www.hopkins-research.com/[/url]
    _/ _/ _/ _/
    _/ _/ _/ _/ 'touch the future'

    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


    Michael Hopkins Guest

  2. Similar Questions and Discussions

    1. Cloning
      Okay, well that is what they call it in that Jasc software. But in illustrtor what would I do to do this? (Imagine a stick figure with trees behind...
    2. labeling a disk on AIX 5L / disk cmds
      Hi folks ! I have got two question about disk operations: (01) Is there a separate cmd to explictly label a disk ? I don't mean assigning a...
    3. Removable disk, mapped network disk and drive letter problem
      I don't know why this is such a big problem in Windows, but I hope somebody has a solution for it. You know those USB card readers used for...
    4. Installing Oracle Software on Local Disk Vs Shared Disk
      Hi I am investigating on several options for a multi node VCS cluster to house oracle databases. Where would it be most advantageous to...
  3. #2

    Default Re: Cloning a disk

    In uk.comp.os.linux, on Mon 08 May 2006 12:28, Michael Hopkins
    <michael.hopkins@hopkins-research.com> wrote:
    > What are people's preferences here on how to clone a server disk to a
    > new larger one? Am about to replace 60G IDE with faster 250G SATA.

    man fdisk
    man cp (pay attention to the -a option)
    >
    > I would like it to:
    >
    > - be difficult to mess up,
    fdisk is not very easy to mess up

    cp will not copy nothing over something so is also hard to mess up

    > preferably a debian/ubuntu package
    Sorry, fdisk and cp are basic shell commands rather than a debian
    package :-(
    >
    > that takes care of all messy details e.g. symlinks, permissions,
    > dates
    cp -a does this
    >
    > - be completely reliable
    cp is very reliable
    >
    > - avoid fiddling about too much i.e. the use of floppies or ftp
    > servers
    >
    No need for either
    > TIA
    >
    > Michael
    >
    >
    >
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    >
    > _/ _/ _/_/_/ Hopkins Research Ltd
    > _/ _/ _/ _/
    > _/_/_/_/ _/_/_/ [url]http://www.hopkins-research.com/[/url]
    > _/ _/ _/ _/
    > _/ _/ _/ _/ 'touch the future'
    >
    >
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    Please correct your .sig separator
    --
    Robert HULL

    Archival or publication of this article on any part of thisishull.net
    is without consent and is in direct breach of the Data Protection Act
    Robert Hull Guest

  4. #3

    Default Re: Cloning a disk

    Michael Hopkins wrote:
    >
    > Hi all
    >
    > What are people's preferences here on how to clone a server disk to a new
    > larger one? Am about to replace 60G IDE with faster 250G SATA.
    >
    > I would like it to:
    >
    > - be difficult to mess up, preferably a debian/ubuntu package that takes
    > care of all messy details e.g. symlinks, permissions, dates
    >
    > - be completely reliable
    >
    > - avoid fiddling about too much i.e. the use of floppies or ftp servers
    >
    > TIA
    >
    > Michael

    Hi Michael,

    The disk-duplicator program (man dd) can be used to copy partitions
    across disks, and may be worth looking at. Since it copies whole
    partitions, symlinks, permissions, etc. are maintained across copies.

    If both hard disks are on the same machine, booting off Knoppix and
    copying partitions should be fairly easy. For eg: dd if=/dev/hda1
    of=/dev/sda1

    Regards,
    Vinay.
    VS Guest

  5. #4

    Default Re: Cloning a disk

    On Mon, 08 May 2006 12:28:45 +0100, Michael Hopkins
    <michael.hopkins@hopkins-research.com> wrote:
    >
    >
    >Hi all
    >
    >What are people's preferences here on how to clone a server disk to a new
    >larger one? Am about to replace 60G IDE with faster 250G SATA.
    >
    >I would like it to:
    >
    > - be difficult to mess up, preferably a debian/ubuntu package that takes
    > care of all messy details e.g. symlinks, permissions, dates
    >
    > - be completely reliable
    >
    > - avoid fiddling about too much i.e. the use of floppies or ftp servers
    Download the bootable iso of G4U and use it.


    [url]http://www.feyrer.de/g4u/[/url]


    greg
    --
    Every Villian Is Lemons
    Greg Hennessy Guest

  6. #5

    Default Re: Cloning a disk

    Michael Hopkins wrote:
    > What are people's preferences here on how to clone a server disk to a new
    > larger one? Am about to replace 60G IDE with faster 250G SATA.
    Put the new disk in the machine, partition it and use somthing like:
    cp -var /source/ /destination/
    > I would like it to:
    >
    > - be difficult to mess up, preferably a debian/ubuntu package that takes
    > care of all messy details e.g. symlinks, permissions, dates
    Check.
    > - be completely reliable
    You'd get an error message, if there was a problem.
    > - avoid fiddling about too much i.e. the use of floppies or ftp servers
    Fiddle-free.


    --
    Research is what I'm doing, when I don't know what I'm doing.
    (von Braun)

    Rikishi 42 Guest

  7. #6

    Default Re: Cloning a disk

    On 8/5/06 22:45, in article [email]ioq4j3-431.ln1@whisper.geuens.org[/email], "Rikishi 42"
    <fsck_spam@telenet.be> wrote:
    > Michael Hopkins wrote:
    >
    >> What are people's preferences here on how to clone a server disk to a new
    >> larger one? Am about to replace 60G IDE with faster 250G SATA.
    > Put the new disk in the machine, partition it and use somthing like:
    > cp -var /source/ /destination/
    >
    >> I would like it to:
    >>
    >> - be difficult to mess up, preferably a debian/ubuntu package that takes
    >> care of all messy details e.g. symlinks, permissions, dates
    > Check.
    >
    >> - be completely reliable
    > You'd get an error message, if there was a problem.
    >
    >> - avoid fiddling about too much i.e. the use of floppies or ftp servers
    > Fiddle-free.
    >
    Thanks to all for suggestions.

    I am used to rsync, so I will probably partition disk and then go that way
    with excludes for /swap & such. I hadn't thought about cp -var but may look
    into that too.

    M


    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    _/ _/ _/_/_/ Hopkins Research Ltd
    _/ _/ _/ _/
    _/_/_/_/ _/_/_/ [url]http://www.hopkins-research.com/[/url]
    _/ _/ _/ _/
    _/ _/ _/ _/ 'touch the future'

    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


    Michael Hopkins Guest

  8. #7

    Default Re: Cloning a disk

    In article <hIL7g.84335$dW3.22247@newssvr21.news.prodigy.com> ,
    VS <vs@noidea.net> wrote:
    >The disk-duplicator program (man dd) can be used to copy partitions
    >across disks, and may be worth looking at. Since it copies whole
    >partitions, symlinks, permissions, etc. are maintained across copies.
    I'm just being a boring old fart who'd been using *nix for almost 30
    years now... dd means convert and copy, but cc had already been used.

    It's original use was for converting tape files, and dealing with EBCDIC
    and ASCII conversions.

    However, it does copy disks and partitions quite well.

    The down-side is that the partitions & disks need to be exactly the same
    size to do the copy successfully, and although there does exist various
    partition and filesystem re-sizing utilities, you're far better off
    without them IMO unless it's a real emergency, or you have no other
    choice.

    Gordon
    Gordon Henderson Guest

  9. #8

    Default Re: Cloning a disk

    On Mon, 08 May 2006 23:01:44 +0100, Michael Hopkins wrote:
    >
    > Thanks to all for suggestions.
    >
    > I am used to rsync, so I will probably partition disk and then go that way
    > with excludes for /swap & such. I hadn't thought about cp -var but may look
    > into that too.
    I've just been through both with Debian Sarge,
    dd and rsync copies of boxes.

    I much preferred dd, which also does XP disk upgrades fine as well;
    [url]http://www.debian-administration.org/users/simonw/weblog/34[/url]

    Roughly the rsync route was;

    Base install on new server.
    Sync apt settings (used rsync on /etc/apt). apt-get update.
    Use dpkg set selection to match up the base systems (probably not strictly
    required as rsync does most of this, but I figured better safe than
    sorry). I manually changed the kernel entries and one or two others in the
    selection file.

    Then (and it'll need customising).

    rsync -avz \
    --exclude /etc/apt \
    --exclude /sys \
    --exclude /dev \
    --exclude /proc \
    --exclude /boot \
    --exclude "/vmlinu*" \
    --exclude "/initrd*" \
    --exclude /etc/network \
    --exclude /etc/modules \
    --exclude /etc/modules.conf \
    --exclude /lib/modules \
    --exclude /etc/mdadm \
    --exclude /etc/fstab \
    --exclude /etc/mtab \
    --exclude "/var/lib/dpkg/info/kernel-image-2.4.27-2-686-smp*" \
    --exclude "/var/lib/dpkg/info/kernel-image-2.6.8-2-386*" \
    --exclude /var/spool \
    --exclude /var/run \
    / $DESTINATION:/

    I then had separate scripts to sync some data from "/var/spool" once the
    mail server and other services were stopped. And also one to sort out
    "/etc/network/interfaces".

    I also wrote a script to stop/start services on both boxes (same set of
    services of course, so same script), since that is useful, and easier than
    single user mode.

    Running "update-grub" on the target is a good idea afterwards depending
    what happened to the kernel packages, but of course grub give you plenty
    of scope to TRY(!) and rescue things if you didn't.

    Chances are your mileage will vary -- I had to mess about a bit because
    the new machine couldn't use the same stock Debian kernels as the old. So
    far my frankstein machine doesn't show any ill effects from the move, and
    I used the same scripts to clone it back to the original when the hardware
    was fixed.

    I also did the odd "apt-get clean" and purged CPAN cache, and excluded
    backups etc, to speed the process before I ran the rsync.

    The good thing about rsync is you can do it again after testing, if it
    didn't work. But note I didn't include "--delete" so you risk accumulating
    spare files.

    Compared to "dd" this all seems very hit and miss to me, I have more faith
    in gparted, and the ability of most modern filesystems to be resized, than
    in my ability to get this transfer 100%.

    Although generally for dd you ideally want a large external hard disk,
    and plenty of down time, the sarge server I did got swapped with less than
    5 minutes down time, and most of that was me manually running a handful
    of scripts, and a reboot to make sure it looked solid.

    Use "dd", live less close to the edge.

    Simon Waters Guest

Posting Permissions

  • You may not post new threads
  • You may 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