Skip to content

dcamenisch/eject-tm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eject-tm

Automatically ejects an external disk after a Time Machine backup completes — no polling, zero CPU idle.

How it works

A launchd user agent watches /Library/Preferences/com.apple.TimeMachine.plist for changes (which macOS writes at the end of every backup). When it fires, the script checks tmutil status to confirm the backup is truly finished, then ejects the disk via diskutil eject. A macOS notification is sent on success or failure.

Install

./install.sh

You'll be prompted to enter the exact name of the volume to eject (as it appears under /Volumes). The script is installed to ~/Library/Scripts/ and the launchd agent to ~/Library/LaunchAgents/.

Verify it's running:

launchctl list | grep eject-tm

Uninstall

./uninstall.sh

Logs

tail -f ~/Library/Logs/eject-tm.log

Test

tmutil startbackup
tail -f ~/Library/Logs/eject-tm.log

The disk will eject automatically when the backup finishes and a notification will appear.

Requirements

  • macOS (tested on macOS Sequoia)
  • Time Machine configured with an external disk

About

Automatically eject a Time Machine disk after backup completes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages