Results 1 to 8 of 8

Thread: Clone a live disk as backup (to cure a missing RAID)

  1. #1
    Join Date
    Aug 2006
    Beans
    92
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Question Clone a live disk as backup (to cure a missing RAID)

    Hey folks,

    I've got a running system here but upon setup of the box I did not think about founding it all on a redundancy solution of some sort, first choice would have been a RAID 1. Anyway, now I am here with the problem that my main drive might fail any time.

    Moving data to a temp location, re-setting-up the system, and moving data back is *currently* no option. But installing another harddrive and mirroring all data as a sort of "near RAID 1" would be an option.

    No, what technique would you recommend to copy or clone my main drive? I could think of a near-realtime solution, with a cron, let's say every 20 minutes, to copy/identify new data. But what tool can help me with that?

    And- is there a way to exactly clone the drive, including bootrecords etc. so in a case of failure of drive 1, I just need to switch cables over to drive 2? Is there a way to do it incrementally, so the clone process doesn't start from scratch each time (peformance!)

    Any hints and tool recommendations welcome!

  2. #2
    Join Date
    Feb 2007
    Location
    Cameron Park CA USA
    Beans
    4,571
    Distro
    Ubuntu Development Release

    Re: Clone a live disk as backup (to cure a missing RAID)

    Use the dd command to copy the whole disk to another disk.

    Then use rsync to incrementally copy only the changes.
    Regards, frank, at http://yantrayoga.typepad.com/noname/
    Homebuilt Lian-Li PC-Q33WB, Intel i7-4790K 4.6GHz, SSDs,32G RAM | Dell Laptop 13.3".
    Oracle VBox w/ WinXP/Win10 running Xara Designer, PaintShopPro, and InDesign CS.

  3. #3
    Join Date
    Aug 2006
    Beans
    92
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: Clone a live disk as backup (to cure a missing RAID)

    Any ready-to-use command and options suggestions for that solution?

  4. #4
    Join Date
    Feb 2007
    Location
    Cameron Park CA USA
    Beans
    4,571
    Distro
    Ubuntu Development Release

    Re: Clone a live disk as backup (to cure a missing RAID)

    First, of course, you have to install dd and rsync if they are not already on your system.

    # disk image, clone
    Code:
    sudo dd if=/dev/hda of=/dev/hdb bs=4096 conv=notrunc,noerror
    I use grsync, not rsync, and don't have it in a cron script:

    Code:
    sudo rsync -r -t -p -o -g --delete /home/raid/ /media/backup/raid/
    I trust you can understand these powerful commands. I would study the man pages for both before using them.

    You have to learn cron to put the rsync command in it. I don't use cron and know little or nothing about it. Others here do know all there is to know. Let them speak out. <smile>
    Regards, frank, at http://yantrayoga.typepad.com/noname/
    Homebuilt Lian-Li PC-Q33WB, Intel i7-4790K 4.6GHz, SSDs,32G RAM | Dell Laptop 13.3".
    Oracle VBox w/ WinXP/Win10 running Xara Designer, PaintShopPro, and InDesign CS.

  5. #5
    Join Date
    Aug 2006
    Beans
    92
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: Clone a live disk as backup (to cure a missing RAID)

    Thanks for your effort!

    BTW: do I have to unmount the main disk before dd (which would be undesireable). Rsync has no problems with disk changes while it runs, afaik (due to its upfront file list gathering)

  6. #6
    Join Date
    Feb 2007
    Location
    Cameron Park CA USA
    Beans
    4,571
    Distro
    Ubuntu Development Release

    Re: Clone a live disk as backup (to cure a missing RAID)

    Regarding dd, I think it would be a good idea to have both drives unmounted. But the man pages may give a note on the need to do that.

    I never unmount my raid5 when using grsync.
    Regards, frank, at http://yantrayoga.typepad.com/noname/
    Homebuilt Lian-Li PC-Q33WB, Intel i7-4790K 4.6GHz, SSDs,32G RAM | Dell Laptop 13.3".
    Oracle VBox w/ WinXP/Win10 running Xara Designer, PaintShopPro, and InDesign CS.

  7. #7
    Join Date
    Nov 2006
    Location
    Belgium
    Beans
    3,025
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Clone a live disk as backup (to cure a missing RAID)

    been there, done that - or at least i tried it once in a test environment (vmware)
    http://users.telenet.be/mydotcom/how...skfakeraid.htm

  8. #8
    Join Date
    Feb 2007
    Location
    Cameron Park CA USA
    Beans
    4,571
    Distro
    Ubuntu Development Release

    Re: Clone a live disk as backup (to cure a missing RAID)

    Very well done, and good too. Thanks, koenn!
    Regards, frank, at http://yantrayoga.typepad.com/noname/
    Homebuilt Lian-Li PC-Q33WB, Intel i7-4790K 4.6GHz, SSDs,32G RAM | Dell Laptop 13.3".
    Oracle VBox w/ WinXP/Win10 running Xara Designer, PaintShopPro, and InDesign CS.

Tags for this Thread

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
  •