aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Scholten2026-03-05 16:02:58 +1000
committerSam Scholten2026-03-05 16:02:58 +1000
commit71e30cc3eb3568875b4ee2eb9bce8796b2493ffd (patch)
tree50aef3e197740a2a97f47f81de1d5f8c75194672
parent48e5789990298de6a2cbd4fab211d663ec6a47e7 (diff)
downloadusync-71e30cc3eb3568875b4ee2eb9bce8796b2493ffd.tar.gz
usync-71e30cc3eb3568875b4ee2eb9bce8796b2493ffd.zip
Add Windows support via Git Bash with nomount cloud sync targets
-rw-r--r--README.md27
-rw-r--r--justfile18
2 files changed, 40 insertions, 5 deletions
diff --git a/README.md b/README.md
index 555c88c..ece64f4 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,33 @@ just status # Check
- `sync-cloud` - Cloud backup (rclone)
- `status` - Show state
+## Windows (Git Bash)
+
+Local sync requires both drives accessible. Cloud sync works from either drive.
+
+### Install
+
+- Git for Windows: https://git-scm.com/download/win
+- just: `scoop install just` / `choco install just`
+- rclone: https://rclone.org/downloads/
+- unison: https://github.com/bcpierce00/unison/releases
+
+### Setup
+
+```bash
+rclone config
+# Edit justfile paths for your Windows setup (Git Bash uses /c/ for C:\)
+```
+
+### Use
+
+```bash
+just sync-cloud # SOURCE → cloud
+just sync-cloud-from-target # TARGET → cloud
+```
+
+---
+
## Windows (WSL) with usbipd-win
```bash
diff --git a/justfile b/justfile
index a121b9d..99f4b96 100644
--- a/justfile
+++ b/justfile
@@ -1,5 +1,8 @@
# Path synchronization - Core recipes
+set shell := ["bash", "-cu"]
+set windows-shell := ["bash", "-cu"] # Windows: use Git Bash, install just/rclone/unison via e.g. chocolatey
+
# CONFIGURE THESE FOR YOUR SETUP:
SOURCE := "/path/to/source" # Primary location (source for cloud backup)
TARGET := "/path/to/target" # Secondary location
@@ -78,13 +81,18 @@ status:
@echo "Cloud storage ({{CLOUD_REMOTE}}): $(mountpoint {{CLOUD_MOUNT_PATH}} >/dev/null 2>&1 && echo "mounted" || echo "not mounted")"
@echo "Unison profile: $(test -f ~/.unison/paths.prf && echo "exists" || echo "missing")"
-# Windows-compatible cloud sync (only has access to TARGET/NTFS drive)
-# Use this on Windows with Git Bash: just sync-cloud-windows
-sync-cloud-windows:
+# Cloud sync without mounting (for Windows or headless use)
+sync-cloud-nomount:
+ rclone sync -P --checkers 32 --transfers 32 --buffer-size 128M --retries 3 --order-by 'size,ascending' "{{SOURCE}}/usync" "{{CLOUD_REMOTE}}:{{CLOUD_PATH}}"
+
+sync-cloud-from-target-nomount:
rclone sync -P --checkers 32 --transfers 32 --buffer-size 128M --retries 3 --order-by 'size,ascending' "{{TARGET}}/usync" "{{CLOUD_REMOTE}}:{{CLOUD_PATH}}"
-# Windows dry run
-sync-cloud-windows-dry:
+# Dry runs (nomount)
+sync-cloud-nomount-dry:
+ rclone sync --dry-run -P --checkers 32 --transfers 32 --buffer-size 128M --retries 3 --order-by 'size,ascending' "{{SOURCE}}/usync" "{{CLOUD_REMOTE}}:{{CLOUD_PATH}}"
+
+sync-cloud-from-target-nomount-dry:
rclone sync --dry-run -P --checkers 32 --transfers 32 --buffer-size 128M --retries 3 --order-by 'size,ascending' "{{TARGET}}/usync" "{{CLOUD_REMOTE}}:{{CLOUD_PATH}}"
default: