v. 6.7 Automatically sync ext hdd with one of my shares


Recommended Posts

I use timemachine to backup a couple of Macs on my network to a share on Unraid. This works flawlessly, but because of my limited scripting skills, I'm struggling to automate the (one way) sync from the share to the external hard drive once it is plugged into the USB port. 

I currently manually run the two following lines from terminal and the output is satisfactory, albeit a little time consuming

rsync -vgloptruc "/mnt/user/TimeMachineShare/Mac1 iMac.sparsebundle" /mnt/disks/TMB1
rsync -vgloptruc "/mnt/user/TimeMachineShare/Mac2.sparsebundle" /mnt/disks/TMB1

Ideally, I would just like to be able to plug the drive in, the above sync runs and then the disk unmounts on completion. At this stage I do not feel that I need to be notified of the completed job, as I'll just see the disk as unmounted in the Main menu.

I've looked around here and other places to try to find a solution, but I really don't know where to start. My attempts to copy similar solutions have resulted in the ext hdd not mounting and getting stuck in a loop.

Link to comment

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.