Apple’s Worldwide Developers Conference to kick off June 10 at 10 a.m. PDT with Keynote address

The Keynote will be available to stream on apple.com, the Apple Developer app, the Apple TV app, and the Apple YouTube channel. On-demand playback will be available after the conclusion of the stream.

Time Machine > how to back up to a sparse bundle

Hello


A few days ago I connected an external 8TB drive to a Mac mini running Ventura. I followed this article, Backup disks you can use with Time Machine - Apple Support, section Mac shared as a Time Machine backup destination.


There are no issues with backing up two Macs from the LAN, a High Sierra and a Big Sur Mac.


When it came time to backup the Mac mini, which hosts the Time Machine destination, I discovered that erase the entire drive is a required prerequisite. I thought about partitioning the drive but I don't like the risks.


I am open to using a disk image however. From what I understand from the Disk Utility Help, a disk image can be created but I unclear on which of the two I should choose when creating the blank disk image for storage;


  • Sparse bundle disk image: Same as a sparse disk image (below), but the directory data for the image is stored differently. Uses the .sparsebundle file extension.
  • Sparse disk image: Creates an expandable file that shrinks and grows as needed. No additional space is used. Uses the .sparseimage file extension.


I can't determine which is appropriate because help mentions this "the directory data for the image is stored differently" without any detail.


Disk Utility Help also mentions:

    • If the disk image will be used with a Mac that has a solid state drive (SSD) and uses macOS 10.13 or later, choose APFS or APFS (Case-sensitive).
    • If the disk image will be used with a Mac with macOS 10.12 or earlier, choose Mac OS Extended (Journaled) or Mac OS Extended (Case-sensitive, Journaled).
    • If the disk image will be used with a Mac or Windows computer and is 32 GB or less, choose MS-DOS (FAT); if it’s over 32 GB, choose ExFAT.


It would appear that I should follow the recommendation in the first bullet point because the Mac mini does have an internal solid state drive and uses macOS Ventura.


I would need some guidance on what to choose from the options above.


I am guessing that after the requirements above are understood, that the image should be mounted on the desktop so that I can choose it when setting up Time Machine correct? The same would apply, mounting to desktop, when I need to restore.


I would appreciate any assistance.


Thank you!


reference: Create a disk image using Disk Utility on Mac – Apple Support (AU)


Mac mini

Posted on May 30, 2023 2:22 PM

Reply
Question marked as Best reply

Posted on May 30, 2023 3:54 PM

I have figured it out.


Here are the steps for creating a Time Machine backup destination using a sparse image, which can be useful when the drive is already being used for backing up other Macs:

  1. Open Disk Utility on your Mac. You can find it in the Applications/Utilities folder.
  2. In Disk Utility, go to the "File" menu and select "New Image" > "Blank Image."
  3. In the dialog that appears, specify the settings for the sparse image. You can choose the desired size, format, and encryption options based on your preferences. Think of the 'desired size' as the total size of this 'virtual drive' if you will.
  4. Make sure to select "sparse bundle disk image" as the image format. This format is specifically designed for Time Machine backups and is recommended for efficient storage and backup purposes.
  5. Format should be APFS if macOS is High Sierra or later.
  6. Partition should be Single partition - GUID Partition Map.
  7. Choose a location where you want to save the sparse image. In this case it would be your external drive.
  8. Encryption is optional
  9. Provide a name for the sparse image, such as "TimeMachineBackup" or any other descriptive name you prefer.
  10. Click the "Save" button to create the sparse image. You will find a "TimeMachineBackup.sparsebunde" sparse disk image file saved on your external drive.
  11. Once it is saved, double click the file and it will mount on your desktop
  12. Use spotlight to launch "Terminal"
  13. Enter "sudo tmutil setdestination " (notice the extra space)
  14. On the Finder, navigate to the .sparsebundle image file that you saved in step 10 (not the mounted disk on the desktop).
  15. Drag and drop it onto the Terminal window and hit enter
  16. Enter your user password when prompted. Note: by design, as you type your password there is no feedback - your keyboard is working
  17. The mounted disk assumes the Time Machine disk icon
  18. Go to Time Machine System Settings, right click and choose back up now.


Image of mounted disk image, now a Time Machine icon after issuing the terminal command. Back up in progress. Image will max out at 500GB as pre-defined by DiskUtility on create but it will occupy as much as space as it stores. As you can see it does not occupy 500GB because it doesn't yet hold that much data.


Don't forget to set the frequency of your backups as this process seems to set backups to a manual frequency that requires the user to start the back up. Use the Options button to define an hourly/daily or weekly backup frequency.

Hope this helps

Similar questions

6 replies
Question marked as Best reply

May 30, 2023 3:54 PM in response to LostAccount

I have figured it out.


Here are the steps for creating a Time Machine backup destination using a sparse image, which can be useful when the drive is already being used for backing up other Macs:

  1. Open Disk Utility on your Mac. You can find it in the Applications/Utilities folder.
  2. In Disk Utility, go to the "File" menu and select "New Image" > "Blank Image."
  3. In the dialog that appears, specify the settings for the sparse image. You can choose the desired size, format, and encryption options based on your preferences. Think of the 'desired size' as the total size of this 'virtual drive' if you will.
  4. Make sure to select "sparse bundle disk image" as the image format. This format is specifically designed for Time Machine backups and is recommended for efficient storage and backup purposes.
  5. Format should be APFS if macOS is High Sierra or later.
  6. Partition should be Single partition - GUID Partition Map.
  7. Choose a location where you want to save the sparse image. In this case it would be your external drive.
  8. Encryption is optional
  9. Provide a name for the sparse image, such as "TimeMachineBackup" or any other descriptive name you prefer.
  10. Click the "Save" button to create the sparse image. You will find a "TimeMachineBackup.sparsebunde" sparse disk image file saved on your external drive.
  11. Once it is saved, double click the file and it will mount on your desktop
  12. Use spotlight to launch "Terminal"
  13. Enter "sudo tmutil setdestination " (notice the extra space)
  14. On the Finder, navigate to the .sparsebundle image file that you saved in step 10 (not the mounted disk on the desktop).
  15. Drag and drop it onto the Terminal window and hit enter
  16. Enter your user password when prompted. Note: by design, as you type your password there is no feedback - your keyboard is working
  17. The mounted disk assumes the Time Machine disk icon
  18. Go to Time Machine System Settings, right click and choose back up now.


Image of mounted disk image, now a Time Machine icon after issuing the terminal command. Back up in progress. Image will max out at 500GB as pre-defined by DiskUtility on create but it will occupy as much as space as it stores. As you can see it does not occupy 500GB because it doesn't yet hold that much data.


Don't forget to set the frequency of your backups as this process seems to set backups to a manual frequency that requires the user to start the back up. Use the Options button to define an hourly/daily or weekly backup frequency.

Hope this helps

May 30, 2023 3:09 PM in response to LostAccount

I've been doing some research.

I mounted the image file using hdiutil but a double click will suffice.


In terminal:

➜  hdiutil mount /Macmini_backup.sparseimage 

/dev/disk11         GUID_partition_scheme          

/dev/disk11s1       Apple_APFS                     

/dev/disk12         EF57347C-0000-11AA-AA11-0030654

/dev/disk12s1       41504653-0000-11AA-AA11-0030654 /Volumes/MacMini_bu.sparseimage



I then entered the following command which redraws/renders the mounted disk with the familiar green Time Machine disk icon

➜  sudo tmutil setdestination /Volumes/MacMini_bu.sparseimage


I then opened the System Settings > General > Time Machine and surprisingly, the mounted disk image was already selected. The selected disk had a message below that indicated a backup will begin when manually triggered. I right click on the icon in the Time Machine settings and chose backup now.


Backup failed because there was not enough space which is a surprise as I thought sparse bundles grow or shrink as required.

May 31, 2023 10:24 AM in response to tbirdvet

You raise valid points, and I appreciate the considerations you've made. In general, I am satisfied with the approach I have taken. The Mac mini, which serves LAN and WAN services and remains powered on 24/7, is well-suited to assume the role of a Time Machine backup location. It serves as a suitable alternative to the popular Apple Time Capsules of the past.


Regarding Time Machine 'fussiness,' I'd like to clarify if Time Machine has become more sensitive or fussy in recent times. In any event, since all the machines being backed up are running High Sierra or above, and they natively support APFS, Time Machine compatibility should not be a significant concern. Additionally, the sparse images, where the backups are stored (one per machine, of course), are also formatted as APFS.


The suggestion of using dedicated drives for each Mac mitigates the risk of losing all backups in case of drive failure. This approach offers individual data isolation and improved fault tolerance. However, it can become expensive to dedicate one drive per Mac, particularly as the number of Macs increases.


The recommendation to format all backup drives to Apple File System (APFS) is generally a good one. APFS is the default file system on macOS and provides compatibility, improved performance, and access to snapshot backups.


Your response has me considering a backup of the backup drive. The additional layer of fault tolerance and data protection will be a good enhancement to the reliability of the setup. A copy of the backup is a good idea and it amounts to 3 files, one per Mac.


Regarding the advantages of APFS, it is important to highlight that the sparse disk image bundle files are automatically prepared as APFS by default when using the Time Machine over a network feature in macOS. This is the case ever since High Sierra if I am not mistaken as. APFS was introduced when macOS 10.13 was released. As for the disk image I manually created to back up the machine serving as the backup destination, it was set up using APFS, as confirmed by the following terminal command: diskutil info /Volumes/miniBackup.


 

   Device Identifier:         disk12s1
   Device Node:               /dev/disk12s1
   Whole:                     No
   Part of Whole:             disk12

   Volume Name:               miniBackup
   Mounted:                   Yes
   Mount Point:               /Volumes/miniBackup

   Partition Type:            41504653-0000-11AA-AA11-00306543ECAC
   File System Personality:   APFS
   Type (Bundle):             apfs
   Name (User Visible):       APFS
   Owners:                    Enabled

   OS Can Be Installed:       Yes
   Media Type:                Generic
   Protocol:                  Disk Image
   SMART Status:              Not Supported
   Volume UUID:               B86B6390-2A67-4959-93F7-28409F0A6686
   Disk / Partition UUID:     B86B6390-2A67-4959-93F7-28409F0A6686

   Disk Size:                 499.8 GB (499790266368 Bytes) (exactly 976152864 512-Byte-Units)
   Device Block Size:         4096 Bytes

   Volume Used Space:         80.8 GB (80825384960 Bytes) (exactly 157862080 512-Byte-Units)
   Container Total Space:     499.8 GB (499790266368 Bytes) (exactly 976152864 512-Byte-Units)
   Container Free Space:      418.8 GB (418804056064 Bytes) (exactly 817976672 512-Byte-Units)
   Allocation Block Size:     4096 Bytes

   Media OS Use Only:         No
   Media Read-Only:           No
   Volume Read-Only:          No

   Device Location:           External
   Removable Media:           Removable
   Media Removal:             Software-Activated

   Solid State:               Info not available

   This disk is an APFS Volume.  APFS Information:
   APFS Container:            disk12
   APFS Physical Store:       disk11s2
   Fusion Drive:              No
   Encrypted:                 No
   FileVault:                 No
   Sealed:                    No
   Locked:                    No

   APFS Snapshots are defined upon this APFS Volume.  Snapshot list:
   Snapshot UUID:             08C24BFF-3D0C-4295-9C08-D1AC4D5349DB
   Name:                      com.apple.TimeMachine.2023-05-31-080348.backup
   XID:                       1378
   Snapshot UUID:             220E6EC8-0338-422F-AEAF-44E71E7B08A5
   Name:                      com.apple.TimeMachine.2023-05-31-125832.backup
   XID:                       1485


In summary, I will backup the 3 sparse image files to a second drive or consider a cloud solution for those 3 files for the added security cloud storage can offer. Hmm, maybe iCloud?


Thanks again, your comments were really well received and got me thinking further about this setup. I do appreciate it!


Edit: With respect to cloud storing sparse images, for anyone reading this, I highly recommend ensuring the backup is encrypted to reduce risk.

May 31, 2023 10:32 AM in response to tbirdvet

Wanted to add that a MacBook Air was setup normally through the Time Machine System Settings and the same terminal command, diskutil info /Volumes/Backups\ of\ MacBook\ Air, evidences that Apple itself is using APFS for the respective sparse images for the out-of-the-box configuration. Of course the same conclusion can be derived using DiskUtility.app


diskutil info /Volumes/Backups\ of\ MacBook\ Air 
   Device Identifier:         disk14s1
   Device Node:               /dev/disk14s1
   Whole:                     No
   Part of Whole:             disk14

   Volume Name:               Backups of MacBook Air
   Mounted:                   Yes
   Mount Point:               /Volumes/Backups of MacBook Air

   Partition Type:            41504653-0000-11AA-AA11-00306543ECAC
   File System Personality:   Case-sensitive APFS
   Type (Bundle):             apfs
   Name (User Visible):       APFS (Case-sensitive)
   Owners:                    Enabled

   OS Can Be Installed:       Yes
   Media Type:                Generic
   Protocol:                  Disk Image
   SMART Status:              Not Supported
   Volume UUID:               4F0010D6-E281-445A-BB0E-A196AF149E88
   Disk / Partition UUID:     4F0010D6-E281-445A-BB0E-A196AF149E88

   Disk Size:                 7.6 TB (7601138577408 Bytes) (exactly 14845973784 512-Byte-Units)
   Device Block Size:         4096 Bytes

   Volume Used Space:         70.1 GB (70076620800 Bytes) (exactly 136868400 512-Byte-Units)
   Container Total Space:     7.6 TB (7601138577408 Bytes) (exactly 14845973784 512-Byte-Units)
   Container Free Space:      7.5 TB (7530243117056 Bytes) (exactly 14707506088 512-Byte-Units)
   Allocation Block Size:     4096 Bytes

   Media OS Use Only:         No
   Media Read-Only:           No
   Volume Read-Only:          No

   Device Location:           External
   Removable Media:           Removable
   Media Removal:             Software-Activated

   Solid State:               Info not available

   This disk is an APFS Volume.  APFS Information:
   APFS Container:            disk14
   APFS Physical Store:       disk13s2
   Fusion Drive:              No
   Encrypted:                 No
   FileVault:                 No
   Sealed:                    No
   Locked:                    No

   APFS Snapshots are defined upon this APFS Volume.  Snapshot list:
   Snapshot UUID:             8D47AE4C-F3F7-4ED7-A463-0A202D252E2E
   Name:                      com.apple.TimeMachine.2023-05-27-000941.backup
   XID:                       1451
   Snapshot UUID:             22AF1864-22B5-4A70-B032-EC5F8358F83C
   Name:                      com.apple.TimeMachine.2023-05-27-084919.backup
   XID:                       4090
   Snapshot UUID:             27D25EEB-8B44-45C3-9238-DA4ED2A39D05
   Name:                      com.apple.TimeMachine.2023-05-27-094706.backup
   XID:                       4174
   Snapshot UUID:             4EB3AB23-A298-4D64-A337-558849F6AAE2
   Name:                      com.apple.TimeMachine.2023-05-27-105701.backup
   XID:                       4228
   Snapshot UUID:             B8B37226-931D-4FC1-937B-5572F4F77B71
   Name:                      com.apple.TimeMachine.2023-05-27-130009.backup
   XID:                       4312
   Snapshot UUID:             B1F3F1C9-B017-44F5-A832-AE41E1B50477
   Name:                      com.apple.TimeMachine.2023-05-27-143129.backup
   XID:                       4350
   Snapshot UUID:             6F5E6BD0-EBC8-4C74-80A3-E80231015D60
   Name:                      com.apple.TimeMachine.2023-05-31-001547.backup
   XID:                       4442

Time Machine > how to back up to a sparse bundle

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