Results 1 to 5 of 5

Thread: must a partition be unmounted to use dd to clone/back it up?

  1. #1
    Join Date
    Mar 2009
    Beans
    12

    must a partition be unmounted to use dd to clone/back it up?

    Hi.

    I've never seen it explicitly stated anywhere - maybe because it's common knowledge I don't have - and because I don't want to fool around with it testing it out because I've heard it's a very powerful command, but to use dd at the command line to back up a partition, or a full disk for that matter, must the partition/disk you wish to back up/clone be unmounted first?

    If the answer is yes, does anyone know if dd could be used in an OS X terminal to back up a Linux partition on a dual boot Mac? My understanding, via the wisdom of Cyberdork, is that using Disk Utility to create DMG clones of partitions that are formatted with a system other than HFS+ or one of its variants isn't possible, which makes me question the use of dd in OS X to clone anything other than HFS+ volumes only because I have no idea if there is a relationship between the function of the Disk Utility app and dd.

    Thanks in advance.

    To those in the States, happy BBQ Day ("independence" is so subjective, lol).
    My sincere gratitude & appreciation goes to all of you here on the Apple Forum who contribute & share your knowledge and expertise so freely and without want of anything in return.

  2. #2
    Join Date
    Dec 2009
    Beans
    30

    Re: must a partition be unmounted to use dd to clone/back it up?

    Yes, DD doesn't work on mounted volumes. It sounds like you can do what you need by creating a disk image of the disk from Disk Utility.

    P.S. From what I've seen, Disk Utility is simply easier to use.

    Correction: I was wrong. Thank you, Dennis, for pointing this out. And excuse me for attempting to answer a previously unanswered question.
    Last edited by nathanid95; December 7th, 2009 at 01:42 AM. Reason: inaccuracy

  3. #3
    Join Date
    Dec 2008
    Beans
    124
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: must a partition be unmounted to use dd to clone/back it up?

    dd is my standard backup tool, i use it for partitions and more often full disks. just run it from a linux livecd on unmounted partitions/disks. why do you need macosx to backup linux partitions?
    Lo runs Kubuntu 9.10-amd64 on a MacBookPro 5.1, and feels Karmic :~)

  4. #4
    Join Date
    Apr 2009
    Beans
    55

    Re: must a partition be unmounted to use dd to clone/back it up?

    Quote Originally Posted by nathanid95 View Post
    Yes, DD doesn't work on mounted volumes. It sounds like you can do what you need by creating a disk image of the disk from Disk Utility.

    P.S. From what I've seen, Disk Utility is simply easier to use.
    You've bumped a topic from July, and replied with bogus information!

    DD *does* work on mounted volumes, it is what is known in the forensics world as a "live acquisition"

    test it if you like -
    Code:
    sudo dd if=/dev/sda bs=1k count=1 | xxd
    will show you the first kilobyte of your hard disk, in hex.
    Last edited by dennis123123; December 6th, 2009 at 02:26 PM.

  5. #5
    Join Date
    Oct 2009
    Beans
    64

    Re: must a partition be unmounted to use dd to clone/back it up?

    Quote Originally Posted by dennis123123 View Post
    You've bumped a topic from July, and replied with bogus information!

    DD *does* work on mounted volumes, it is what is known in the forensics world as a "live acquisition"

    test it if you like -
    Code:
    sudo dd if=/dev/sda bs=1k count=1 | xxd
    will show you the first kilobyte of your hard disk, in hex.
    OK - so, here's another question: If I have a running system on /dev/sda0, and an available partition (same size) on /dev/sdb0 (both with swap space on sdx1) - and, I cron

    sudo dd if /dev/sda0 /dev/sdb0

    nightly, when the system is quiescent - do I have a reasonable expectation that, if sda were to fail - I could swap sdb in its place, and be able to boot from it?

    Dan

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
  •