{"id":15528184,"url":"https://github.com/brianhenryie/unmountvolumeaftertimemachine","last_synced_at":"2025-10-28T11:44:20.172Z","repository":{"id":174557509,"uuid":"652401108","full_name":"BrianHenryIE/UnmountVolumeAfterTimeMachine","owner":"BrianHenryIE","description":"Automatically eject USB drives after TimeMachine backup finishes","archived":false,"fork":false,"pushed_at":"2023-09-05T19:26:29.000Z","size":223,"stargazers_count":14,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T23:41:15.990Z","etag":null,"topics":["backup-utility","time-machine"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BrianHenryIE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-12T02:05:06.000Z","updated_at":"2024-11-04T22:06:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"c02debcc-0f48-4469-aa49-51777fea632b","html_url":"https://github.com/BrianHenryIE/UnmountVolumeAfterTimeMachine","commit_stats":null,"previous_names":["brianhenryie/unmountvolumeaftertimemachine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2FUnmountVolumeAfterTimeMachine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2FUnmountVolumeAfterTimeMachine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2FUnmountVolumeAfterTimeMachine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2FUnmountVolumeAfterTimeMachine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianHenryIE","download_url":"https://codeload.github.com/BrianHenryIE/UnmountVolumeAfterTimeMachine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250435030,"owners_count":21430206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup-utility","time-machine"],"created_at":"2024-10-02T11:11:09.813Z","updated_at":"2025-10-28T11:44:15.126Z","avatar_url":"https://github.com/BrianHenryIE.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unmount Volume After Time Machine\n\nAutomatically eject USB disks after Time Machine backup completes.\n\nLaunches when a USB disk is inserted and exits after Time Machine completes.\n\nTo avoid:\n\n![disk-not-ejected-properly.png](.github/disk-not-ejected-properly.png)\n\nQuickly install via [yonaskolb/Mint](https://github.com/yonaskolb/Mint) – _A package manager that installs and runs Swift command line tool packages._\n```\nbrew install mint\nmint run BrianHenryIE/UnmountVolumeAfterTimeMachine\n```\n\n![Background Items Added.png](.github/background-items-added.png)\n\n```\nmint uninstall BrianHenryIE/UnmountVolumeAfterTimeMachine \n```\n\n***\n\nOriginally requested as a feature for [nielsmouthaan/ejectify-macos](https://github.com/nielsmouthaan/ejectify-macos/issues/19) but not implemented in that now-archived project.\n\nUses [BrianHenryIE/SwiftTimeMachine](https://github.com/BrianHenryIE/SwiftTimeMachine) and [BrianHenryIE/BHSwiftOSLogStream](https://github.com/BrianHenryIE/BHSwiftOSLogStream) to parse Time Machine logs and query `tmutil` for status. When the backup job completes, the disk is ejected with `DADiskUnmount`.\n\nTODO:\n* ~~App should [run when disk plugged](https://apple.stackexchange.com/a/13724/299117) in / Time Machine starts and quit when the disk is ejected~~ [emorydunn/LaunchAgent](https://github.com/emorydunn/LaunchAgent)\n* ~~When the app launches upon a disk being inserted, it should exit quickly if the disk is not used for Time Machine~~\n* What happens the app tries to unmount after Time Machine but other files are being copied in Finder?\n* Disks should be re-mounted as per the Time Machine schedule\n* Some sort of UI/checkbox to enable/disable/communicate the app is present and running [apple/swift-argument-parser](https://github.com/apple/swift-argument-parser)\n* [Notifications](https://github.com/dataJAR/Notifier) when the disk is ejected\n* ~~Make available via [brew](https://docs.brew.sh/Formula-Cookbook)~~\n* Currently, a race condition is possible that would cause the app to exit after another disk was unmounted (tiny window, fraction of a second)\n* Check is the app already running\n\nBuild and run\n```\nswift build -c release\n./.build/release/UnmountVolumeAfterTimeMachine\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhenryie%2Funmountvolumeaftertimemachine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianhenryie%2Funmountvolumeaftertimemachine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhenryie%2Funmountvolumeaftertimemachine/lists"}