matryer / matryer/xbar-plugins
[New plugin] Time Machine Traveler Helper
- Dominant language
- Shell
- Stars
- 2.6k
- Forks
- 1.1k
- Avg merge
- 9d 15h
- Merged PRs (30d)
- 1
Description
I'm traveling with Macbook far away from the ofiice or home Time Machine SMB server. The SMB server is reachable over VPN network, but often, my internet connection is very slow and I don't want to automatically run Time Machine backup over a slow internet connection.
PR: https://github.com/matryer/xbar-plugins/pull/1692
**⚠️WARNING**
*This is alpha version. Plugin is not well-tested and needs refactoring. I invite everyone to test it and report any bugs and ideas. My goal is to remove `osascript` dependency and move to macOS built-in python*

## What this script do
1. Check if remote SMB server is reachable using `smbutil`
2. Run network speed test to SMB server using `iperf3`
3. If network speed is good, run Time Machine backup
## Screenshot

## Ho to use
### Requirements
`brew install python3 iperf3` # TODO: use built-in macOS python
`pip3 install osascript` # TODO: remove osascript dependency and use pure python
## Configure
1. Setup your [SMB server based on samba](https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X) and `iperf3` server. For remote access I recommend [ZertoTier](https://www.zerotier.com/) for VPN.
2. Mount remote SMB share and save credentials in system keychain
3. Configure Time Machine to SMB share in System Preferences. Make sure that first backup is created correctly
4. Disable automatic backup in Time Machine
5. Setup this plugin
## TODO
* Move to macOS built-in python. I can't figure out how to use `pip3` with macOS python. Any ideas?
* Improve `Check if Time Machine running` [reference](https://gist.github.com/andrewbenson/cc5fd79ff6999f0524b8979fe17937a3):
- see current backup progress while Time Machine running
- get latest backup date to let user configure backuping interval
Contributor guide
Research direction
Start by reviewing PR #1692 and the issue's listed requirements: smbutil, iperf3, Time Machine, and the osascript dependency. Check how the proposed plugin performs reachability and speed checks, then verify that its documented setup works and that the requested behavior is covered without relying on an unfinished or abandoned change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python, shell
- Domain
- desktop, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100