macos – Leveraging APFS snapshots for customized backup device


I handle just a few Linux servers, and in just a few of them, if I wish to carry out backups, I can leverage filesystem snapshots. I.e. I can create a snapshot after which clone it to a second machine, thus guaranteeing all information is secure.

On macOS, direct snapshot cloning just isn’t attainable. Nevertheless, in line with guides I’ve seen on-line, it must be attainable to:

  1. Create a snapshot of the basis folder /
  2. Mount that snapshot as read-only
  3. Copy the information from the mount level, for instance, utilizing rsync

This is rather like Carbon Copy Cloner and Energetic Backup for Enterprise (from Synology), which each take a snapshot first after which copy the contents from it throughout the backup.

So far as I perceive, it must be so simple as:

$ tmutil localsnapshot /
$ tmutil listlocalsnapshots / # Ex: newest snapshot = com.apple.TimeMachine.2024-06-12-114527.native
$ mount_apfs -s com.apple.TimeMachine.2024-06-12-114527.native / /personal/tmp/rsync-apfs # folder /personal/tmp/rsync-apfs created by me
$ # ...entry /personal/tmp/rsync-apfs and replica contents utilizing rsync

Sadly, mount_apfs offers the next error:

mount_apfs: quantity couldn't be mounted: Useful resource busy

I additionally noticed right here a variation of those instructions the place “/” is substituted with “/System/Volumes/Information”, through which case the error I get is:

mount_apfs: quantity couldn't be mounted: Operation not permitted

Operating with sudo produces the identical outcomes. What’s the concern right here? Looking out on google for these two errors didn’t produce any options.

Edit: In case it’s related, I am on macOS Ventura 13.6.4

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *