Bi-directional Sync: Unison
The Unison file synchronizer, with repository at bcpierce00/unison is a highly reliable cross-platform tool that comes with a decent GUI out of the box and it supports both local folder synchronization and remote synchronization, effectively covering both areas: cross-folder and cross-device synchronization. Iako podržava continuous sync, ne uključuje se iz UI već se mora čačkati po config fajlovima. Specifičnosti za MacOS Unison Wiki | Main / UnisonFAQOSSpecific
Running Unison
Kao prvo, moram da pronađem gde se nalazi “profile” konfiguracioni fajl:
|
|
Ako ne želim da koristim profile fajl, mogu da kucam i unison -batch dir1 dir2
Zatim u profile fajl trba dodati neke parametre:
ignore = Name .git
auto=true
batch=true
silent=false
confirmbigdel=true
fastcheck=true
owner=true
group=true
prefer=newer
times=true
Ignore patterns can also be specified on the command line using an option like -ignore 'Name .git'
I pokreni Unison sa tim profilom:
|
|
Scheduling the sync
Avoid multiple unison processes running and launch unison only if it is not currently running, and do all that in the crontab -e
a pre toga možeš promeniti crontab editor sa export VISUAL=nano
|
|
How to schedule tasks with crontab on macOS · GeekBitZone.com - Passionate About Tech
Jedini izvor informacija mi je bio tekst Sync your data with Unison. How to use Unison to keep your data in… | by Martín Lamas | Trabe | Medium
If needed, we can sync only in one direction
One-way sync odnosno clone odnosno mirror odnosno backup se postiže upotrebom parametra -force
gde navodiš koji je root od ona dva taj koji treba da bude finalni na oba mesta.
software recommendation - What are good bi-directional, real-time synchronization utilities between Mac local folder and web server? - Ask Different Configure unison for continuous sync File Synchronization with Unison A journey from Unison to Syncthing and back to Unison
Mutagen tutorial: syncing files easily with a remote server | PhotoRoom
Na osnovu Unison, neko je kreirao Mutagen na repo mutagen-io/mutagen: Fast file synchronization and network forwarding for remote development, koji se pretvorio u kompaniju koju je sredinom 2023 kupio Docker, a u pitanju je two-way file synchronization ali pored toga oni nude i network forwarding. Mutagen je stvarno cross-platform i na macOS se instalira sa brew kao na Installation | Mutagen a za razliku od Unison, lako ga je pokrenuti kao daemon. Nekolicina UI helper toolova se može pronađi na repo.
Fast file synchronization and network forwarding for remote development | Hacker News
Software for syncing internal and external hard drives – Matias Kinnunen
Vinh Q. Nguyen - Real time file synchronization like Dropbox via Unison
Kod Unison je interesantno da za remote sync osim remote ssh methoda podržava i manje siguran TCP Sockets metod, što je interesantan pristup.
Unison Manual at unison-manual.txt
Some command-line arguments, like -ui
, are expected to appear on the command-line only, not in a profile.