Backup: Disk Image Behaviour

Just curious: if one has one or more disk images that live on the main machine and are mounted on the desktop, if one does a (Carbon Copy Cloner) backup while they are mounted and accessible, do changes made to the files on the mounted disk images get reflected in the backup, or does the backup just copy the (encrypted) .dmg state from the last time it was closed/not mounted (before it was mounted)?


Last time years ago when I asked this no one really seemed to know and I got both answers :)


Thank you!

MacBook Pro

Posted on Dec 9, 2022 4:29 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 12, 2022 3:05 PM

With great appreciation and permission of Mike Bombich, the guru behind the awesome CCC software, here is the (complicated!) answer. Hope this helps others who were wondering about this.


"Good question! It's a bit tricky to answer, it depends a little bit on the format of the disk image (dmg vs. sparesimage vs. sparsebundle), what kind of changes occur while the task is running, and whether the diskimages-helper service has any exclusive locks on the disk image file or its components. Whenever you make a change to a mounted disk image, though, those changes are nearly immediately applied to the underlying storage. The changes are buffered a bit in memory, but generally you can expect them to be applied to the disk image file. If you make those changes while a task is running, though, then just keep in mind that CCC creates a snapshot of the source at the beginning of the task and uses that read-only snapshot as the source for the duration of the task. Changes made to the source while the task is running are not reflected in the backup.

The main sticking point with mounted disk images, though, is that the diskimages-helper service will apply exclusive locks to the dmg or sparseimage file, or to band files within a sparsebundle disk image. Those locks will prevent CCC from opening the file or its components (and naturally CCC will present an error in those cases)."


(PS I wanted to mark this as the answer, but for some reason, it's not letting me.)

6 replies
Question marked as Top-ranking reply

Dec 12, 2022 3:05 PM in response to Jeff_W.

With great appreciation and permission of Mike Bombich, the guru behind the awesome CCC software, here is the (complicated!) answer. Hope this helps others who were wondering about this.


"Good question! It's a bit tricky to answer, it depends a little bit on the format of the disk image (dmg vs. sparesimage vs. sparsebundle), what kind of changes occur while the task is running, and whether the diskimages-helper service has any exclusive locks on the disk image file or its components. Whenever you make a change to a mounted disk image, though, those changes are nearly immediately applied to the underlying storage. The changes are buffered a bit in memory, but generally you can expect them to be applied to the disk image file. If you make those changes while a task is running, though, then just keep in mind that CCC creates a snapshot of the source at the beginning of the task and uses that read-only snapshot as the source for the duration of the task. Changes made to the source while the task is running are not reflected in the backup.

The main sticking point with mounted disk images, though, is that the diskimages-helper service will apply exclusive locks to the dmg or sparseimage file, or to band files within a sparsebundle disk image. Those locks will prevent CCC from opening the file or its components (and naturally CCC will present an error in those cases)."


(PS I wanted to mark this as the answer, but for some reason, it's not letting me.)

Dec 12, 2022 2:12 PM in response to CharPatton

Hi CharPatton,


We appreciate you reaching out to us. Based on how you described your set up, it sounds like a Mirrored RAID set (RAID 1).


As mentioned din the article below, "Each disk in the set stores the same data, similar to having multiple backup disks. Your data is written on two or more disks at once, so if a disk fails or is disconnected, your Mac can still access the data from the other disks," and  "if you delete a file, it’s deleted from the mirror as well. If software corrupts a file, it’s also corrupted on the mirrored disks."

Overview of creating disk sets using Disk Utility on Mac - Apple Support




Take care!


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Backup: Disk Image Behaviour

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.