From 48e5789990298de6a2cbd4fab211d663ec6a47e7 Mon Sep 17 00:00:00 2001 From: Sam Scholten Date: Thu, 5 Mar 2026 14:35:01 +1000 Subject: add Windows cloud sync support --- justfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'justfile') diff --git a/justfile b/justfile index 84b9380..a121b9d 100644 --- a/justfile +++ b/justfile @@ -22,11 +22,21 @@ sync-cloud: check-rclone mount-cloud rclone sync -P --checkers 32 --transfers 32 --buffer-size 128M --retries 3 --order-by 'size,ascending' {{SOURCE}}/usync {{CLOUD_REMOTE}}:{{CLOUD_PATH}} just unmount-cloud +# Slow sync to cloud storage (from target) +sync-cloud-from-target: check-rclone mount-cloud + rclone sync -P --checkers 32 --transfers 32 --buffer-size 128M --retries 3 --order-by 'size,ascending' {{TARGET}}/usync {{CLOUD_REMOTE}}:{{CLOUD_PATH}} + just unmount-cloud + # Dry run to cloud (safety check) sync-cloud-dry: check-rclone mount-cloud rclone sync -P --checkers 32 --transfers 32 --buffer-size 128M --retries 3 --order-by 'size,ascending' --dry-run {{SOURCE}}/usync {{CLOUD_REMOTE}}:{{CLOUD_PATH}} just unmount-cloud +# Dry run to cloud from target (safety check) +sync-cloud-from-target-dry: check-rclone mount-cloud + rclone sync -P --checkers 32 --transfers 32 --buffer-size 128M --retries 3 --order-by 'size,ascending' --dry-run {{TARGET}}/usync {{CLOUD_REMOTE}}:{{CLOUD_PATH}} + just unmount-cloud + # Mount management (uses configurable mount point) mount-cloud: @mountpoint {{CLOUD_MOUNT_PATH}} 2>/dev/null && echo "Cloud storage already mounted" || (mkdir -p {{CLOUD_MOUNT_PATH}} && rclone mount {{CLOUD_REMOTE}}: --vfs-cache-mode full --daemon {{CLOUD_MOUNT_PATH}} && echo "✓ Cloud storage mounted at {{CLOUD_MOUNT_PATH}}") @@ -68,5 +78,14 @@ 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: + 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: + 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: just status \ No newline at end of file -- cgit v1.2.3