matryska Posted December 30, 2018 Share Posted December 30, 2018 (edited) GOAL Setup UNRAID 6.6.6 for macOS 10.14 Time Machine backup over SMB to a dedicated Unassigned Devices disk that is not part of the array There have been some reports of difficulties enabling Time Machine backups: https://forums.unraid.net/topic/74972-time-machine-backups/ References: https://www.reddit.com/r/homelab/comments/83vkaz/howto_make_time_machine_backups_on_a_samba/ https://kirb.me/2018/03/24/using-samba-as-a-time-machine-network-server.html https://github.com/Robpol86/robpol86.com/commit/93307a2034a588fb5f38519aac7a890c21a2b4c4 SETUP DISK Main > Unassigned Devices Format as xfs Mounted as /dev/disks/Timecapsule Settings > Unassigned Devices Enable SMB sharing as desired SSH to server cp /etc/samba/unassigned-shares/Timecapsule.conf /dev/disks/Timecapsule/Timecapsule.conf nano /dev/disks/Timecapsule/Timecapsule.conf Add the following to the end of the file vfs objects = catia fruit streams_xattr fruit:time machine = yes fruit:model = MacPro fruit:advertise_fullsync = true fruit:aapl = yes Main > Unassigned Devices Edit script for disk in Unassigned Devices This will load our SMB configuration file and reload samba to enable these settings each time the disk is mounted regardless of auto or manual mount #!/bin/bash PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin ## Available variables: # AVAIL : available space # USED : used space # SIZE : partition size # SERIAL : disk serial number # ACTION : if mounting, ADD; if unmounting, UNMOUNT; if unmounted, REMOVE; if error, ERROR_MOUNT, ERROR_UNMOUNT # MOUNTPOINT : where the partition is mounted # FSTYPE : partition filesystem # LABEL : partition label # DEVICE : partition device, e.g /dev/sda1 # OWNER : "udev" if executed by UDEV, otherwise "user" # PROG_NAME : program name of this script # LOGFILE : log file for this script case $ACTION in 'ADD' ) cp /mnt/disks/Timecapsule/Timecapsule.conf /etc/samba/unassigned-shares/Timecapsule.conf /etc/rc.d/rc.samba /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Device added" -i "normal" ;; 'UNMOUNT' ) /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Device unmounting" -i "normal" ;; 'REMOVE' ) /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Device can be removed" -i "normal" ;; 'ERROR_MOUNT' ) /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Error mounting device" -i "normal" ;; 'ERROR_UNMOUNT' ) /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Error unmounting device" -i "normal" ;; esac Unmount and mount disk again to get the disk correctly mounted as a Time Machine compatible share MACOS 10.14 SETUP Mount Timecapsule share via network Open System Preferences > Time Machine Select the newly available UNRAID share I have selected encrypted backup as the disk is unencrypted xfs Backup as desired Bob’s your uncle Edited December 30, 2018 by matryska formatting Quote Link to comment
David Bott Posted January 2, 2019 Share Posted January 2, 2019 Very nice of you to do this. The sad part if that we need to do something like this at all. IMHO, someone should not do ever go into and mess with config files on a system like this, there should be an option just to turn on and off like other NAS devices have. It is not like this is "new" it has been around for a very long time yet unRaid seems to have such an issue with it. This would also require me to use another drive when I have put in a SSD as cache large enough to also be my TimeMachine drive. I really do thank you for taking the time to document this. I really just hate having to go in and mess with files not knowing if some other update will do something to such a file that would again require you to set it all up again. One could likely forgot about it having used it for X amount of time for it then to just stop and not remember that they made such changes to make it work. Quote Link to comment
wgstarks Posted January 2, 2019 Share Posted January 2, 2019 39 minutes ago, David Bott said: It is not like this is "new" it has been around for a very long time yet unRaid seems to have such an issue with it What issue are you having? IMO it’s fairly simple to setup via AFP. No more complicated than any other share. LT has also announced that they are working on TimeMachine backups via SMB hopefully to be included in 6.7 so this procedure probably won’t be necessary. Quote Link to comment
Bahndit Posted February 26, 2019 Share Posted February 26, 2019 On 12/30/2018 at 3:12 AM, matryska said: GOAL Setup UNRAID 6.6.6 for macOS 10.14 Time Machine backup over SMB to a dedicated Unassigned Devices disk that is not part of the array There have been some reports of difficulties enabling Time Machine backups: https://forums.unraid.net/topic/74972-time-machine-backups/ References: https://www.reddit.com/r/homelab/comments/83vkaz/howto_make_time_machine_backups_on_a_samba/ https://kirb.me/2018/03/24/using-samba-as-a-time-machine-network-server.html https://github.com/Robpol86/robpol86.com/commit/93307a2034a588fb5f38519aac7a890c21a2b4c4 SETUP DISK Main > Unassigned Devices Format as xfs Mounted as /dev/disks/Timecapsule Settings > Unassigned Devices Enable SMB sharing as desired SSH to server cp /etc/samba/unassigned-shares/Timecapsule.conf /dev/disks/Timecapsule/Timecapsule.conf nano /dev/disks/Timecapsule/Timecapsule.conf Add the following to the end of the file vfs objects = catia fruit streams_xattr fruit:time machine = yes fruit:model = MacPro fruit:advertise_fullsync = true fruit:aapl = yes Main > Unassigned Devices Edit script for disk in Unassigned Devices This will load our SMB configuration file and reload samba to enable these settings each time the disk is mounted regardless of auto or manual mount #!/bin/bash PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin ## Available variables: # AVAIL : available space # USED : used space # SIZE : partition size # SERIAL : disk serial number # ACTION : if mounting, ADD; if unmounting, UNMOUNT; if unmounted, REMOVE; if error, ERROR_MOUNT, ERROR_UNMOUNT # MOUNTPOINT : where the partition is mounted # FSTYPE : partition filesystem # LABEL : partition label # DEVICE : partition device, e.g /dev/sda1 # OWNER : "udev" if executed by UDEV, otherwise "user" # PROG_NAME : program name of this script # LOGFILE : log file for this script case $ACTION in 'ADD' ) cp /mnt/disks/Timecapsule/Timecapsule.conf /etc/samba/unassigned-shares/Timecapsule.conf /etc/rc.d/rc.samba /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Device added" -i "normal" ;; 'UNMOUNT' ) /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Device unmounting" -i "normal" ;; 'REMOVE' ) /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Device can be removed" -i "normal" ;; 'ERROR_MOUNT' ) /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Error mounting device" -i "normal" ;; 'ERROR_UNMOUNT' ) /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Error unmounting device" -i "normal" ;; esac Unmount and mount disk again to get the disk correctly mounted as a Time Machine compatible share MACOS 10.14 SETUP Mount Timecapsule share via network Open System Preferences > Time Machine Select the newly available UNRAID share I have selected encrypted backup as the disk is unencrypted xfs Backup as desired Bob’s your uncle @matryska Thanks for putting this guide together! I am excited to give this a go. One question, is there any way to limit how much space the time machine backup will take on the share with this method? Or will Time Machine just use all of the available space on the drive until it is full? Thanks for your time and help! Quote Link to comment
markswift Posted September 27, 2019 Share Posted September 27, 2019 It appears that /dev/disks does not exist on my system, has something changed? Quote Link to comment
itimpi Posted September 27, 2019 Share Posted September 27, 2019 40 minutes ago, markswift said: It appears that /dev/disks does not exist on my system, has something changed? Not sure that has ever existed! /dev/disk (without an ‘s’) does exist. Perhaps you are thinking of /mnt/disks as is used by the Unassigned Devices plug-in? 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.