Provides proper continuous syncing capabilities using rclone bisync.
- Bidirectional sync between remote and local directories
- Real-time local change detection via inotifywait
- Periodic remote polling (every 20s)
- Automatic conflict resolution (newer file wins, loser preserved)
- Graceful fallback for servers without checksum/modtime support
- Systemd integration for running as a user service
- rclone (configured with your remote)
- inotify-tools (
sudo apt install inotify-tools)
- systemd (for service management)
curl -fsSL https://raw.githubusercontent.com/Yiannis128/rclone-sync/refs/heads/master/install.sh | bashMake sure ~/.local/bin is in your PATH:
export PATH="$HOME/.local/bin:$PATH"rclone-sync-add <name> <remote:path> <local-path>Example:
rclone-sync-add documents gdrive:Documents ~/Documentssystemctl --user enable --now rclone-sync@documentssystemctl --user status rclone-sync@documentsjournalctl --user -u rclone-sync@documents -frclone-sync-delete documentsrclone-sync-prunerclone-sync-update- On first run, performs a resync preferring the remote
- Watches local directory for changes using inotifywait
- Polls remote every 20 seconds for changes
- Uses flock to prevent concurrent sync operations
- On conflict, newer file wins; loser is renamed with
.path1or.path2suffix
Configs are stored in ~/.config/rclone-sync/<name>.conf:
REMOTE_PATH="gdrive:Documents"
LOCAL_DIR="/home/user/Documents"Cache files are stored in ~/.cache/rclone/bisync/.
| Flag | Purpose |
|---|---|
--compare size,modtime,checksum |
Graceful fallback for different server capabilities |
--resilient |
Retry after minor errors |
--recover |
Auto-recover from interruptions |
--conflict-resolve newer |
Newer file wins on conflict |
--conflict-loser pathname |
Loser renamed with path suffix |
--check-first |
Validate before transferring |
--modify-window 1s |
Handle cross-platform time precision |
See LICENSE file.