Mutagen sync
Mutagen provides better performance for synchronizing files on macOS.
Download
Download Mutagen following the Installation instructions.
Create $HOME/.mutagen.yml
sync:
defaults:
symlink:
mode: "posix-raw"
mode: "two-way-resolved"
ignore:
vcs: true
Setup
At the folder you want to sync, run:
export VOLUME=mutagen-cache
export NAME=your-name-here
docker volume create $VOLUME
docker container create --name $VOLUME -v $VOLUME:/volumes/$VOLUME mutagenio/sidecar
mutagen sync create --name $NAME --sync-mode=two-way-resolved --default-file-mode-beta 06400666 --default-directory-mode-beta 0777 $(pwd) docker://mutagen-cache/volumes/mutagen-cache
docker-compose
# where you want this mounted
volumes:
- mutagen-cache:/var/www
volumes:
mutagen-cache:
external: true
Check status
mutagen sync monitor
Start
If your sync was stopped, you can restart it with
mutagen sync resume $NAME
Stop
To stop synching, run
mutagen sync terminate $NAME
docker volume rm $VOLUME