2

Background:

I never expected to have only command line access to my Mac, but the day has arrived! :) Due to a video card problem, any attempt to boot the normal OS or recovery partition results in a kernel panic. However, I can boot into Single User mode! (The screen has a bunch of green horizontal lines through it every other pixel, but it is still readable.)

I have checked and verified that my data is intact. I have a Genius Bar appointment to get the video card replaced.

I have a couple of backup drives on which I have CarbonCopyCloner backups of my computer, however these are out of date.


I want to back up my Mac from the Single User Mode command line using CarbonCopyCloner before I take it for the video card replacement.

(I found this link on the ccc tool, but I don't have ccc 4.)

Questions are:

  1. How can I use CarbonCopyCloner 3.5.7 from the Single User Mode command line to update one of my full backups before I take the machine in for service?
  2. If this can't be done from the command line with this version of CCC, how else could I back up all data before taking it in for service (from Single User mode)?
3
  • Your best bet is to connect the broken mac to another mac in target disk mode then do the backup from the other mac.
    – fd0
    Commented Sep 11, 2016 at 18:53
  • @fd0, yes, but I don't have another Mac. Is rsync the best bet, then?
    – Wildcard
    Commented Sep 11, 2016 at 19:30
  • 1
    @fd0 I ended up going to my mom’s and using her Mac to boot mine in target disk mode and back it up using CCC 4. Thanks!
    – Wildcard
    Commented May 30, 2018 at 11:26

2 Answers 2

4

Boot to Single User Mode with one (empty) backup drive attached. Execute the indicated standard commands:

  • /sbin/fsck -fy
  • /sbin/mount -uw /

  • Get the disk identifier of the external backup drive:

    gpt -r show disk1 #(or disk2, disk3) search for the proper drive with gpt because *diskutil* won't work in SU mode
    
  • Mount the external drive's main partition (e.g. disk1s2) to /Volumes/externaldrive and create a new folder:

    mkdir /Volumes/externaldrive
    /sbin/mount -o nosuid -w -t hfs /dev/disk1s2 /Volumes/externaldrive
    mkdir /Volumes/externaldrive/new_backupdir
    
  • Backup your main drive with rsync e.g:

    rsync -aE --exclude='/Volumes' / /Volumes/externaldrive/new_backupdir
    

    If you want to backup only the folder /Users modify the rsync command accordingly. Please check man rsync for the appropriate options. Some of the useful options (like -v) don't work in SU mode - at least for me. Depending on your system, the options set and the excluded items the rsync command will yield some minor errors.


This backup isn't bootable per se. You may create a bootable backup though by backing up to the root of the external drive and blessing the appropriate boot.efi.

4
  • Is rsync available on stock OS X?
    – bot47
    Commented Sep 11, 2016 at 19:59
  • @MaxRied Sure. But some options don't work in SU mode!
    – klanomath
    Commented Sep 11, 2016 at 20:01
  • Do you know if it is used by OS X internally?
    – bot47
    Commented Sep 11, 2016 at 20:05
  • @MaxRied I don't know of any use of it...
    – klanomath
    Commented Sep 11, 2016 at 20:15
-1

If you are OK with not using CCC to make the backup you could use the command line to create a regular disk image. Not sure if this is something that will work for you, but I don't have any knowledge as far as CCC goes.

sudo hdiutil create ~/Desktop/{disk image name}.dmg -srcdevice /dev/{disk identifier}

2
  • Hmmm, this looks like it would create on the main hard disk, a backup of some different hard disk.
    – Wildcard
    Commented Sep 11, 2016 at 18:30
  • As I understand it CCC uses rsync under the hood. Although I don't have the exact command you would need, this likely is possible
    – zggz12
    Commented Sep 11, 2016 at 18:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .