Open segator opened 4 years ago
I've been trying to get a Dropbox replacement for managing client servers. fswatch is handy, check out this script:
#!/bin/bash
alias live_rsync='rsync -azP --exclude ".DS_Store" --exclude "Icon*" --exclude "node_modules" --exclude ".vscode" ~/Sync/from_folder server@255.255.255.255:~'
fswatch -o . | while read f; do $live_rsync; done
works well except for when I create a new folder and/or move files it just makes copies all over the place.
hello @segator
This will be a huge improvement to add.
Note that there are already existing tools to handle bi-directionnal sync in almost real time :
bsync is more intended to handle low frequency sync.
it will be nice to have bsync as a daemon and then using rest api to fix conflits and use FS notify to auto detect changes and sync files almost after file is just closed.