From f2130e01fc51535eae013302d8424c65a3e9896d Mon Sep 17 00:00:00 2001 From: KemoNine Date: Fri, 11 Aug 2023 10:08:48 -0400 Subject: [PATCH] update rclone filters to allow selectively syncing portions of the org/Documents dir --- shortcuts/rclone-local-nc | 7 +++++-- shortcuts/rclone-nc-local | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/shortcuts/rclone-local-nc b/shortcuts/rclone-local-nc index 29095d0..ed012d6 100755 --- a/shortcuts/rclone-local-nc +++ b/shortcuts/rclone-local-nc @@ -10,7 +10,6 @@ export NC_ORG="nc-personal:/org/" # rclone common flags/switches export RC_COMMON="--delete-after --fast-list --human-readable --interactive" -export RC_EXCLUDE="--exclude=archivebox --exclude=/Attic/** --exclude=/Documents/**" # get a wake lock so we dont get background killed /data/data/com.termux/files/usr/bin/termux-wake-lock @@ -18,7 +17,11 @@ export RC_EXCLUDE="--exclude=archivebox --exclude=/Attic/** --exclude=/Documents # sync any local changes up to the main server echo "starting rclone from local storage -> nextcloud" /data/data/com.termux/files/usr/bin/rclone sync \ - $RC_COMMON $RC_EXCLUDE $RC_DEBUG \ + $RC_COMMON $RC_DEBUG \ + --filter "+ /Documents/Resume/**" \ + --filter "- archivebox" \ + --filter "- /Attic/" \ + --filter "- /Documents/" \ $LOCAL_ORG $NC_ORG # pause to review rclone output diff --git a/shortcuts/rclone-nc-local b/shortcuts/rclone-nc-local index af08baf..2cc66fa 100755 --- a/shortcuts/rclone-nc-local +++ b/shortcuts/rclone-nc-local @@ -10,7 +10,6 @@ export NC_ORG="nc-personal:/org/" # rclone common flags/switches export RC_COMMON="--delete-after --fast-list --human-readable --interactive" -export RC_EXCLUDE="--exclude=archivebox --exclude=/Attic/** --exclude=/Documents/**" # get a wake lock so we dont get background killed /data/data/com.termux/files/usr/bin/termux-wake-lock @@ -18,7 +17,11 @@ export RC_EXCLUDE="--exclude=archivebox --exclude=/Attic/** --exclude=/Documents # sync org data to local device (pull down outstanding changes, if any) echo "starting rclone from nextcloud -> local storage" /data/data/com.termux/files/usr/bin/rclone sync \ - $RC_COMMON $RC_EXCLUDE $RC_DEBUG \ + $RC_COMMON $RC_DEBUG \ + --filter "+ /Documents/Resume/**" \ + --filter "- archivebox" \ + --filter "- /Attic/" \ + --filter "- /Documents/" \ $NC_ORG $LOCAL_ORG # pause to review rclone output