flinte Posted November 1, 2021 Share Posted November 1, 2021 (edited) 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? Edited November 1, 2021 by flinte Quote Link to comment
flinte Posted November 1, 2021 Author Share Posted November 1, 2021 I didnt find a solution to this problem with the SMB share, but I have found a work around for now. 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. Mount your Unraid SMB share ("SMB-TM-UNRAID" in this example) to the Mac client. 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 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. open terminal and run: sudo tmutil setdestination -a "/Volumes/SMBTimeMachine/" open Time Machine utility and configure. 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. 4 Quote Link to comment
imthekuni Posted December 12, 2021 Share Posted December 12, 2021 You're a life saver! Running the first backup now, but looks like it all worked great. Quote Link to comment
shaunbarrow Posted January 12, 2022 Share Posted January 12, 2022 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. 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. Mount your Unraid SMB share ("SMB-TM-UNRAID" in this example) to the Mac client. 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 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. open terminal and run: sudo tmutil setdestination -a "/Volumes/SMBTimeMachine/" open Time Machine utility and configure. 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? Quote Link to comment
anixon604 Posted January 16, 2022 Share Posted January 16, 2022 I think there might be a solution though because I was able to do it in Proxmox after this date of posting (late Dec) - now I'm on unraid and having this same problem. Quote Link to comment
imthekuni Posted January 20, 2022 Share Posted January 20, 2022 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. 1 Quote Link to comment
joshbgosh10592 Posted April 17, 2022 Share Posted April 17, 2022 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 Quote Link to comment
sugnation Posted May 7, 2022 Share Posted May 7, 2022 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. 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. Mount your Unraid SMB share ("SMB-TM-UNRAID" in this example) to the Mac client. 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 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. open terminal and run: sudo tmutil setdestination -a "/Volumes/SMBTimeMachine/" open Time Machine utility and configure. 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. 1 Quote Link to comment
wgstarks Posted May 12, 2022 Share Posted May 12, 2022 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? 1 Quote Link to comment
wgstarks Posted May 27, 2022 Share Posted May 27, 2022 (edited) For anyone having issue with Time Machine backups I just wanted to point out that there is a new docker available in unRAID. timemachine. Since the sole purpose of this docker is stable TM backups it’s likely a better choice than the default unRAID compatibility. Edited May 27, 2022 by wgstarks Quote Link to comment
yp_1 Posted September 11 Share Posted September 11 (edited) The following 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. tmbackup.sh Edited September 12 by yp_1 updated script Quote Link to comment
yp_1 Posted September 19 Share Posted September 19 Just discovered that the frequency of the cronjob has to be increased to run every 5 min, for instance: 2/5 * * * * $TOUCH_VOLUME_SCRIPT_FULL_PATH > /Users/$USER/crontab.log 2>&1 Otherwise the volume gets unmounted and might not be there by the time the TM backup has to run. Quote Link to comment
Recommended Posts
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.