Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

geohei

macrumors member
Original poster
Dec 19, 2009
41
2
Hi.

I'd like to image backup my startup disk (Mojave 10.14).

To explain ... a real block copy image, not copying files, but (used) sector by sector.

I checked Carbon Copy Cloner (CCC) and I am testing sparse image and sparse bundle backups at this time. However I don't get how CCC can possibly image backup the startup disk while running. To my understanding, macOS must be down when backing up, since a running macOS changes permanently the data on the disk being backed up at that time.

Is CCC using a special technique to cache modified files and restore them after backup is complete?
If not, how is an image backup from a running macOS possible?

Thanks,
 
Last edited:

Riwam

macrumors 65816
Jan 7, 2014
1,095
244
Basel, Switzerland
Hi.

I'd like to image backup my startup disk (Mojave 10.14).

To explain ... a realy block copy image, not copying files, but (used) sector by sector.

I checked Carbon Copy Cloner (CCC) and I am testing sparse image and sparse bundle backups at this time. However I don't get how CCC can possibly image backup the startup disk while running. To my understanding, macOS must be down when backing up, since an running macOS changes permanently the data on the disk being backed up at that time?

Is CCC using a special technique to cache modified files and restore them after backup is complete?
If not, how is an image backup from a running macOS possible?

Thanks,
I never had problems backing up either with CCC or with SuperDuper! from my used drive. I tried not to make big changes while using it but other than that no problem at all. If I do change something while the cloning is finishing I assume it won't be included in the clone.
Some tools like the one I use often when problems appear DiskWarrior do not work on a running system drive and must be started from for instance a bootable clone but the 2 backup tools I use, CCC and SuperDupet! work directly from your running system drive to any other drive.
Ed
 
Last edited:

!!!

macrumors 6502a
Aug 5, 2013
711
981
It's not all that difficult to backup OS files. Actual system files are never modified during runtime, and when copying open files it just copies them at their current state. I'm not sure if you trying to think about this in a Windows-like fashion which operates differently in regards to how the user can access files. On Mac, you can copy/delete/etc any file, regardless of if it's open in a program or not. In Windows, you can't (because Microsoft).
 
  • Like
Reactions: pullman

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,126
4,781
It's not all that difficult to backup OS files. Actual system files are never modified during runtime, and when copying open files it just copies them at their current state.

This.

Things that would change are mostly in the user space (read: Safari cache, files being edited in office application, etc). System log files, maybe some system caches, but even then, not going to stop a machine from booting off a clone since they don't really contain "vital" data for running.

Personally, my clone is there for emergency situations where the internal drive has died and I now have a way to boot the machine to get something done if dire/immediate need. Or: I fowled something up and can mirror back the clone and restore current files from TimeMachine or my latest manual copy.
 

geohei

macrumors member
Original poster
Dec 19, 2009
41
2
@Riwam
Thanks a lot. Good to know that it works fine, but I'd like to understand how it works.

@!!!
Independently which operating system (macOS, Linux, BSD, Windows, ...), a running OS modifies, creates and deletes files during runtime. If an image backup tool is imaging an operating startup drive, inconsistencies are preprogrammed, unless special mechanisms are implemented (such as cached file operations (read, write, remove, ...)). I didn't find any information on that CCC site, hence my question.

@NoBoMac
Ok, userspace data is modified, but this is changed data as well (even if not vital). Hence, an image backup tool like CCC doesn't seem to freeze system state when starting backup and applies cached changes after backup is terminated.

@CoastalOR
Using the Disk Utility from the macOS Recovery comes close to what I'm looking for, but ... (see below) ...

Recap - What I was looking for was a tool, which operates from an external (or recovery) drive and creates an image backup of an offline startup drive (like "Macintosh HD"). Best would be a bootable startup drove on a USB stick, which creates an 1:1 image of the installed SSD, including all (even hidden) partitions (like the EFI, macOS Recovery, ...). The resulting image w´should preferentially be one (old fashion) big (huge!) image file, which contains all partitions.

A backup doesn't help me if I don't exactly know what I have. I need an 1:1 restore if required.

abc
def

Basically, I'd like to image backup /dev/disk0.
Code:
macbookpro-geohei:~ geohei$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         500.3 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.0 GB   disk1
                                Physical Store disk0s2
   1:                APFS Volume Macintosh HD            30.4 GB    disk1s1
   2:                APFS Volume Preboot                 89.5 MB    disk1s2
   3:                APFS Volume Recovery                1.5 GB     disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4
...
 
Last edited:

BLUEDOG314

macrumors 6502
Dec 12, 2015
379
120
If you just want a restorable backup, you can use 'hdiutil' to capture an image of disk0s2 which can then be restored to a blank APFS container using 'asr'. If you want it to be bootable you would need the whole partition scheme with the EFI partition as well, but you can probably just take an external drive, erase it, formatting to APFS, then restore the image of disk0s2 to it to make it bootable. I don't know a lot about bootable backups as my needs have only ever required moving an image from computer to computer, but I guess I just wanted to say the imaging part is all possible using only Apple software not requiring CCC or SuperDuper which someone will eventually say is the best way. IMO if you learn how to do it in terminal, you'll learn a lot about how APFS actually works.
 

HenryAZ

macrumors 6502a
Jan 9, 2010
690
143
South Congress AZ
CCC claims they can make a true image of a running boot drive. However, I always boot up an external disk running Mojave and run CCC there to image the boot drive (just my own superstition, I guess). I make a read-only image, a permanent record/snapshot of the disk. I do the same when imaging the boot drive to another external SSD.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.