Skip to content

Instantly share code, notes, and snippets.

@richardneish
Created January 17, 2016 10:36
Show Gist options
  • Save richardneish/557034d6f4da4ea7ad2d to your computer and use it in GitHub Desktop.
Save richardneish/557034d6f4da4ea7ad2d to your computer and use it in GitHub Desktop.
Script to syncronize pictures between Synology NAS and local
#!/bin/sh
REMOTE=/mnt/photo/
LOCAL=/home/richard/Pictures/
# TODO: Scan a "deleted items" local folder and use that
# to remove remote items.
# From local to remote first to get any modifications.
rsync \
--archive \
--no-p \
"$LOCAL" \
"${REMOTE}" \
| logger
# Then from remote to local to pick up any new files.
rsync \
--archive \
--no-p \
--exclude @eaDir \
--exclude scans \
"${REMOTE}" \
"$LOCAL" \
| logger
logger Syncronized photos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment