update rclone filters to allow selectively syncing portions of the org/Documents dir

This commit is contained in:
KemoNine 2023-08-11 10:08:48 -04:00
parent 847768ca5d
commit f2130e01fc
2 changed files with 10 additions and 4 deletions

View file

@ -10,7 +10,6 @@ export NC_ORG="nc-personal:/org/"
# rclone common flags/switches # rclone common flags/switches
export RC_COMMON="--delete-after --fast-list --human-readable --interactive" 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 # get a wake lock so we dont get background killed
/data/data/com.termux/files/usr/bin/termux-wake-lock /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 # sync any local changes up to the main server
echo "starting rclone from local storage -> nextcloud" echo "starting rclone from local storage -> nextcloud"
/data/data/com.termux/files/usr/bin/rclone sync \ /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 $LOCAL_ORG $NC_ORG
# pause to review rclone output # pause to review rclone output

View file

@ -10,7 +10,6 @@ export NC_ORG="nc-personal:/org/"
# rclone common flags/switches # rclone common flags/switches
export RC_COMMON="--delete-after --fast-list --human-readable --interactive" 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 # get a wake lock so we dont get background killed
/data/data/com.termux/files/usr/bin/termux-wake-lock /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) # sync org data to local device (pull down outstanding changes, if any)
echo "starting rclone from nextcloud -> local storage" echo "starting rclone from nextcloud -> local storage"
/data/data/com.termux/files/usr/bin/rclone sync \ /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 $NC_ORG $LOCAL_ORG
# pause to review rclone output # pause to review rclone output