Chronos is a Bash-based macOS administration tool that automates Time Machine backup setup to a network-hosted sparsebundle. It creates or reuses a per-machine sparsebundle on an SMB/AFP share, writes Time Machine machine metadata, mounts the sparsebundle, registers it with Time Machine, and installs a LaunchAgent-backed persistent remount monitor.
⚠️ Before publishing publicly: sanitize internal hostnames, usernames, share names, logs, and organization-specific details. See [[docs/publication-sanitization-checklist]].
- macOS administration with
launchd, LaunchAgents,tmutil,hdiutil, DiskImageMounter, and Launch Services - Network backup automation over SMB/AFP
- Bash scripting with strict mode, validation, retries, cleanup, and structured logging
- Operational awareness around GUI session context vs root context
- Security thinking around encrypted backups, SMB credentials, Keychain behavior, and NAS-side deletion protection
| File | Description |
|---|---|
| [[docs/architecture]] | System design, component map, v2.2.1 remount model |
| [[docs/deployment-guide]] | Prerequisites, deployment commands, verification steps |
| [[docs/troubleshooting]] | Symptom-based triage, common mistakes |
| [[docs/security-considerations]] | Assets, encryption, credential handling, LaunchAgent risks |
| [[docs/uninstall-guide]] | Clean removal with preserve options |
| [[docs/change-summary]] | What changed from v2.1.1 → v2.2.1 |
| [[docs/publication-sanitization-checklist]] | Pre-publish sanitization checklist |
Scripts and original documentation are stored in [[source/]]. See the source folder note for sanitization requirements before any public release.
- Validates commands, CLI arguments, filesystem, destination path, URL, and launch interval.
- Discovers the active macOS console user, home directory, computer name, hardware UUID, and primary MAC address.
- Builds a unique sparsebundle name using the computer name and MAC address.
- Mounts the configured network share.
- Creates or reuses the sparsebundle.
- Writes
com.apple.TimeMachine.MachineID.plistinto the sparsebundle. - Mounts the sparsebundle volume.
- Registers the mounted volume as a Time Machine destination.
- Installs a LaunchAgent, remount helper, and persistent monitor (v2.2.1 model).
- Optionally starts the first Time Machine backup.
| Setting | Default |
|---|---|
| Sparsebundle size | 2000g |
| Filesystem | APFS |
| Network URL | smb://backup-server.example.local/TimeMachine (sanitize before publishing) |
| Mounted share path | /Volumes/TimeMachine |
| Sparsebundle volume name | Time Machine Backups |
| Helper directory | /usr/local/lib/chronos |
| Main log | /tmp/chronos.log |
| LaunchAgent logs | ~/Library/Logs/Chronos |
bash chronos_refactor.sh --verboseCustom values:
bash chronos_refactor.sh \
--url "smb://backup-server.example.local/TimeMachine" \
--destination "/Volumes/TimeMachine" \
--size 2000g \
--filesystem APFS \
--name "Time Machine Backups" \
--verboseUpdate only remount assets:
bash chronos_refactor.sh --launchagent-only --verbose