aboutsummaryrefslogtreecommitdiff
path: root/justfile
diff options
context:
space:
mode:
authorSam Scholten2026-03-05 14:35:01 +1000
committerSam Scholten2026-03-05 14:35:55 +1000
commit48e5789990298de6a2cbd4fab211d663ec6a47e7 (patch)
treeac866d3bb6d9e04b46eb9e8303e7993c6515c949 /justfile
parent1400dde60517f88cff3741da862839f6ef272b40 (diff)
downloadusync-48e5789990298de6a2cbd4fab211d663ec6a47e7.tar.gz
usync-48e5789990298de6a2cbd4fab211d663ec6a47e7.zip
add Windows cloud sync support
Diffstat (limited to 'justfile')
-rw-r--r--justfile19
1 files changed, 19 insertions, 0 deletions
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