Skip to content

Instantly share code, notes, and snippets.

@deckerego
Last active March 24, 2025 19:32
Show Gist options
  • Save deckerego/bbd6850cf3df98f0a1eb359e6bd1c3d1 to your computer and use it in GitHub Desktop.
Save deckerego/bbd6850cf3df98f0a1eb359e6bd1c3d1 to your computer and use it in GitHub Desktop.
Sync a Synology folder to another directory on the same NAS
find /volume1/scanned -type d \( -path '**/@eaDir' -o -path '**/#recycle' \) -prune -o -type f -newer /volume1/paperless/sync_last_run.lock -print | sed 's/\/volume1\/scanned\///g' > /volume1/paperless/sync_last_run.log
touch /volume1/paperless/sync_last_run.lock
rsync --files-from=/volume1/paperless/sync_last_run.log /volume1/scanned /volume1/paperless/consume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment