I’m looking for syncing software, but not to sync across the network but instead to sync 2 folders on my drive, bi-directional.
The usecase for this is that there are some “Application Support” folders that I want to keep in sync no matter what. Symlinks often break, I tried that already.
One step further: I want to put the target folder in iCloud Drive, so if iCloud drive updates the file → sync back (bi-directional)
Another step further (level 3): Some kind of way that can be backed up easily, or configured through the CLI. So I can either backup the setting file and import it on another PC, or run a bunch of shell scripts that use the CLI to setup the syncs from scratch, and specifies that the initial sync should be from folder x → folder y
Resilio sync “Pro” supports local sync, but this app still looks very dead. There was a very small update recently but I don’t have high hopes
GoodSync: More towards syncing in the cloud, but can do local sync. Subscription based with a free option
Other available sync things:
Rsync: Works one-way
Hazel: Works one-way, does only trigger on new files, not on changes
SyncThing: is for network syncs, they explicitly don’t want to support local folder. Technically doable by running it twice on the same machine
I’ve tried ChronoSync and unison, and unison feels almost perfect for my usecase. I don’t know how well it actually syncs delta changes and how reliable it is, but what’s the killer feature for me is that it’s a CLI tool, so I can automate it.
sync ~/Library/Mobile Documents/com~apple~CloudDocs/TestFolder/Library/Appl ication Support/<SomeApp>' with ~/Library/Application\ Support/<SomeApp>
sync pathes License, app.settings and User Contributed
ignore all .DS_Store and “build” folders
If I want to do an initial sync in one direction, for example on first setup always copy from iCloud, I can add -force ~/Library/Mobile Documents/com~apple~CloudDocs/TestFolder/Library/Application Support/<SomeApp>', and it will mirror that through.
I also tried changing a couple files, adding directories and deleting some, and it caught all of the changes.
You can also specify all of these settings in a settings file, so would only need to set that up once (hopefully).
Sadly it’s not the most user friendly, and the manual has a lot in it. I’ll be giving this a try over the weekend and see if it solves what I’m trying to do
Some apps overwrite symlinked files with a non-symlink file. I am currently using GitHub - lra/mackup: Keep your application settings in sync (OS X/Linux) and have constantly situations where some things are syned fine, while others aren’t and I’m not noticing it.
Going bi-directional sync gives me control over it, and reduces the amount of write events that trigger cloud updates
If this an issue (read the documentation in the ‘man’ file), run it twice, for each way. ‘rsync’ part of macOS already. Setup everything in a command batch file and automate. Can even schedule it with a ‘cron’ job, also already in macOS.
I use both rsync and Chronsync. Chronosync is pretty much a GUI that emulates rsync.
Edit: and to reliably work with iCloud Drive, set iCloud to keep all the files you wish to sync “offline” and available for your offline (on desktop) process to work. Or watch carefully Apple “helping” you by keeping files “online” and off your computer to “save space”.
If you never delete files, then sure, you can rsync in both directions. Unison and osync also handle deletions bi-directional which is very nice. Rsync is great, but not good for keeping 2 locations in sync IMO
Ok. I said “if”, and my experience is that “rsync” can sync without doing it both directions, but I figured you would prefer that. I notice and use the “–delete*” options that are documented in rsync’s “man” documentation. Six options available. Seems to do the deletions as I would expect. I’ll leave it to you to test for your needs.
Of course use “unison” and/or “osync” if you like them better.
A word of caution here, iCloud Drive sync can be unpredictable some times and iCloud Drive may decide to evict the file by its own. That’s the reason why DT does not support indexed items from iCloud Drive folders.