Unmounting Time Capsule

If I don’t unmount my Time Capsule properly when restarting the computer I often run into the problem where a number gets added to the Data drive.


file:///Volumes/Data-1/Media/Swipe File/Jay Abraham - Advanced Strategy of Preeminence.mp4

This is really frustrating as I reference many files like the above from Applications and the URL should be:

file:///Volumes/Data/Media/Swipe File/Jay Abraham - Advanced Strategy of Preeminence.mp4

Notice Data-1 in the first URL and just Data in the second.

This seems to be a know Time Capsule bug:


I think the solution is to always dismount Time Capsule when restarting or shitting down the computer but I often forget to.

Can anyone think of a solution that works for all instances of shutting down or restarting, rather than initiating using a keyboard shortcut?



That would be very useful.
I want to know, too.

I don't use Time Capsule, but want to always trigger my nightly backup procedure, even if I use Apple menu for shut down.

Yes, KM has "shut down" and "restart" actions.
But, if I understand correctly, @Joe_Williams, is asking for something that intercepts the Apple menu.
This I want to see.

I don't have Time Capsule, but I do have a Synology NAS unit, with the primary share named "ApoNAS-Main".

This script works for me to disconnect the NAS:

tell application "Finder"
  set diskList to every disk --whose ejectable is true
  log diskList
  eject "ApoNAS-Main" -- name of network share in diskList
end tell

You should find the name of your Time Capsule share in the Script Editor log.

While there is a KM trigger for "At System Sleep", I don't see anything for shutdown.

But there are KM Actions for both:

IAC, I use a custom Macro to put my Mac to sleep. Before I execute the "Put Computer to Sleep" action, I close all apps and disconnect all drives. Would that work for you?

Here is my "Close Apps & Sleep" macro.

Much of it is highly specific to my needs/workflow, but it should give you an idea of how to write one of your own.
I trigger it by name, but of course you can set any trigger you like.

Script to UnMount External Disks

tell application "Finder"
  set diskList to every disk whose ejectable is true
  if (diskList ≠ {}) then
    repeat with oDisk in diskList
      set diskName to name of oDisk
      display notification "Now Ejecting Disk: " & diskName
      eject diskName
    end repeat
    display notification "NO Disks Found to Eject"
  end if
end tell


Thank you :slight_smile:


1 Like