Unable to use Time Machine share for Mac OS 12 Monterey


flinte

Recommended Posts

I got a new M1x macbook pro.  I want to setup my Unraid server as a time machine target. I used the following guide I enabled Enhanced Mac OS interoperability, then I created a new share and created the tm share with the time machine capacity limit.  When I connect to the SMB share then open the time machine app I see no offer to use the share as a time machine target...

 

I tried to manually add it from the CLI and also no dice:

flinte@Flintes-MBP ~ % sudo tmutil setdestination "/Volumes/tm-tony/"
/Volumes/tm-tony: Disk does not support Time Machine backups. (error 45)
The backup destination could not be set.

 

Anyone out there using Unraid as a TM target with Mac os 12?  Anyone have any thoughts on something I have missed in the config or maybe is this a regression/bug in Mac os 12?

 

 

Screen Shot 2021-11-01 at 1.37.29 AM.png

Screen Shot 2021-11-01 at 1.38.20 AM.png

Edited by flinte
Link to comment
  • flinte changed the title to Unable to use Time Machine share for Mac OS 12 Monterey

I didnt find a solution to this problem with the SMB share, but I have found a work around for now.

 

  1. on my Mac I had to go into Settings --> Security & Privacy --> Full Disk Access and approve Terminal.app.  That is in prep for the next part. 
  2. Mount your Unraid SMB share ("SMB-TM-UNRAID" in this example) to the Mac client.
  3. open terminal and run:
    sudo hdiutil create -size 300g -type SPARSEBUNDLE -nospotlight -volname "SMBTimeMachine" -fs "Case-sensitive Journaled HFS+" -verbose /Volumes/SMB-TM-UNRAID/$HOST_TimeMachine.sparsebundle

     

  4. Navigate to the directory /Volumes/SMB-TM-UNRAID/ in finder and click the .sparcebundle file to mount it as a disk.  This will mount a new disk called SMBTimeMachine to your Mac.
  5. open terminal and run:

    sudo tmutil setdestination -a "/Volumes/SMBTimeMachine/"
  6. open Time Machine utility and configure.
  7. Youll need to configure Mac to remount these shares at boot.  Settings --> Users & Groups --> Your User --> Login Items.  Drag the mounted drives SMB-TM-UNRAID and SMBTimeMachine into the login items window.
  • Like 4
Link to comment
  • 1 month later...
  • 5 weeks later...
On 11/1/2021 at 4:55 PM, flinte said:

I didnt find a solution to this problem with the SMB share, but I have found a work around for now.

 

  1. on my Mac I had to go into Settings --> Security & Privacy --> Full Disk Access and approve Terminal.app.  That is in prep for the next part. 
  2. Mount your Unraid SMB share ("SMB-TM-UNRAID" in this example) to the Mac client.
  3. open terminal and run:
    sudo hdiutil create -size 300g -type SPARSEBUNDLE -nospotlight -volname "SMBTimeMachine" -fs "Case-sensitive Journaled HFS+" -verbose /Volumes/SMB-TM-UNRAID/$HOST_TimeMachine.sparsebundle

     

  4. Navigate to the directory /Volumes/SMB-TM-UNRAID/ in finder and click the .sparcebundle file to mount it as a disk.  This will mount a new disk called SMBTimeMachine to your Mac.
  5. open terminal and run:

    sudo tmutil setdestination -a "/Volumes/SMBTimeMachine/"
  6. open Time Machine utility and configure.
  7. Youll need to configure Mac to remount these shares at boot.  Settings --> Users & Groups --> Your User --> Login Items.  Drag the mounted drives SMB-TM-UNRAID and SMBTimeMachine into the login items window.

Thanks for this, I hope this gets less hacky, but this fixed my issue.  Would you happen to know if this is able to be encrypted?

Link to comment

I've been having issues with backups taking forever and/or cleaning up never finishing. I tried to make an AFPS formatted sparse bundle instead and it is much faster and seems to be working "better".

 

Interestingly, during this process my NAS Time Machine folder actually showed up as a destination and allowed me to make a backup there without creating a sparse bundle. I am on macOS 12.0.1.

  • Like 1
Link to comment
  • 2 months later...
  • 3 weeks later...
On 11/1/2021 at 8:55 PM, flinte said:

I didnt find a solution to this problem with the SMB share, but I have found a work around for now.

 

  1. on my Mac I had to go into Settings --> Security & Privacy --> Full Disk Access and approve Terminal.app.  That is in prep for the next part. 
  2. Mount your Unraid SMB share ("SMB-TM-UNRAID" in this example) to the Mac client.
  3. open terminal and run:
    sudo hdiutil create -size 300g -type SPARSEBUNDLE -nospotlight -volname "SMBTimeMachine" -fs "Case-sensitive Journaled HFS+" -verbose /Volumes/SMB-TM-UNRAID/$HOST_TimeMachine.sparsebundle

     

  4. Navigate to the directory /Volumes/SMB-TM-UNRAID/ in finder and click the .sparcebundle file to mount it as a disk.  This will mount a new disk called SMBTimeMachine to your Mac.
  5. open terminal and run:

    sudo tmutil setdestination -a "/Volumes/SMBTimeMachine/"
  6. open Time Machine utility and configure.
  7. Youll need to configure Mac to remount these shares at boot.  Settings --> Users & Groups --> Your User --> Login Items.  Drag the mounted drives SMB-TM-UNRAID and SMBTimeMachine into the login items window.

Thank you for this. I know it's a slightly older thread but googling my problem this post came up and it worked for me on my Mac Mini 2018 running Monterey.

  • Like 1
Link to comment
On 4/16/2022 at 8:44 PM, joshbgosh10592 said:

I'm able to create the first backup without issues, but any backup afterwards just ends up "Preparing Backup" and then Stopping...

macOS 12.3.1, unRAID 6.9.1

Having the same issue. First backup runs without issue. After that all attempts fail. Logs show that time machine couldn’t unmount the disk. Have you had any luck fixing this?

  • Upvote 1
Link to comment
  • 3 weeks later...
  • 1 year later...

tmbackup.sh

The above script is based on https://community.jamf.com/t5/jamf-pro/scripts-for-timemachine-backups-over-smb-with-automounting-on/td-p/277978

It has to be run only once, as a regular user, but will ask for password for commands that require sudo, so make sure the user has Admin privileges set.

Basically it will set up autofs to mount the SMB share and respective sparsebundle.

Obviously, modify the script if required.

 

 

 

 

Edited by yp_1
updated script
Link to comment
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.