# usync Sync any two paths with each other & cloud backup. Uses `unison` to sync the paths, rclone to sync to a cloud provider. ## Setup ```bash git clone && cd usync just install-deps # Edit justfile: set SOURCE and TARGET paths rclone config just setup ``` ## Use ```bash just sync-paths # Between paths (SOURCE and TARGET in justfile) just sync-cloud # To cloud just status # Check ``` ## Commands - `setup` - Create directories - `check` - Verify paths - `sync-paths` - Fast sync (unison) - `sync-cloud` - Cloud backup (rclone) - `status` - Show state ## Windows (WSL) Setup for linux FS external drives ```bash # 1. Identify drive (as Admin) wmic diskdrive list brief # Note: \\.\PHYSICALDRIVEN # 2. Mount raw drive (as Admin) wsl --mount \\.\PHYSICALDRIVE1 --bare # Block device now visible in all WSL instances # 3. In your WSL instance sudo lsblk # Find /dev/sdxN sudo mkdir /mnt/ext4drive sudo mount /dev/sdd1 /mnt/ext4drive sudo apt install rclone unison # Edit justfile: SOURCE="/mnt/ext4drive", set TARGET & CLOUD_REMOTE # 4. Run usync just sync-cloud # 5. Cleanup sudo umount /mnt/ext4drive wsl --unmount \\.\PHYSICALDRIVE1 # (as Admin) ``` ## Configure Edit justfile: - SOURCE/TARGET - paths to sync - CLOUD_REMOTE - rclone remote name - CLOUD_PATH - cloud folder (default: /usync) - CLOUD_MOUNT_PATH - local mount (default: ~/cloud-mount)