This repository has been archived on 2020-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
home-timemachine/README.md
2020-02-23 16:22:34 +00:00

31 lines
1.9 KiB
Markdown

# Time Machine
This container runs a Time Machine server for remote backups of computers running macOS.
## Usage
1. Clone this repository `git clone --recursive http://git.pi.homes/kaykayehnn/home-timemachine.git`
2. Create a `.env` file by following the template provided in `.env.schema`
3. Create a symbolic link called `data` pointing to your preferred backup location. Example command: `ln -s /media/TimeMachine data`
4. Start the container `docker-compose up -d`
## Notes
#### Auto discovery
To enable auto discovery you need to use Avahi daemon. On Ubuntu you can install it by running `sudo apt install avahi-daemon avahi-utils`.
To configure Avahi to broadcast Time Machine you can follow these instructions (adapted from [docker-timemachine's README](https://github.com/odarriba/docker-timemachine#step-3--enable-auto-discovery)):
> - Copy the file from docker-timemachine/avahi/nsswitch.conf to /etc/nsswitch.conf
> - Copy the service description file from docker-timemachine/avahi/afpd.service to /etc/avahi/services/afpd.service
> - Restart Avahi's daemon: sudo /etc/init.d/avahi-daemon restart
#### Performance
macOS throttles Time Machine services to keep the OS more responsive, which can result in slower backups. You can disable this behavior with `sudo sysctl debug.lowpri_throttle_enabled=0`. This can be useful during the first backup, since it can involve transferring hundreds of gigabytes. After executing the command you should immediately notice higher disk and CPU usage and increased network activity. Time Machine's remaining time should also decrease drastically.
**Once your backup is done, don't forget to run `sudo sysctl debug.lowpri_throttle_enabled=1` to revert the change, else your machine may end up noticeably slower for everyday tasks.**
Source: https://www.reddit.com/r/apple/comments/5vb66w/speed_up_your_time_machine_backups_tremendously/