Created
January 17, 2016 10:36
-
-
Save richardneish/557034d6f4da4ea7ad2d to your computer and use it in GitHub Desktop.
Script to syncronize pictures between Synology NAS and local
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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