-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrsync-photos-from-server
executable file
·22 lines (18 loc) · 1.09 KB
/
rsync-photos-from-server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
curyear=`date | awk '{print $6}'`
prevyear=`expr $curyear - 1`
#~/bin/wolcmd 10feed05254d 192.168.1.42 255.255.255.0 4343
#echo "waiting 300 seconds..."
#sleep 300
curyeardirs=`/usr/bin/ssh openmediavault.local ls -d /media/TheRaidArray/Media/Photos/organized/$curyear-*`
#mkdir -p ~/Pictures/Photos/organized
for d in $curyeardirs
do
echo rsyncing $d...
dest=`basename $d`
#/usr/bin/rsync --verbose --log-file=photo-rsync-$dest.log --exclude .AppleDouble --recursive --times openmediavault.local:$d ~/Pictures/Photos/organized
/usr/bin/rsync --verbose --exclude .AppleDouble --recursive --times openmediavault.local:$d ~/Pictures/Photos/organized
done
echo rsyncing /media/TheRaidArray/Media/Photos/organized/$prevyear
#/usr/bin/rsync --verbose --log-file=photo-rsync-$prevyear.log --exclude .AppleDouble --recursive --times openmediavault.local:/media/TheRaidArray/Media/Photos/organized/$prevyear ~/Pictures/Photos/organized
/usr/bin/rsync --verbose --exclude .AppleDouble --recursive --times openmediavault.local:/media/TheRaidArray/Media/Photos/organized/$prevyear ~/Pictures/Photos/organized