Initial commit

This commit is contained in:
2020-02-23 15:39:07 +00:00
commit 0ba16f43ef
6 changed files with 57 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
AFP_LOGIN=username
AFP_PASSWORD=password
+2
View File
@@ -0,0 +1,2 @@
.env
data
+3
View File
@@ -0,0 +1,3 @@
[submodule "docker-timemachine"]
path = docker-timemachine
url = https://github.com/odarriba/docker-timemachine
+29
View File
@@ -0,0 +1,29 @@
# Time Machine
This container runs a Time Machine server for remote backups of computers running macOS.
### Usage
1. Create a `.env` file following the template provided in `.env.schema`.
2. Create a symbolic link called `data` pointing to your preferred backup location. Example command: `ln -s /media/TimeMachine data`.
3. Start the container with `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):
> - 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/
+20
View File
@@ -0,0 +1,20 @@
version: "3"
services:
time-machine:
build: ./docker-timemachine
container_name: docker-timemachine
env_file: '.env'
environment:
- AFP_NAME=Time Machine
- PUID=1000
- PGID=1000
volumes:
- ./data:/timemachine
ports:
- "548:548"
- "636:636"
restart: unless-stopped
labels:
# TODO: this should not be required?
- com.centurylinklabs.watchtower.enable="false"
Submodule docker-timemachine added at 84647102c6