Backing up or mirroring my existing hard drive

6,478

If the spare drive is larger than the (supposedly) failing, than you can simply copy the entire disk by using the dd command:

dd if=/dev/sda of=/dev/sdb bs=1M

(Of course replace the device file names according to your configuration.)

None of these disks should be mounted, so use an Ubuntu LiveCD for running dd.

If the disk is indeed failing than you must use additional options so that bad sectors are replaced with 0 bytes.

If the disk has a GPT partition table, than you have to prevent to attach disks with identical partition GUIDs.

It is not a good idea to mirror a failing disk for obvious reasons. It seems you need a proper backup system. A mirror is not backup! It also mirrors bad data, like the result of rm -rf /. Backup is multiple snapshots taken at different times.

Share:
6,478

Related videos on Youtube

Fox
Author by

Fox

Updated on September 18, 2022

Comments

  • Fox
    Fox almost 2 years

    I'll try to keep it short - I have windows 7 and ubuntu 14.04 LTS installed.

    Windows has recently stopped working (involving all kinds of messages during start up that say that my hard drive is likely to fail soon)

    I do not have a windows recovery disk/drive handy

    I do, however, have a freshly installed blank second hard drive (internal)

    How would I go about backing everything up to the second hard drive? And for future reference, is there a way to have both hard drives sync to each other permanently?

    Thank you!